diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs index e1ef421..1104c88 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs @@ -316,8 +316,7 @@ namespace PersistentWindows.SystrayShell } } - systrayForm = new SystrayForm(); - systrayForm.enableUpgradeNotice = check_upgrade; + systrayForm = new SystrayForm(check_upgrade); systrayForm.autoUpgrade = auto_upgrade; if (relaunch) diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs index 575e4f9..a2ebe39 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs @@ -168,10 +168,6 @@ namespace PersistentWindows.SystrayShell // pause/resume upgrade notice //this.upgradeNoticeMenuItem.Text = "Disable upgrade notice"; this.upgradeNoticeMenuItem.Click += new System.EventHandler(this.PauseResumeUpgradeNotice); - if (this.enableUpgradeNotice) - this.upgradeNoticeMenuItem.Text = "Disable upgrade notice"; - else - this.upgradeNoticeMenuItem.Text = "Enable upgrade notice"; // // exitToolStripMenuItem diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.cs index 6f62633..120c2d8 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.cs @@ -43,10 +43,16 @@ namespace PersistentWindows.SystrayShell private Dictionary upgradeDownloaded = new Dictionary(); - public SystrayForm() + public SystrayForm(bool enable_upgrade_notice) { InitializeComponent(); + enableUpgradeNotice = enable_upgrade_notice; + if (enableUpgradeNotice) + upgradeNoticeMenuItem.Text = "Disable upgrade notice"; + else + upgradeNoticeMenuItem.Text = "Enable upgrade notice"; + clickDelayTimer = new System.Timers.Timer(1000); clickDelayTimer.Elapsed += ClickTimerCallBack; clickDelayTimer.SynchronizingObject = this.contextMenuStripSysTray;