예제 #1
0
        private void frmController_Load(object sender, EventArgs e)
        {
            Visible = false;

            if (WOTHelper.FindProcess("WOT.Stats"))
            {
                DevExpress.XtraEditors.XtraMessageBox.Show("WOT Statistics is already running", "WOT Statistics", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                this.Close();
            }
            else
            {
                if (UserSettings.MinimiseonStartup == true)
                {
                    WOTTrayApp sysTray = new WOTTrayApp();
                    sysTray.Show();
                }
                else
                {
                    using (frmMain wotGUI = new frmMain())
                    {
                        wotGUI.ShowDialog();
                    }
                }
            }
        }
예제 #2
0
        public void bgw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            _done = true;

            Thread.Sleep(1000);

            //###########
            //this.Close();
            //Close();
            //Application.Exit();
            //###########



            this.Hide();
            this.Close();
            if (UserSettings.MinimiseonStartup == true)
            {
                WOTTrayApp sysTray = new WOTTrayApp();
                sysTray.Show();
            }
            else
            {
                if (WOTStatistics.Core.UserSettings.AppVersion != WOTStatistics.Core.UserSettings.LastReleaseNotes)
                {
                    try
                    {
                        WOTStatistics.Core.UserSettings.LastReleaseNotes = WOTStatistics.Core.UserSettings.AppVersion;
                        string       sVersion = "ReleaseNote_" + WOTStatistics.Core.UserSettings.AppVersion.Replace(".", string.Empty) + ".htm";
                        ReleaseNotes oRN      = new ReleaseNotes();
                        oRN.LoadPage(Path.Combine(WOTStatistics.Core.WOTHelper.GetApplicationData(), sVersion));
                        oRN.ShowDialog();
                        oRN.BringToFront();
                    }
                    catch (Exception exrn)
                    {
                        WOTHelper.AddToLog("Release Notes: " + exrn.Message);
                    }
                }


                frmMain frm = new frmMain();
                WOTHelper.AddToLog("Starting Main Form...");
                frm.Show();
                WOTHelper.AddToLog("Starting Main Form DONE");
            }

            _workerThread.Dispose();
            this.Dispose();
        }