private void frmRegister_Load(object sender, EventArgs e) { if (softreg.getMNum() == "000000000000000000000000000000") { MessageBox.Show("未知错误", "警告", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } txtMNum.Text = softreg.getMNum(); }
private void timer1_Tick(object sender, EventArgs e) { this.timer1.Enabled = false; _macCode = _softReg.getMNum(); txtMCode.Text = _macCode; this.btnReg.Enabled = true; }
SoftReg softreg = new SoftReg();//实例化公共类对象 private void frmRegister_Load(object sender, EventArgs e) { textBox1.Text = softreg.getMNum(); }