private void btnCashChargOpenPort_Click(object sender, RoutedEventArgs e) { var msg = ""; com = new SerialCom(cmbCashChargePorts.Text); if (com.Open(out msg) == false) { Core.Log.In(msg); return; } StatusCode.Init(); wrapPanel.IsEnabled = true; wp1.IsEnabled = true; constrant = new Constrant(com); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.IsEmpty()) { Log("请输入设备IP"); return; } constrant = new Constrant(); constrant.Init(textBox1.Text); nuc = new Nuc(constrant); button1.Enabled = false; groupBox1.Enabled = true; groupBox2.Enabled = true; groupBox3.Enabled = true; groupBox4.Enabled = true; }