Exemplo n.º 1
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     client1.Disconnect();
     host.CloseConnection();
 }
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     host.CloseConnection();
 }
Exemplo n.º 3
0
 private void Grid_Unloaded(object sender, System.Windows.RoutedEventArgs e)
 {
     Server.CloseConnection(); //Closes all of the opened connections and stops listening
 }
Exemplo n.º 4
0
 private void MC_UI_FormClosing(object sender, FormClosingEventArgs e)
 {
     Nearest_Game.mcHasStarted = false;
     server.CloseConnection(); //Closes all of the opened connections and stops listening
 }
 // there is a button to close the connection on the host form.
 private void Button1_Click(object sender, EventArgs e)
 {
     _host.CloseConnection();
 }