mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-31 14:25:16 +00:00
Added initial support for W83627HF. Some refactoring for IHardware classes.
This commit is contained in:
@@ -43,7 +43,7 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenHardwareMonitor.Hardware.CPU {
|
||||
public class IntelCPU : IHardware {
|
||||
public class IntelCPU : Hardware, IHardware {
|
||||
|
||||
private string name;
|
||||
private Image icon;
|
||||
@@ -52,8 +52,6 @@ namespace OpenHardwareMonitor.Hardware.CPU {
|
||||
private Sensor totalLoad;
|
||||
private Sensor[] coreLoads;
|
||||
|
||||
private List<ISensor> active = new List<ISensor>();
|
||||
|
||||
private float tjMax = 0;
|
||||
private uint logicalProcessors;
|
||||
private uint logicalProcessorsPerCore;
|
||||
@@ -165,10 +163,6 @@ namespace OpenHardwareMonitor.Hardware.CPU {
|
||||
get { return icon; }
|
||||
}
|
||||
|
||||
public ISensor[] Sensors {
|
||||
get { return active.ToArray(); }
|
||||
}
|
||||
|
||||
public string GetReport() {
|
||||
StringBuilder r = new StringBuilder();
|
||||
|
||||
@@ -210,25 +204,6 @@ namespace OpenHardwareMonitor.Hardware.CPU {
|
||||
coreLoads[i].Value = cpuLoad.GetCoreLoad(i);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user