Small bits of refactoring.

This commit is contained in:
Paul Werelds
2010-10-17 08:21:33 +00:00
parent f7733a5112
commit cac6928f07
6 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ using System.Windows.Forms;
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 {
+3 -2
View File
@@ -77,7 +77,8 @@ namespace OpenHardwareMonitor.Hardware.HDD {
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 @@ namespace OpenHardwareMonitor.Hardware.HDD {
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 {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -35,7 +35,7 @@
*/
namespace OpenHardwareMonitor.Wmi {
namespace OpenHardwareMonitor.WMI {
interface IWmiObject {
// Both of these get exposed to WMI
string Name { get; }
+1 -2
View File
@@ -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;
+1 -2
View File
@@ -39,14 +39,13 @@ using System;
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 {
/// <summary>
/// The WMI Provider.
/// This class is not exposed to WMI itself.