コード例 #1
0
        private void CloseApplication()
        {
            try
            {
                if (_switchToNothinUponClosing)
                {
                    _fb.StopWorking();
                }
                saveSettings();

                //release the handles watching for console lock and computer sleep/hybernate
                SystemEvents.SessionSwitch    -= _sseh;
                SystemEvents.PowerModeChanged -= _powerMode;
            }
            catch (Exception x)
            {
                Utils.LogError(x.ToString());
            }
        }
コード例 #2
0
 private void CloseApplication()
 {
     Utils.Log.Debug("Shutting down...");
     try
     {
         if (_settings.SwitchToNothingWhenClosing)
         {
             _fb.StopWorking();
         }
         else
         {
             Utils.Log.Debug("User continues to work on case after closing.");
         }
         saveSettings();
     }
     catch (System.Exception x)
     {
         Utils.Log.Error(x.ToString());
     }
 }