Beispiel #1
0
 protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 {
     if (hMouseHook != 0)
     {
         PInvoke.UnhookWindowsHookEx(hMouseHook);
     }
     if (hKeyboardHook != 0)
     {
         PInvoke.UnhookWindowsHookEx(hKeyboardHook);
     }
     Application.ApplicationExit -= new System.EventHandler(appExit);
     if (viewClock != null && viewClock.Enabled)
     {
         viewClock.Stop();
         viewClock.Dispose();
     }
     if (viewThread != null && viewThread.IsAlive)
     {
         viewThread.Abort();
     }
     conf.lastNw = null;
     base.OnClosing(e);
 }