Implemented storage update interval at the UI side (#1706)
* Minor refactoring for #1699 * Implemented storage update interval for the UI * Revert "Implemented storage update interval for the UI" This reverts commit 977ff2f5518d420e35cadad17054f4e69c260df1. * Revert "Minor refactoring for #1699" This reverts commit 923f6d6f636a2a10ff44b8c23f84e8985ccbf667. * Made update interval configurable for storage devices * Changed label text m to min for consistency * Revised 8e6c669 as requested * ATA Update interval defaults to 1s in the UI * Simplified storage update interval menu
This commit is contained in:
@@ -15,6 +15,7 @@ using System.Windows.Forms;
|
||||
using Aga.Controls.Tree;
|
||||
using Aga.Controls.Tree.NodeControls;
|
||||
using LibreHardwareMonitor.Hardware;
|
||||
using LibreHardwareMonitor.Hardware.Storage;
|
||||
using LibreHardwareMonitor.UI.Themes;
|
||||
using LibreHardwareMonitor.Utilities;
|
||||
using LibreHardwareMonitor.Wmi;
|
||||
@@ -30,6 +31,7 @@ public sealed partial class MainForm : Form
|
||||
private readonly Logger _logger;
|
||||
private readonly UserRadioGroup _loggingInterval;
|
||||
private readonly UserRadioGroup _updateInterval;
|
||||
private readonly UserOption _throttleAtaUpdate;
|
||||
private readonly UserOption _logSensors;
|
||||
private readonly UserOption _minimizeOnClose;
|
||||
private readonly UserOption _minimizeToTray;
|
||||
@@ -374,6 +376,21 @@ public sealed partial class MainForm : Form
|
||||
}
|
||||
};
|
||||
|
||||
_throttleAtaUpdate = new UserOption("throttleAtaUpdateMenuItem", false, throttleAtaUpdateMenuItem, _settings);
|
||||
_throttleAtaUpdate.Changed += (sender, e) =>
|
||||
{
|
||||
switch (_throttleAtaUpdate.Value)
|
||||
{
|
||||
case true:
|
||||
AtaStorage.ThrottleInterval = TimeSpan.FromSeconds(30);
|
||||
break;
|
||||
|
||||
case false:
|
||||
AtaStorage.ThrottleInterval = TimeSpan.Zero;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
_sensorValuesTimeWindow = new UserRadioGroup("sensorValuesTimeWindow",
|
||||
10,
|
||||
new[]
|
||||
|
||||
Reference in New Issue
Block a user