public void Dispose() { if (!_disposed) { //KeyboardHook.Dispose(); WindowsKeyHook.Dispose(); Taskbar.Dispose(); //GlobalEvent.Dispose(); //Manager.Dispose(); _disposed = true; } }
private void QuitTaskBarReader() { //SaveCurProgess(); //restorePrevTitle(); //StopListeningForWindowResize(); //StopListeningForWindowSwitch(); taskbar.SizeChanged = null; taskbar.Dispose(); if (Application.MessageLoop) { // WinForms app Application.Exit(); } else { // Console app Environment.Exit(0); } }
private void Window_Closed(object sender, EventArgs e) { Taskbar.Dispose(); Environment.Exit(0); }