Files

33 lines
932 B
C#
Raw Permalink Normal View History

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();
}
}
}
}