Refactored the hardware monitoring code into a library (Issue 101).

This commit is contained in:
Michael Möller
2010-08-08 13:57:26 +00:00
parent 9f90d4063b
commit a2650ba983
59 changed files with 698 additions and 548 deletions
+3 -3
View File
@@ -62,7 +62,7 @@ namespace OpenHardwareMonitor.GUI {
private Font font;
public SensorNotifyIcon(SystemTray sensorSystemTray, ISensor sensor,
bool balloonTip)
bool balloonTip, PersistentSettings settings)
{
this.sensor = sensor;
this.notifyIcon = new NotifyIcon();
@@ -71,7 +71,7 @@ namespace OpenHardwareMonitor.GUI {
if (sensor.SensorType == SensorType.Load) {
defaultColor = Color.FromArgb(0xff, 0x70, 0x8c, 0xf1);
}
Color = Config.Get(new Identifier(sensor.Identifier,
Color = settings.Get(new Identifier(sensor.Identifier,
"traycolor").ToString(), defaultColor);
this.pen = new Pen(Color.FromArgb(96, Color.Black));
@@ -95,7 +95,7 @@ namespace OpenHardwareMonitor.GUI {
dialog.Color = Color;
if (dialog.ShowDialog() == DialogResult.OK) {
Color = dialog.Color;
Config.Set(new Identifier(sensor.Identifier,
settings.Set(new Identifier(sensor.Identifier,
"traycolor").ToString(), Color);
}
};