Fixed some hardware sorting issue in the gadget. Hardware with the same type and name would be added to the same section.
1.1 --- a/GUI/SensorGadget.cs Mon Sep 13 22:34:08 2010 +0000
1.2 +++ b/GUI/SensorGadget.cs Mon Sep 13 22:55:25 2010 +0000
1.3 @@ -486,7 +486,7 @@
1.4 if (x.HardwareType != y.HardwareType)
1.5 return x.HardwareType.CompareTo(y.HardwareType);
1.6
1.7 - return x.Name.CompareTo(y.Name);
1.8 + return x.Identifier.CompareTo(y.Identifier);
1.9 }
1.10 }
1.11 }
2.1 --- a/Hardware/Identifier.cs Mon Sep 13 22:34:08 2010 +0000
2.2 +++ b/Hardware/Identifier.cs Mon Sep 13 22:55:25 2010 +0000
2.3 @@ -101,8 +101,8 @@
2.4 }
2.5
2.6 public static bool operator ==(Identifier id1, Identifier id2) {
2.7 - if (id1 == null)
2.8 - return id2 == null;
2.9 + if (id1.Equals(null))
2.10 + return id2.Equals(null);
2.11 else
2.12 return id1.Equals(id2);
2.13 }