From d389f14c03adc9126451f7d7110cea5408139515 Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Thu, 24 Aug 2017 09:20:41 -0400 Subject: [PATCH] Update to latest status window library version --- Window/WindowSource.cs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Window/WindowSource.cs b/Window/WindowSource.cs index 6a2d500..38e18bb 100644 --- a/Window/WindowSource.cs +++ b/Window/WindowSource.cs @@ -27,6 +27,11 @@ namespace SystemTemperatureStatusWindow } private void HandleTimerElapsed(object sender, ElapsedEventArgs e) + { + Update(); + } + + private void Update() { try { @@ -114,22 +119,25 @@ namespace SystemTemperatureStatusWindow _refreshTimer.Start(); } - public string Name + public string Name => "System Temperature"; + + public System.Drawing.Icon Icon => Resources.ApplicationIcon; + + public void ShowSettings() { - get { return "System Temperature"; } } - public System.Drawing.Icon Icon + public void Refresh() { - get { return Resources.ApplicationIcon; } + Update(); } + public bool HasSettingsMenu => false; + public bool HasRefreshMenu => true; + public string WindowSettings { - get - { - return Settings.Default.WindowSettings; - } + get => Settings.Default.WindowSettings; set { Settings.Default.WindowSettings = value;