Update DiskInfoToolkit & add Force Drive Wakeup option (#2245)
* Update DiskInfoToolkit. Add option for Force Drive Wakeup. * Change default value * Replace name
This commit is contained in:
+9
@@ -102,6 +102,7 @@ namespace LibreHardwareMonitor.UI
|
||||
this.splitPanelFixedSensorScalingMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
|
||||
this.logSeparatorMenuItem = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.logSensorsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.forceDriveWakeupItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fileRotationMethod = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.perSessionFileRotationMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
|
||||
this.dailyFileRotationMenuItem = new LibreHardwareMonitor.UI.ToolStripRadioButtonMenuItem();
|
||||
@@ -485,6 +486,7 @@ namespace LibreHardwareMonitor.UI
|
||||
this.splitPlotPanelScalingMenuItem,
|
||||
this.logSeparatorMenuItem,
|
||||
this.logSensorsMenuItem,
|
||||
this.forceDriveWakeupItem,
|
||||
this.loggingIntervalMenuItem,
|
||||
this.updateIntervalMenuItem,
|
||||
this.fileRotationMethod,
|
||||
@@ -667,6 +669,12 @@ namespace LibreHardwareMonitor.UI
|
||||
this.logSensorsMenuItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.logSensorsMenuItem.Text = "Log Sensors";
|
||||
//
|
||||
// forceDriveWakeupItem
|
||||
//
|
||||
this.forceDriveWakeupItem.Name = "forceDriveWakeupItem";
|
||||
this.forceDriveWakeupItem.Size = new System.Drawing.Size(221, 22);
|
||||
this.forceDriveWakeupItem.Text = "Force Drive Wakeup";
|
||||
//
|
||||
// fileRotationMethod
|
||||
//
|
||||
this.fileRotationMethod.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -1188,6 +1196,7 @@ namespace LibreHardwareMonitor.UI
|
||||
private System.Windows.Forms.ToolStripMenuItem fanControllerMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem ramMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem logSensorsMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem forceDriveWakeupItem;
|
||||
private System.Windows.Forms.ToolStripSeparator logSeparatorMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem loggingIntervalMenuItem;
|
||||
private ToolStripRadioButtonMenuItem log1sMenuItem;
|
||||
|
||||
@@ -33,6 +33,7 @@ public sealed partial class MainForm : Form
|
||||
private readonly UserRadioGroup _updateInterval;
|
||||
private readonly UserOption _throttleAtaUpdate;
|
||||
private readonly UserOption _logSensors;
|
||||
private readonly UserOption _forceDriveWakeup;
|
||||
private readonly UserOption _minimizeOnClose;
|
||||
private readonly UserOption _minimizeToTray;
|
||||
private readonly PlotPanel _plotPanel;
|
||||
@@ -286,10 +287,21 @@ public sealed partial class MainForm : Form
|
||||
|
||||
_showGadget = new UserOption("gadgetMenuItem", false, gadgetMenuItem, _settings);
|
||||
|
||||
_forceDriveWakeup = new UserOption("forceDriveWakeupItem", false, forceDriveWakeupItem, _settings);
|
||||
_forceDriveWakeup.Changed += delegate
|
||||
{
|
||||
_computer.Hardware
|
||||
.OfType<StorageDevice>()
|
||||
.ToList()
|
||||
.ForEach(sd =>
|
||||
{
|
||||
sd.Storage.ForceWakeup = _forceDriveWakeup.Value;
|
||||
});
|
||||
};
|
||||
|
||||
// Prevent Menu From Closing When UnClicking Hardware Items
|
||||
menuItemFileHardware.DropDown.Closing += StopFileHardwareMenuFromClosing;
|
||||
|
||||
|
||||
_showGadget.Changed += delegate
|
||||
{
|
||||
if (_gadget != null)
|
||||
|
||||
Reference in New Issue
Block a user