public static void Test() { int res = SoftRegister.InitRegedit(); if (res == 0) { //Application.Run(new Form1()); MessageBox.Show("软件尚已注册,可以试用软件!"); } else if (res == 1) { MessageBox.Show("软件尚未注册,请注册软件!"); } else if (res == 2) { MessageBox.Show("注册机器与本机不一致,请联系管理员!"); } else if (res == 3) { MessageBox.Show("软件试用已到期!"); } else { MessageBox.Show("软件运行出错,请重新启动!"); } }
private void btnOK_Click(object sender, EventArgs e) { string account = this.tbxName.Text; string password = this.tbxPassword.Text; string imei = "123456789012345"; string deviceName = Dns.GetHostName(); string deviceId = SoftRegister.GetDiskVolumeSerialNumber() + SoftRegister.GetCpuSerialNumber() + SoftRegister.GetMacAddress(); int deviceType = 3; this.m_LoginController.Login(account, deviceType, imei, deviceName, deviceId, password); }
public void GetCpuSerialNumberTest() { string s; s = SoftRegister.GetCpuSerialNumber(); }
public void GetMacAddressTest() { string s; s = SoftRegister.GetMacAddress(); }
public void GetDiskVolumeSerialNumberTest() { string s; s = SoftRegister.GetDiskVolumeSerialNumber(); }