Beispiel #1
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (ptt != null)
     {
         // It takes several seconds to sign out of Loudtalks Mesh network
         // Hide main window and tray icon as if application exited
         // Start signing out and destroy window later when sign out process is over
         Hide();
         ptt.Settings.ShowTrayIcon = false;
         if (ptt.NetworkStatus == ZelloPTTLib.NETWORK_STATUS.NSONLINE ||
             ptt.NetworkStatus == ZelloPTTLib.NETWORK_STATUS.NSSIGNINGIN)
         {
             bExitOnSignout = true;
             ptt.SignOut();
             e.Cancel = true;
         }
     }
     Program.inf.OnNormalZClientClose(ZelloClientId);
 }