/// <summary> /// \brief This method is called when the callconnection is closed. /// Set the isCalling state of the clients to false and remove the CallConnection from the callConnectios list in the MessageSocketManager class /// </summary> private void CloseConnection() { client1.isCalling = false; client2.isCalling = false; MessageSocketManager.RemoveCallConnection(this); }
private void StopApplication(object sender, CancelEventArgs e) { System.Environment.Exit(1); MessageSocketManager.SetRunning(false); }
static void OnProcessExit(object sender, EventArgs e) { MessageSocketManager.SetRunning(false); }
public MainWindow() { InitializeComponent(); AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit); messageSocketManager = new MessageSocketManager(this); }