mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-31 06:15:08 +00:00
Refactored the hardware code and added the visitor pattern for operations on the computer/hardware/sensor/parameter tree.
This commit is contained in:
@@ -60,6 +60,8 @@ namespace OpenHardwareMonitor.GUI {
|
||||
private SensorSystemTray sensorSystemTray;
|
||||
private NotifyIcon notifyIcon;
|
||||
private StartupManager startupManager = new StartupManager();
|
||||
private SensorProperties sensorProperties = new SensorProperties();
|
||||
private UpdateVisitor updateVisitor = new UpdateVisitor();
|
||||
|
||||
public MainForm() {
|
||||
InitializeComponent();
|
||||
@@ -241,7 +243,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
}
|
||||
|
||||
private void timer_Tick(object sender, EventArgs e) {
|
||||
computer.Update();
|
||||
computer.Accept(updateVisitor);
|
||||
treeView.Invalidate();
|
||||
plotPanel.Invalidate();
|
||||
sensorSystemTray.Redraw();
|
||||
|
Reference in New Issue
Block a user