Refactored the hardware code and added the visitor pattern for operations on the computer/hardware/sensor/parameter tree.

This commit is contained in:
Michael Möller
2010-05-09 16:22:13 +00:00
parent a49919717e
commit 4cd9cd9125
28 changed files with 372 additions and 89 deletions

View File

@@ -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();