private void btnOpen_Click(object sender, EventArgs e) { Sec = 60; int intIndex = 0; if (btn1.Checked == true) { intIndex = 1; } else if (btn2.Checked == true) { intIndex = 2; } else if (btn3.Checked == true) { intIndex = 3; } if (intIndex == 0) { Skynet.Framework.Common.SkynetMessage.MsgInfo("请选择需要打开的门锁!"); return; } theCommon_XH.Doorlock(intIndex, 1); }
private void simpleButton1_Click(object sender, EventArgs e) { Common_XH theCommon_XH = new Common_XH(); if (simpleButton1.Text.Equals("打开钞箱")) { theCommon_XH.Doorlock(2, 1); simpleButton1.Text = "关闭钞箱"; } else { theCommon_XH.Doorlock(2, 0); simpleButton1.Text = "打开钞箱"; } }