diff --git a/FanControl/FanControlForm.cs b/FanControl/FanControlForm.cs index cfd789c..147d2cb 100644 --- a/FanControl/FanControlForm.cs +++ b/FanControl/FanControlForm.cs @@ -29,6 +29,7 @@ namespace FanControl public FanControlForm() { InitializeComponent(); + SharedData_Update(); Text += " v" + Application.ProductVersion.ToString(); Instance.Open(Text, "Global\\FanControlOnce"); diff --git a/PerformanceOverlay/Controller.cs b/PerformanceOverlay/Controller.cs index 728920c..7779200 100644 --- a/PerformanceOverlay/Controller.cs +++ b/PerformanceOverlay/Controller.cs @@ -37,7 +37,8 @@ namespace PerformanceOverlay public Controller() { contextMenu = new System.Windows.Forms.ContextMenuStrip(components); - + + SharedData_Update(); Instance.Open(TitleWithVersion, "Global\\PerformanceOverlay"); showItem = new ToolStripMenuItem("&Show OSD"); diff --git a/PowerControl/Menu.cs b/PowerControl/Menu.cs index 1992f8f..bc54787 100644 --- a/PowerControl/Menu.cs +++ b/PowerControl/Menu.cs @@ -126,8 +126,6 @@ namespace PowerControl if (ActiveOption == null) ActiveOption = Options.First(); - if (SelectedOption == null) - SelectedOption = ActiveOption; onUpdateToolStrip(); } @@ -171,7 +169,7 @@ namespace PowerControl return; foreach (ToolStripMenuItem item in toolStripItem.DropDownItems) - item.Checked = (item.Tag.ToString() == SelectedOption.ToString()); + item.Checked = Object.Equals(item.Tag, SelectedOption ?? ActiveOption); toolStripItem.Visible = Visible && Options.Count > 0; } @@ -254,7 +252,7 @@ namespace PowerControl else output += Color(Name + ":", Colors.Blue).PadRight(30); - output += optionText(SelectedOption); + output += optionText(SelectedOption ?? ActiveOption); if (!Object.Equals(ActiveOption, SelectedOption)) output += " (active: " + optionText(ActiveOption) + ")";