# HG changeset patch # User paulwerelds # Date 1287303693 0 # Node ID 97757a798918d044b912ce5a1d58ed729dbb4f3a # Parent 1e8e0c82c1f5a119538ed00de79a8269c79da45a Small bits of refactoring. diff -r 1e8e0c82c1f5 -r 97757a798918 GUI/MainForm.cs --- a/GUI/MainForm.cs Sat Oct 16 18:26:47 2010 +0000 +++ b/GUI/MainForm.cs Sun Oct 17 08:21:33 2010 +0000 @@ -44,7 +44,7 @@ using Aga.Controls.Tree; using Aga.Controls.Tree.NodeControls; using OpenHardwareMonitor.Hardware; -using OpenHardwareMonitor.Wmi; +using OpenHardwareMonitor.WMI; namespace OpenHardwareMonitor.GUI { public partial class MainForm : Form { diff -r 1e8e0c82c1f5 -r 97757a798918 Hardware/HDD/HDD.cs --- a/Hardware/HDD/HDD.cs Sat Oct 16 18:26:47 2010 +0000 +++ b/Hardware/HDD/HDD.cs Sun Oct 17 08:21:33 2010 +0000 @@ -77,7 +77,8 @@ this.drive = drive; this.count = 0; this.lifeID = lifeID; - this.lifeSensor = new Sensor("HDD", 0, SensorType.Level, this, settings); + this.lifeSensor = new Sensor("Remaining life", 0, SensorType.Level, + this, settings); Update(); } @@ -136,7 +137,7 @@ attributes.Exists(attr => (int)attr.ID == (int)lifeID)) { lifeSensor.Value = attributes - .Find(attr => (int)attr.ID == (int)temperatureID) + .Find(attr => (int)attr.ID == (int)lifeID) .AttrValue; } } else { diff -r 1e8e0c82c1f5 -r 97757a798918 Wmi/Hardware.cs --- a/Wmi/Hardware.cs Sat Oct 16 18:26:47 2010 +0000 +++ b/Wmi/Hardware.cs Sun Oct 17 08:21:33 2010 +0000 @@ -38,7 +38,7 @@ using System.Management.Instrumentation; using OpenHardwareMonitor.Hardware; -namespace OpenHardwareMonitor.Wmi { +namespace OpenHardwareMonitor.WMI { [InstrumentationClass(InstrumentationType.Instance)] public class Hardware : IWmiObject { #region WMI Exposed diff -r 1e8e0c82c1f5 -r 97757a798918 Wmi/IWmiObject.cs --- a/Wmi/IWmiObject.cs Sat Oct 16 18:26:47 2010 +0000 +++ b/Wmi/IWmiObject.cs Sun Oct 17 08:21:33 2010 +0000 @@ -35,7 +35,7 @@ */ -namespace OpenHardwareMonitor.Wmi { +namespace OpenHardwareMonitor.WMI { interface IWmiObject { // Both of these get exposed to WMI string Name { get; } diff -r 1e8e0c82c1f5 -r 97757a798918 Wmi/Sensor.cs --- a/Wmi/Sensor.cs Sat Oct 16 18:26:47 2010 +0000 +++ b/Wmi/Sensor.cs Sun Oct 17 08:21:33 2010 +0000 @@ -37,9 +37,8 @@ using System.Management.Instrumentation; using OpenHardwareMonitor.Hardware; -using OpenHardwareMonitor.Wmi; -namespace OpenHardwareMonitor.Wmi { +namespace OpenHardwareMonitor.WMI { [InstrumentationClass(InstrumentationType.Instance)] public class Sensor : IWmiObject { private ISensor sensor; diff -r 1e8e0c82c1f5 -r 97757a798918 Wmi/WmiProvider.cs --- a/Wmi/WmiProvider.cs Sat Oct 16 18:26:47 2010 +0000 +++ b/Wmi/WmiProvider.cs Sun Oct 17 08:21:33 2010 +0000 @@ -39,14 +39,13 @@ using System.Collections.Generic; using System.Management.Instrumentation; using OpenHardwareMonitor.Hardware; -using OpenHardwareMonitor.Wmi; [assembly: Instrumented("root/OpenHardwareMonitor")] [System.ComponentModel.RunInstaller(true)] public class InstanceInstaller : DefaultManagementProjectInstaller { } -namespace OpenHardwareMonitor.Wmi { +namespace OpenHardwareMonitor.WMI { /// /// The WMI Provider. /// This class is not exposed to WMI itself.