1.1 --- a/Hardware/Sensor.cs Sun Aug 08 13:57:26 2010 +0000
1.2 +++ b/Hardware/Sensor.cs Thu Aug 12 20:53:27 2010 +0000
1.3 @@ -37,6 +37,7 @@
1.4
1.5 using System;
1.6 using System.Collections.Generic;
1.7 +using System.Globalization;
1.8 using OpenHardwareMonitor.Collections;
1.9
1.10 namespace OpenHardwareMonitor.Hardware {
1.11 @@ -88,7 +89,7 @@
1.12
1.13 this.settings = settings;
1.14 this.defaultName = name;
1.15 - this.name = settings.Get(
1.16 + this.name = settings.GetValue(
1.17 new Identifier(Identifier, "name").ToString(), name);
1.18 }
1.19
1.20 @@ -102,8 +103,9 @@
1.21
1.22 public Identifier Identifier {
1.23 get {
1.24 - return new Identifier(hardware.Identifier,
1.25 - sensorType.ToString().ToLower(), index.ToString());
1.26 + return new Identifier(hardware.Identifier,
1.27 + sensorType.ToString().ToLowerInvariant(),
1.28 + index.ToString(CultureInfo.InvariantCulture));
1.29 }
1.30 }
1.31
1.32 @@ -116,7 +118,7 @@
1.33 name = value;
1.34 else
1.35 name = defaultName;
1.36 - settings.Set(new Identifier(Identifier, "name").ToString(), name);
1.37 + settings.SetValue(new Identifier(Identifier, "name").ToString(), name);
1.38 }
1.39 }
1.40
1.41 @@ -175,7 +177,8 @@
1.42 }
1.43
1.44 public void Accept(IVisitor visitor) {
1.45 - visitor.VisitSensor(this);
1.46 + if (visitor != null)
1.47 + visitor.VisitSensor(this);
1.48 }
1.49
1.50 public void Traverse(IVisitor visitor) {