예제 #1
0
        public static void Shutdown(int exitCode)
        {
            ShuttingDown = true;

            if (mainWindowController != null)
            {
                mainWindowController.RemoveTrayIcon();
            }

            Toggl.Clear();

            Environment.Exit(exitCode);
        }
예제 #2
0
 public static void Shutdown(int exitCode)
 {
     Toggl.Clear();
     //For mysterious reason on Windows 7 Exit() doesn't always unload the process of TogglDesktop.exe from memory,
     //and it makes impossible to start the app again next time.
     //See https://github.com/toggl-open-source/toggldesktop/issues/4682 for more details.
     if (Utils.IsWindows7())
     {
         Process.GetCurrentProcess().Kill();
     }
     else
     {
         Environment.Exit(exitCode);
     }
 }
예제 #3
0
파일: Program.cs 프로젝트: blockplus/other
        public static void Shutdown(int exitCode)
        {
            Toggl.Clear();

            Environment.Exit(exitCode);
        }