mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added Battery Charge
This commit is contained in:
@@ -56,6 +56,7 @@ namespace GHelper
|
|||||||
break;
|
break;
|
||||||
case "fne":
|
case "fne":
|
||||||
customActions[""] = "Calculator";
|
customActions[""] = "Calculator";
|
||||||
|
customActions["ghelper"] = Properties.Strings.OpenGHelper;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,13 @@ public static class HardwareControl
|
|||||||
public static float? cpuTemp = -1;
|
public static float? cpuTemp = -1;
|
||||||
public static decimal? batteryRate = 0;
|
public static decimal? batteryRate = 0;
|
||||||
public static decimal batteryHealth = -1;
|
public static decimal batteryHealth = -1;
|
||||||
|
public static decimal batteryCapacity = -1;
|
||||||
|
|
||||||
public static decimal? designCapacity;
|
public static decimal? designCapacity;
|
||||||
public static decimal? fullCapacity;
|
public static decimal? fullCapacity;
|
||||||
|
public static decimal? chargeCapacity;
|
||||||
|
|
||||||
|
|
||||||
public static int? gpuTemp = null;
|
public static int? gpuTemp = null;
|
||||||
|
|
||||||
public static string? cpuFan;
|
public static string? cpuFan;
|
||||||
@@ -106,9 +111,12 @@ public static class HardwareControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static decimal GetBatteryRate()
|
public static void GetBatteryStatus()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
batteryRate = 0;
|
||||||
|
chargeCapacity = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ManagementScope scope = new ManagementScope("root\\WMI");
|
ManagementScope scope = new ManagementScope("root\\WMI");
|
||||||
@@ -117,26 +125,29 @@ public static class HardwareControl
|
|||||||
using ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
|
using ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
|
||||||
foreach (ManagementObject obj in searcher.Get().Cast<ManagementObject>())
|
foreach (ManagementObject obj in searcher.Get().Cast<ManagementObject>())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
chargeCapacity = Convert.ToDecimal(obj["RemainingCapacity"]);
|
||||||
|
|
||||||
decimal chargeRate = Convert.ToDecimal(obj["ChargeRate"]);
|
decimal chargeRate = Convert.ToDecimal(obj["ChargeRate"]);
|
||||||
decimal dischargeRate = Convert.ToDecimal(obj["DischargeRate"]);
|
decimal dischargeRate = Convert.ToDecimal(obj["DischargeRate"]);
|
||||||
|
|
||||||
if (chargeRate > 0)
|
if (chargeRate > 0)
|
||||||
return chargeRate;
|
batteryRate = chargeRate / 1000;
|
||||||
else
|
else
|
||||||
return -dischargeRate;
|
batteryRate = -dischargeRate / 1000;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.WriteLine("Discharge Reading: " + ex.Message);
|
Logger.WriteLine("Discharge Reading: " + ex.Message);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public static void ReadFullChargeCapacity()
|
public static void ReadFullChargeCapacity()
|
||||||
{
|
{
|
||||||
|
if (fullCapacity > 0) return;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -159,6 +170,8 @@ public static class HardwareControl
|
|||||||
|
|
||||||
public static void ReadDesignCapacity()
|
public static void ReadDesignCapacity()
|
||||||
{
|
{
|
||||||
|
if (designCapacity > 0) return;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ManagementScope scope = new ManagementScope("root\\WMI");
|
ManagementScope scope = new ManagementScope("root\\WMI");
|
||||||
@@ -253,7 +266,15 @@ public static class HardwareControl
|
|||||||
if (gpuTemp is null || gpuTemp < 0)
|
if (gpuTemp is null || gpuTemp < 0)
|
||||||
gpuTemp = Program.acpi.DeviceGet(AsusACPI.Temp_GPU);
|
gpuTemp = Program.acpi.DeviceGet(AsusACPI.Temp_GPU);
|
||||||
|
|
||||||
batteryRate = GetBatteryRate() / 1000;
|
ReadFullChargeCapacity();
|
||||||
|
GetBatteryStatus();
|
||||||
|
|
||||||
|
if (fullCapacity > 0 && chargeCapacity > 0)
|
||||||
|
{
|
||||||
|
batteryCapacity = Math.Min(100, ((decimal)chargeCapacity / (decimal)fullCapacity) * 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsUsedGPU(int threshold = 10)
|
public static bool IsUsedGPU(int threshold = 10)
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ namespace GHelper.Input
|
|||||||
break;
|
break;
|
||||||
case 107: // FN+F10
|
case 107: // FN+F10
|
||||||
AsusUSB.TouchpadToggle();
|
AsusUSB.TouchpadToggle();
|
||||||
Thread.Sleep(50);
|
Thread.Sleep(200);
|
||||||
Program.toast.RunToast(GetTouchpadState() ? "On" : "Off", ToastIcon.Touchpad);
|
Program.toast.RunToast(GetTouchpadState() ? "On" : "Off", ToastIcon.Touchpad);
|
||||||
break;
|
break;
|
||||||
case 108: // FN+F11
|
case 108: // FN+F11
|
||||||
|
|||||||
15
app/Properties/Strings.Designer.cs
generated
15
app/Properties/Strings.Designer.cs
generated
@@ -429,6 +429,15 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Charge.
|
||||||
|
/// </summary>
|
||||||
|
internal static string BatteryCharge {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BatteryCharge", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Battery Charge Limit.
|
/// Looks up a localized string similar to Battery Charge Limit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -437,7 +446,7 @@ namespace GHelper.Properties {
|
|||||||
return ResourceManager.GetString("BatteryChargeLimit", resourceCulture);
|
return ResourceManager.GetString("BatteryChargeLimit", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Battery Health.
|
/// Looks up a localized string similar to Battery Health.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1150,7 +1159,7 @@ namespace GHelper.Properties {
|
|||||||
return ResourceManager.GetString("NoNewUpdates", resourceCulture);
|
return ResourceManager.GetString("NoNewUpdates", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Not Connected.
|
/// Looks up a localized string similar to Not Connected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1456,7 +1465,7 @@ namespace GHelper.Properties {
|
|||||||
return ResourceManager.GetString("ToggleAura", resourceCulture);
|
return ResourceManager.GetString("ToggleAura", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Auto Toggle Clamshell Mode.
|
/// Looks up a localized string similar to Auto Toggle Clamshell Mode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -240,6 +240,9 @@
|
|||||||
<data name="Balanced" xml:space="preserve">
|
<data name="Balanced" xml:space="preserve">
|
||||||
<value>Balanced</value>
|
<value>Balanced</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BatteryCharge" xml:space="preserve">
|
||||||
|
<value>Charge</value>
|
||||||
|
</data>
|
||||||
<data name="BatteryChargeLimit" xml:space="preserve">
|
<data name="BatteryChargeLimit" xml:space="preserve">
|
||||||
<value>Battery Charge Limit</value>
|
<value>Battery Charge Limit</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
92
app/Settings.Designer.cs
generated
92
app/Settings.Designer.cs
generated
@@ -47,8 +47,9 @@ namespace GHelper
|
|||||||
labelBatteryTitle = new Label();
|
labelBatteryTitle = new Label();
|
||||||
panelFooter = new Panel();
|
panelFooter = new Panel();
|
||||||
tableButtons = new TableLayoutPanel();
|
tableButtons = new TableLayoutPanel();
|
||||||
buttonUpdates = new RButton();
|
labelVersion = new Label();
|
||||||
buttonQuit = new RButton();
|
buttonQuit = new RButton();
|
||||||
|
buttonUpdates = new RButton();
|
||||||
checkStartup = new CheckBox();
|
checkStartup = new CheckBox();
|
||||||
panelPerformance = new Panel();
|
panelPerformance = new Panel();
|
||||||
tablePerf = new TableLayoutPanel();
|
tablePerf = new TableLayoutPanel();
|
||||||
@@ -95,8 +96,8 @@ namespace GHelper
|
|||||||
panelKeyboardTitle = new Panel();
|
panelKeyboardTitle = new Panel();
|
||||||
pictureKeyboard = new PictureBox();
|
pictureKeyboard = new PictureBox();
|
||||||
labelKeyboard = new Label();
|
labelKeyboard = new Label();
|
||||||
labelVersion = new Label();
|
|
||||||
panelVersion = new Panel();
|
panelVersion = new Panel();
|
||||||
|
labelCharge = new Label();
|
||||||
panelPeripherals = new Panel();
|
panelPeripherals = new Panel();
|
||||||
tableLayoutPeripherals = new TableLayoutPanel();
|
tableLayoutPeripherals = new TableLayoutPanel();
|
||||||
buttonPeripheral3 = new RButton();
|
buttonPeripheral3 = new RButton();
|
||||||
@@ -365,8 +366,9 @@ namespace GHelper
|
|||||||
tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F));
|
tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F));
|
||||||
tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F));
|
tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F));
|
||||||
tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 27F));
|
tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 27F));
|
||||||
tableButtons.Controls.Add(buttonUpdates, 0, 0);
|
tableButtons.Controls.Add(labelVersion, 0, 0);
|
||||||
tableButtons.Controls.Add(buttonQuit, 2, 0);
|
tableButtons.Controls.Add(buttonQuit, 2, 0);
|
||||||
|
tableButtons.Controls.Add(buttonUpdates, 1, 0);
|
||||||
tableButtons.Dock = DockStyle.Top;
|
tableButtons.Dock = DockStyle.Top;
|
||||||
tableButtons.Location = new Point(20, 20);
|
tableButtons.Location = new Point(20, 20);
|
||||||
tableButtons.Margin = new Padding(4);
|
tableButtons.Margin = new Padding(4);
|
||||||
@@ -376,26 +378,20 @@ namespace GHelper
|
|||||||
tableButtons.Size = new Size(787, 60);
|
tableButtons.Size = new Size(787, 60);
|
||||||
tableButtons.TabIndex = 25;
|
tableButtons.TabIndex = 25;
|
||||||
//
|
//
|
||||||
// buttonUpdates
|
// labelVersion
|
||||||
//
|
//
|
||||||
buttonUpdates.AccessibleName = "BIOS and Driver Updates";
|
labelVersion.Cursor = Cursors.Hand;
|
||||||
buttonUpdates.Activated = false;
|
labelVersion.Dock = DockStyle.Fill;
|
||||||
buttonUpdates.BackColor = SystemColors.ControlLight;
|
labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline, GraphicsUnit.Point);
|
||||||
buttonUpdates.BorderColor = Color.Transparent;
|
labelVersion.ForeColor = SystemColors.ControlDark;
|
||||||
buttonUpdates.BorderRadius = 2;
|
labelVersion.Location = new Point(0, 0);
|
||||||
buttonUpdates.Dock = DockStyle.Top;
|
labelVersion.Margin = new Padding(0);
|
||||||
buttonUpdates.FlatStyle = FlatStyle.Flat;
|
labelVersion.Name = "labelVersion";
|
||||||
buttonUpdates.Image = Properties.Resources.icons8_software_32_white;
|
labelVersion.Padding = new Padding(5);
|
||||||
buttonUpdates.ImageAlign = ContentAlignment.MiddleRight;
|
labelVersion.Size = new Size(262, 60);
|
||||||
buttonUpdates.Location = new Point(4, 6);
|
labelVersion.TabIndex = 37;
|
||||||
buttonUpdates.Margin = new Padding(4, 6, 4, 6);
|
labelVersion.Text = "v.0";
|
||||||
buttonUpdates.Name = "buttonUpdates";
|
labelVersion.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
buttonUpdates.Secondary = true;
|
|
||||||
buttonUpdates.Size = new Size(254, 48);
|
|
||||||
buttonUpdates.TabIndex = 24;
|
|
||||||
buttonUpdates.Text = "Updates";
|
|
||||||
buttonUpdates.TextImageRelation = TextImageRelation.ImageBeforeText;
|
|
||||||
buttonUpdates.UseVisualStyleBackColor = false;
|
|
||||||
//
|
//
|
||||||
// buttonQuit
|
// buttonQuit
|
||||||
//
|
//
|
||||||
@@ -418,6 +414,27 @@ namespace GHelper
|
|||||||
buttonQuit.TextImageRelation = TextImageRelation.ImageBeforeText;
|
buttonQuit.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||||
buttonQuit.UseVisualStyleBackColor = false;
|
buttonQuit.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
|
// buttonUpdates
|
||||||
|
//
|
||||||
|
buttonUpdates.AccessibleName = "BIOS and Driver Updates";
|
||||||
|
buttonUpdates.Activated = false;
|
||||||
|
buttonUpdates.BackColor = SystemColors.ControlLight;
|
||||||
|
buttonUpdates.BorderColor = Color.Transparent;
|
||||||
|
buttonUpdates.BorderRadius = 2;
|
||||||
|
buttonUpdates.Dock = DockStyle.Top;
|
||||||
|
buttonUpdates.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonUpdates.Image = Properties.Resources.icons8_software_32_white;
|
||||||
|
buttonUpdates.ImageAlign = ContentAlignment.MiddleRight;
|
||||||
|
buttonUpdates.Location = new Point(266, 6);
|
||||||
|
buttonUpdates.Margin = new Padding(4, 6, 4, 6);
|
||||||
|
buttonUpdates.Name = "buttonUpdates";
|
||||||
|
buttonUpdates.Secondary = true;
|
||||||
|
buttonUpdates.Size = new Size(254, 48);
|
||||||
|
buttonUpdates.TabIndex = 24;
|
||||||
|
buttonUpdates.Text = "Updates";
|
||||||
|
buttonUpdates.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||||
|
buttonUpdates.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
// checkStartup
|
// checkStartup
|
||||||
//
|
//
|
||||||
checkStartup.AutoSize = true;
|
checkStartup.AutoSize = true;
|
||||||
@@ -1169,23 +1186,9 @@ namespace GHelper
|
|||||||
labelKeyboard.TabIndex = 34;
|
labelKeyboard.TabIndex = 34;
|
||||||
labelKeyboard.Text = "Laptop Keyboard";
|
labelKeyboard.Text = "Laptop Keyboard";
|
||||||
//
|
//
|
||||||
// labelVersion
|
|
||||||
//
|
|
||||||
labelVersion.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
|
||||||
labelVersion.Cursor = Cursors.Hand;
|
|
||||||
labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline, GraphicsUnit.Point);
|
|
||||||
labelVersion.ForeColor = SystemColors.ControlDark;
|
|
||||||
labelVersion.Location = new Point(502, 13);
|
|
||||||
labelVersion.Margin = new Padding(11, 0, 11, 0);
|
|
||||||
labelVersion.Name = "labelVersion";
|
|
||||||
labelVersion.Size = new Size(300, 32);
|
|
||||||
labelVersion.TabIndex = 37;
|
|
||||||
labelVersion.Text = "v.0";
|
|
||||||
labelVersion.TextAlign = ContentAlignment.TopRight;
|
|
||||||
//
|
|
||||||
// panelVersion
|
// panelVersion
|
||||||
//
|
//
|
||||||
panelVersion.Controls.Add(labelVersion);
|
panelVersion.Controls.Add(labelCharge);
|
||||||
panelVersion.Controls.Add(checkStartup);
|
panelVersion.Controls.Add(checkStartup);
|
||||||
panelVersion.Dock = DockStyle.Top;
|
panelVersion.Dock = DockStyle.Top;
|
||||||
panelVersion.Location = new Point(11, 1379);
|
panelVersion.Location = new Point(11, 1379);
|
||||||
@@ -1194,6 +1197,18 @@ namespace GHelper
|
|||||||
panelVersion.Size = new Size(827, 56);
|
panelVersion.Size = new Size(827, 56);
|
||||||
panelVersion.TabIndex = 6;
|
panelVersion.TabIndex = 6;
|
||||||
//
|
//
|
||||||
|
// labelCharge
|
||||||
|
//
|
||||||
|
labelCharge.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
labelCharge.ForeColor = SystemColors.ControlDark;
|
||||||
|
labelCharge.Location = new Point(476, 10);
|
||||||
|
labelCharge.Margin = new Padding(8, 0, 8, 0);
|
||||||
|
labelCharge.Name = "labelCharge";
|
||||||
|
labelCharge.Size = new Size(324, 36);
|
||||||
|
labelCharge.TabIndex = 40;
|
||||||
|
labelCharge.Text = " ";
|
||||||
|
labelCharge.TextAlign = ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
// panelPeripherals
|
// panelPeripherals
|
||||||
//
|
//
|
||||||
panelPeripherals.AutoSize = true;
|
panelPeripherals.AutoSize = true;
|
||||||
@@ -1482,7 +1497,6 @@ namespace GHelper
|
|||||||
private Label labelVersion;
|
private Label labelVersion;
|
||||||
private RButton buttonStopGPU;
|
private RButton buttonStopGPU;
|
||||||
private TableLayoutPanel tableButtons;
|
private TableLayoutPanel tableButtons;
|
||||||
private RButton buttonUpdates;
|
|
||||||
private Panel panelPeripherals;
|
private Panel panelPeripherals;
|
||||||
private TableLayoutPanel tableLayoutPeripherals;
|
private TableLayoutPanel tableLayoutPeripherals;
|
||||||
private Panel panelPeripheralsTile;
|
private Panel panelPeripheralsTile;
|
||||||
@@ -1492,5 +1506,7 @@ namespace GHelper
|
|||||||
private RButton buttonPeripheral3;
|
private RButton buttonPeripheral3;
|
||||||
private RButton buttonPeripheral1;
|
private RButton buttonPeripheral1;
|
||||||
private RButton buttonKeyboard;
|
private RButton buttonKeyboard;
|
||||||
|
private RButton buttonUpdates;
|
||||||
|
private Label labelCharge;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -178,9 +178,13 @@ namespace GHelper
|
|||||||
sensorTimer.Elapsed += OnTimedEvent;
|
sensorTimer.Elapsed += OnTimedEvent;
|
||||||
sensorTimer.Enabled = true;
|
sensorTimer.Enabled = true;
|
||||||
|
|
||||||
|
panelBattery.MouseEnter += PanelBattery_MouseEnter;
|
||||||
|
labelCharge.MouseEnter += PanelBattery_MouseEnter;
|
||||||
labelBattery.MouseEnter += PanelBattery_MouseEnter;
|
labelBattery.MouseEnter += PanelBattery_MouseEnter;
|
||||||
labelBatteryTitle.MouseEnter += PanelBattery_MouseEnter;
|
labelBatteryTitle.MouseEnter += PanelBattery_MouseEnter;
|
||||||
|
|
||||||
|
panelBattery.MouseLeave += PanelBattery_MouseLeave;
|
||||||
|
labelCharge.MouseLeave += PanelBattery_MouseLeave;
|
||||||
labelBattery.MouseLeave += PanelBattery_MouseLeave;
|
labelBattery.MouseLeave += PanelBattery_MouseLeave;
|
||||||
labelBatteryTitle.MouseLeave += PanelBattery_MouseLeave;
|
labelBatteryTitle.MouseLeave += PanelBattery_MouseLeave;
|
||||||
|
|
||||||
@@ -229,7 +233,7 @@ namespace GHelper
|
|||||||
|
|
||||||
if (HardwareControl.batteryHealth != -1)
|
if (HardwareControl.batteryHealth != -1)
|
||||||
{
|
{
|
||||||
labelBattery.Text = Properties.Strings.BatteryHealth + ": " + Math.Round(HardwareControl.batteryHealth, 1) + "%";
|
labelCharge.Text = Properties.Strings.BatteryHealth + ": " + Math.Round(HardwareControl.batteryHealth, 1) + "%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,6 +826,7 @@ namespace GHelper
|
|||||||
string cpuTemp = "";
|
string cpuTemp = "";
|
||||||
string gpuTemp = "";
|
string gpuTemp = "";
|
||||||
string battery = "";
|
string battery = "";
|
||||||
|
string charge = "";
|
||||||
|
|
||||||
HardwareControl.ReadSensors();
|
HardwareControl.ReadSensors();
|
||||||
Task.Run((Action)PeripheralsProvider.RefreshBatteryForAllDevices);
|
Task.Run((Action)PeripheralsProvider.RefreshBatteryForAllDevices);
|
||||||
@@ -829,6 +834,9 @@ namespace GHelper
|
|||||||
if (HardwareControl.cpuTemp > 0)
|
if (HardwareControl.cpuTemp > 0)
|
||||||
cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C";
|
cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C";
|
||||||
|
|
||||||
|
if (HardwareControl.batteryCapacity > 0)
|
||||||
|
charge = Properties.Strings.BatteryCharge + ": " + Math.Round(HardwareControl.batteryCapacity, 1) + "% ";
|
||||||
|
|
||||||
if (HardwareControl.batteryRate < 0)
|
if (HardwareControl.batteryRate < 0)
|
||||||
battery = Properties.Strings.Discharging + ": " + Math.Round(-(decimal)HardwareControl.batteryRate, 1).ToString() + "W";
|
battery = Properties.Strings.Discharging + ": " + Math.Round(-(decimal)HardwareControl.batteryRate, 1).ToString() + "W";
|
||||||
else if (HardwareControl.batteryRate > 0)
|
else if (HardwareControl.batteryRate > 0)
|
||||||
@@ -847,7 +855,8 @@ namespace GHelper
|
|||||||
if (HardwareControl.midFan is not null)
|
if (HardwareControl.midFan is not null)
|
||||||
labelMidFan.Text = "Mid " + HardwareControl.midFan;
|
labelMidFan.Text = "Mid " + HardwareControl.midFan;
|
||||||
|
|
||||||
if (!batteryMouseOver) labelBattery.Text = battery;
|
labelBattery.Text = battery;
|
||||||
|
if (!batteryMouseOver) labelCharge.Text = charge;
|
||||||
});
|
});
|
||||||
|
|
||||||
string trayTip = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
|
string trayTip = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
Reference in New Issue
Block a user