与 dogprotect / linux-build 分支同一次改名,等价内容:
- 产品名/展示串、SDK 与运行时导出 API、.NET 命名空间全部换为 DogProtect
- 文件名与目录改名(dogprotect.sln / DogProtect/ / DogProtectCon/ / sdk/DogProtect.SDK/ /
sdk/DogProtectSDK.{h,pas,bas,inc} / runtime/DogProtect.Runtime/ / core/dogprotect.rc /
app/dogprotect_gui.app)
- 项目文件扩展名 .vmp → .dog;VM 代码节名默认 .dog(产物节 .dog0/.dog1/...)
- 授权数据/配置: DogProtect.dat、DogProtectLicense.ini、Global\\DogProtect.dat
- 域名占位 dogprotect.example、bundle id com.dogprotect.dogprotect
- 保留 VMP_* 内部宏与 third-party/
33 lines
932 B
C#
33 lines
932 B
C#
using System;
|
|
using System.Reflection;
|
|
using System.Windows.Forms;
|
|
|
|
namespace forms_cil
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private bool CheckPassword(string pwd)
|
|
{
|
|
UInt64 magicNum;
|
|
return (UInt64.TryParse(pwd, out magicNum) && magicNum % 17 == 13);
|
|
}
|
|
|
|
[DogProtect.BeginVirtualization]
|
|
private void btnCheckPassword_Click(object sender, EventArgs e)
|
|
{
|
|
if (CheckPassword(txtPassword.Text))
|
|
{
|
|
MessageBox.Show(DogProtect.SDK.DecryptString("Correct password"), DogProtect.SDK.DecryptString("Password check"), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
} else
|
|
{
|
|
MessageBox.Show(DogProtect.SDK.DecryptString("Incorrect password"), DogProtect.SDK.DecryptString("Password check"), MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
txtPassword.Focus();
|
|
}
|
|
}
|
|
}
|
|
} |