using System; using System.Windows.Forms; namespace HL_FrisAidPlat_Register { public partial class Form_Main : Form { private string encryptComputer = string.Empty; private const int timeCount = 30; public Form_Main() { InitializeComponent(); } private void btnRegist_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(textBox_Authorization.Text)) { string computer = textBox_Authorization.Text+","; computer += textBox_Name.Text + ","; computer +=Convert.ToDateTime(dateTime_End.Text.ToString()).ToString("yyyy-MM-dd"); EncryptionHelper help = new EncryptionHelper(EncryptionKeyEnum.KeyB); //string md5String = help.GetMD5String(computer); string registInfo = help.EncryptString(computer); textBox_RegCode.Text = registInfo; } else { MessageBox.Show("请输入要授权的电脑授权码!"); } } } }