示例#1
0
文件: App.cs 项目: wpmyj/c3
        /// <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();
        }
示例#2
0
文件: App.cs 项目: wpmyj/c3
        /// <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);
            }
        }