private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (tcla != null) { tcla.setExitClickedState(true); } if (tserv != null) { tserv.setExitClickedState(true); } if (tserv != null) { tserv.ServerStop(); } if (tcla != null) { tcla.DisConnect(); } if (userv != null) { userv.DisConnect(); } if (ucla != null) { ucla.DisConnect(); } Process currentProcess = Process.GetCurrentProcess(); currentProcess.Kill(); }
private void MainForm_Closed(object sender, FormClosedEventArgs e) // 메인폼 닫혔을 때 { //serial.DisConSerial(); tserv.ServerStop(); tcla.DisConnect(); }