private void button1_Click(object sender, EventArgs e) { if (this.pwd.Text == "527014" && this.mNum.Text != null && this.mNum.Text.Length > 0) { this.regKey.Text = KeyUtil.GetRegisterKey(this.mNum.Text); } }
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); }