From d2a5f206e497fe901192a28e91e9bccf48838a0a Mon Sep 17 00:00:00 2001 From: Kang Yu Date: Thu, 27 Jun 2024 22:14:34 -0700 Subject: [PATCH] minor code refactoring --- Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs | 4 ---- .../SystrayShell/SystrayForm.Designer.cs | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs index bb2e1ce..0a93481 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs @@ -319,10 +319,6 @@ namespace PersistentWindows.SystrayShell systrayForm = new SystrayForm(); systrayForm.enableUpgradeNotice = check_upgrade; systrayForm.autoUpgrade = auto_upgrade; - if (check_upgrade) - systrayForm.upgradeNoticeMenuItem.Text = "Disable upgrade notice"; - else - systrayForm.upgradeNoticeMenuItem.Text = "Enable upgrade notice"; if (relaunch) { diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs index a2ebe39..575e4f9 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/SystrayForm.Designer.cs @@ -168,6 +168,10 @@ 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