//退出行为,注销设备,同时停止发送操作 private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) { bool isExit = true; if (e.CloseReason != CloseReason.ApplicationExitCall) { isExit = Utility.MsgBoxQuery("是否要退出?", "防止误操作"); } e.Cancel = !isExit; if (isExit) { frmRX.Hide(); Logger.hide(); JavascriptIDE.hide(); this.Hide(); if (transmitStarted) { stopTransmit(); } if (DriverManager.Driver != null) { DriverManager.FinializeDevice(); } Logger.close(); JavascriptIDE.close(); } }
public static void closeIDE() { JavascriptIDE.hide(); }