private void chkShellMenus_CheckedChanged(object sender, EventArgs e) { Settings.General.AddContextMenu = chkShellMenus.Checked; Settings.SaveGeneral(); if (chkShellMenus.Checked) { ContextMenuManager.AddContextMenu(); } else { ContextMenuManager.RemoveContextMenu(); } }
/// <summary> /// Kills the current process. Called from the tray menu. /// </summary> public void KillTheProcess() { if (!Settings.IsNoMenusMode) { ContextMenuManager.RemoveContextMenu(); } ExitedFromTray = true; Log.Write(l.Info, "Killing the process..."); try { tray.Visible = false; Process.GetCurrentProcess().Kill(); } catch { Application.Exit(); } }