Added initial support for W83627HF. Some refactoring for IHardware classes.

This commit is contained in:
Michael Möller
2010-02-07 19:53:51 +00:00
parent 37a788e7cb
commit 0060583e5b
14 changed files with 354 additions and 373 deletions

View File

@@ -43,7 +43,7 @@ using System.Text;
namespace OpenHardwareMonitor.Hardware.CPU {
public class AMD10CPU : IHardware {
public class AMD10CPU : Hardware, IHardware {
private string name;
private Image icon;
@@ -53,8 +53,6 @@ namespace OpenHardwareMonitor.Hardware.CPU {
private Sensor totalLoad;
private Sensor[] coreLoads;
private List<ISensor> active = new List<ISensor>();
private CPULoad cpuLoad;
private const ushort PCI_AMD_VENDOR_ID = 0x1022;
@@ -107,10 +105,6 @@ namespace OpenHardwareMonitor.Hardware.CPU {
get { return icon; }
}
public ISensor[] Sensors {
get { return active.ToArray(); }
}
public string GetReport() {
return null;
}
@@ -135,25 +129,5 @@ namespace OpenHardwareMonitor.Hardware.CPU {
totalLoad.Value = cpuLoad.GetTotalLoad();
}
}
private void ActivateSensor(Sensor sensor) {
if (!active.Contains(sensor)) {
active.Add(sensor);
if (SensorAdded != null)
SensorAdded(sensor);
}
}
private void DeactivateSensor(Sensor sensor) {
if (active.Contains(sensor)) {
active.Remove(sensor);
if (SensorRemoved != null)
SensorRemoved(sensor);
}
}
public event SensorEventHandler SensorAdded;
public event SensorEventHandler SensorRemoved;
}
}