private void confirm_Click(object sender, EventArgs e) { if (this.registerTxt.Text == KeyUtil.GetRegisterKey(KeyUtil.GetMNum())) { KeyUtil.writeRegisterKey(); Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("注册成功,请继续使用"); this.Close(); } else { Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("注册失败,请重新输入"); CadPlugin.logToEditor("注册失败,请重新输入"); } }
public void testCommand() { return; RegisterForm rForm = new RegisterForm(); Application.ShowModelessDialog(rForm); logToEditor(KeyUtil.GetDiskVolumeSeriaNumber()); logToEditor(KeyUtil.GetCpu()); logToEditor(KeyUtil.GetMNum()); logToEditor(KeyUtil.GetRegisterKey(KeyUtil.GetMNum())); return; if (TimeUtil.checkOutOfTime()) { return; } FileUtil.initTreeInfo(); BasicCommand command = new TestCommand(); logToCadText(command.excute().result); }
private void RegisterForm_Load(object sender, EventArgs e) { this.mNumTxt.Text = KeyUtil.GetMNum(); }