Пример #1
0
 private void Window_Closed(object sender, EventArgs e)
 {
     if (client != null)
     {
         client.Dispose();
         client.DisposeThreads();
     }
     client = null;
     tmr_Stop();
 }
Пример #2
0
 private void Current_Exit(object sender, ExitEventArgs e)
 {
     if (_client != null)
     {
         _client.Dispose();
         _client.DisposeThreads();
     }
     _client = null;
     Environment.Exit(0);
 }