From 14d1e5e14f5eafcea37778d167c5d36d6593ca39 Mon Sep 17 00:00:00 2001 From: Darren Ohonba - Evans Date: Fri, 24 May 2024 00:33:50 +0100 Subject: [PATCH] tweak. --- AsusFanControlGUI/Form1.Designer.cs | 2 +- AsusFanControlGUI/Form1.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AsusFanControlGUI/Form1.Designer.cs b/AsusFanControlGUI/Form1.Designer.cs index a6c8f26..c8fe912 100644 --- a/AsusFanControlGUI/Form1.Designer.cs +++ b/AsusFanControlGUI/Form1.Designer.cs @@ -372,7 +372,7 @@ // this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1; this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); - this.notifyIcon1.Text = "Hello"; + this.notifyIcon1.Text = "AsusFanControlEnhanced"; this.notifyIcon1.Visible = true; this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick); // diff --git a/AsusFanControlGUI/Form1.cs b/AsusFanControlGUI/Form1.cs index 75f4641..2220c42 100644 --- a/AsusFanControlGUI/Form1.cs +++ b/AsusFanControlGUI/Form1.cs @@ -150,6 +150,7 @@ namespace AsusFanControlGUI Properties.Settings.Default.fanControlState = "Off"; Properties.Settings.Default.Save(); + notifyIcon1.Text = $"AsusFanControlEnhanced - Off"; setFanSpeed(0, null); } } @@ -213,6 +214,9 @@ namespace AsusFanControlGUI label5.Text = trackBarFanSpeedValue.ToString() + "% Fan"; Console.WriteLine($"Setting speed to: {(int)trackBarFanSpeedValue}"); label3.Text = $"Setting speed to: {(int)trackBarFanSpeedValue}%";// (Stamp: {rnd.Next(1000)})"; + notifyIcon1.Text = $"AsusFanControlEnhanced - Fan Speed: {(int)trackBarFanSpeedValue}%"; + if ((int)trackBarFanSpeedValue == 0) + notifyIcon1.Text = $"AsusFanControlEnhanced - Off"; setFanSpeed((int)trackBarFanSpeedValue, fanControl.Checked); } @@ -502,6 +506,7 @@ namespace AsusFanControlGUI // Temperature is outside the range, yield control to the system. label3.Text = "Control yeilded to system when temprature is outside range."; Console.WriteLine("Temperature is outside the range, yield control to the system."); + notifyIcon1.Text = $"AsusFanControlEnhanced - Off"; return 0; }else { @@ -539,6 +544,7 @@ namespace AsusFanControlGUI if (fanSpeed != 0) { label3.Text = $"Set fan speed to {(int)fanSpeed}%, current temp: {currentTemp}°C";// (Stamp: {rnd.Next(1000)})"; + notifyIcon1.Text = $"AsusFanControlEnhanced - Current Temp: {(int)currentTemp}°C - Fan Speed: {(int)fanSpeed}%"; } lastTemperature = (int)currentTemp;