/// <summary> /// /// </summary> /// <param name="exitCode"></param> virtual public void Exit(int exitCode) { this._isSuredToQuit = true; //OnApplicationExit(); DisposeMainFormOrNot(); NotifyIconManager.Stop(); //Environment.Exit(exitCode); this.MainForm.Close(); }
/// <summary> /// /// </summary> virtual public void Run() { if (IsSingleApplication && Xdgk.Common.Diagnostics.HasPreInstance()) { ShowRunningMessage(); return; } else { if (NotifyIconManager.EnabledNotifyIcon) { NotifyIconManager.Start(); this.MainForm.FormClosing += new FormClosingEventHandler(MainForm_FormClosing); } Application.Run(MainForm); } }