Add support for battery monitoring (#612)

Thanks to @EMN-CSharp.
This commit is contained in:
EMN-CSharp
2022-02-07 17:05:36 +01:00
committed by GitHub
parent 0ed564e7c6
commit 5152b435fc
19 changed files with 844 additions and 149 deletions
+32 -22
View File
@@ -1,7 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyright (C) LibreHardwareMonitor and Contributors.
// Partial Copyright (C) Michael Möller <mmoeller@openhardwaremonitor.org> and Contributors.
// Partial Copyright (C) Michael Möller <mmoeller@openhardwaremonitor.org> and Contributors.
// All Rights Reserved.
namespace LibreHardwareMonitor.UI
@@ -59,6 +59,7 @@ namespace LibreHardwareMonitor.UI
this.fanControllerMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hddMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.nicMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.psuMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuItem6 = new System.Windows.Forms.ToolStripSeparator();
this.exitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -125,6 +126,7 @@ namespace LibreHardwareMonitor.UI
this.timer = new System.Windows.Forms.Timer(this.components);
this.splitContainer = new LibreHardwareMonitor.UI.SplitContainerAdv();
this.treeView = new Aga.Controls.Tree.TreeViewAdv();
this.batteryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.psuMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.backgroundUpdater = new System.ComponentModel.BackgroundWorker();
this.mainMenu.SuspendLayout();
@@ -240,19 +242,19 @@ namespace LibreHardwareMonitor.UI
// saveReportMenuItem
//
this.saveReportMenuItem.Name = "saveReportMenuItem";
this.saveReportMenuItem.Size = new System.Drawing.Size(145, 22);
this.saveReportMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveReportMenuItem.Text = "Save Report...";
this.saveReportMenuItem.Click += new System.EventHandler(this.SaveReportMenuItem_Click);
//
// MenuItem2
//
this.MenuItem2.Name = "MenuItem2";
this.MenuItem2.Size = new System.Drawing.Size(142, 6);
this.MenuItem2.Size = new System.Drawing.Size(177, 6);
//
// resetMenuItem
//
this.resetMenuItem.Name = "resetMenuItem";
this.resetMenuItem.Size = new System.Drawing.Size(145, 22);
this.resetMenuItem.Size = new System.Drawing.Size(180, 22);
this.resetMenuItem.Text = "Reset";
this.resetMenuItem.Click += new System.EventHandler(this.ResetClick);
//
@@ -266,62 +268,69 @@ namespace LibreHardwareMonitor.UI
this.fanControllerMenuItem,
this.hddMenuItem,
this.nicMenuItem,
this.psuMenuItem});
this.psuMenuItem,
this.batteryMenuItem});
this.menuItem5.Name = "menuItem5";
this.menuItem5.Size = new System.Drawing.Size(145, 22);
this.menuItem5.Size = new System.Drawing.Size(180, 22);
this.menuItem5.Text = "Hardware";
//
// mainboardMenuItem
//
this.mainboardMenuItem.Name = "mainboardMenuItem";
this.mainboardMenuItem.Size = new System.Drawing.Size(160, 22);
this.mainboardMenuItem.Size = new System.Drawing.Size(180, 22);
this.mainboardMenuItem.Text = "Motherboard";
//
// cpuMenuItem
//
this.cpuMenuItem.Name = "cpuMenuItem";
this.cpuMenuItem.Size = new System.Drawing.Size(160, 22);
this.cpuMenuItem.Size = new System.Drawing.Size(180, 22);
this.cpuMenuItem.Text = "CPU";
//
// ramMenuItem
//
this.ramMenuItem.Name = "ramMenuItem";
this.ramMenuItem.Size = new System.Drawing.Size(160, 22);
this.ramMenuItem.Size = new System.Drawing.Size(180, 22);
this.ramMenuItem.Text = "RAM";
//
// gpuMenuItem
//
this.gpuMenuItem.Name = "gpuMenuItem";
this.gpuMenuItem.Size = new System.Drawing.Size(160, 22);
this.gpuMenuItem.Size = new System.Drawing.Size(180, 22);
this.gpuMenuItem.Text = "GPU";
//
// fanControllerMenuItem
//
this.fanControllerMenuItem.Name = "fanControllerMenuItem";
this.fanControllerMenuItem.Size = new System.Drawing.Size(160, 22);
this.fanControllerMenuItem.Size = new System.Drawing.Size(180, 22);
this.fanControllerMenuItem.Text = "Fan Controllers";
//
// hddMenuItem
//
this.hddMenuItem.Name = "hddMenuItem";
this.hddMenuItem.Size = new System.Drawing.Size(160, 22);
this.hddMenuItem.Size = new System.Drawing.Size(180, 22);
this.hddMenuItem.Text = "Hard Disk Drives";
//
// nicMenuItem
//
this.nicMenuItem.Name = "nicMenuItem";
this.nicMenuItem.Size = new System.Drawing.Size(160, 22);
this.nicMenuItem.Size = new System.Drawing.Size(180, 22);
this.nicMenuItem.Text = "Network";
//
// psuMenuItem
//
this.psuMenuItem.Name = "psuMenuItem";
this.psuMenuItem.Size = new System.Drawing.Size(180, 22);
this.psuMenuItem.Text = "Power supplies";
//
// menuItem6
//
this.menuItem6.Name = "menuItem6";
this.menuItem6.Size = new System.Drawing.Size(142, 6);
this.menuItem6.Size = new System.Drawing.Size(177, 6);
//
// exitMenuItem
//
this.exitMenuItem.Name = "exitMenuItem";
this.exitMenuItem.Size = new System.Drawing.Size(145, 22);
this.exitMenuItem.Size = new System.Drawing.Size(180, 22);
this.exitMenuItem.Text = "Exit";
this.exitMenuItem.Click += new System.EventHandler(this.ExitClick);
//
@@ -387,19 +396,19 @@ namespace LibreHardwareMonitor.UI
// valueMenuItem
//
this.valueMenuItem.Name = "valueMenuItem";
this.valueMenuItem.Size = new System.Drawing.Size(102, 22);
this.valueMenuItem.Size = new System.Drawing.Size(180, 22);
this.valueMenuItem.Text = "Value";
//
// minMenuItem
//
this.minMenuItem.Name = "minMenuItem";
this.minMenuItem.Size = new System.Drawing.Size(102, 22);
this.minMenuItem.Size = new System.Drawing.Size(180, 22);
this.minMenuItem.Text = "Min";
//
// maxMenuItem
//
this.maxMenuItem.Name = "maxMenuItem";
this.maxMenuItem.Size = new System.Drawing.Size(102, 22);
this.maxMenuItem.Size = new System.Drawing.Size(180, 22);
this.maxMenuItem.Text = "Max";
//
// optionsMenuItem
@@ -847,11 +856,11 @@ namespace LibreHardwareMonitor.UI
this.treeView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TreeView_MouseMove);
this.treeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.TreeView_MouseUp);
//
// psuMenuItem
// batteryMenuItem
//
this.psuMenuItem.Name = "psuMenuItem";
this.psuMenuItem.Size = new System.Drawing.Size(180, 22);
this.psuMenuItem.Text = "Power supplies";
this.batteryMenuItem.Name = "batteryMenuItem";
this.batteryMenuItem.Size = new System.Drawing.Size(180, 22);
this.batteryMenuItem.Text = "Batteries";
//
// MainForm
//
@@ -970,6 +979,7 @@ namespace LibreHardwareMonitor.UI
private ToolStripRadioButtonMenuItem timeWindow24hMenuItem;
private System.Windows.Forms.ToolStripMenuItem authWebServerMenuItem;
private System.Windows.Forms.ToolStripMenuItem psuMenuItem;
private System.Windows.Forms.ToolStripMenuItem batteryMenuItem;
private System.ComponentModel.BackgroundWorker backgroundUpdater;
}
}