mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-31 06:15:08 +00:00
Added initial support for W83627HF. Some refactoring for IHardware classes.
This commit is contained in:
@@ -41,7 +41,7 @@ using System.Drawing;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
public class ATIGPU : IHardware {
|
||||
public class ATIGPU : Hardware, IHardware {
|
||||
|
||||
private string name;
|
||||
private Image icon;
|
||||
@@ -55,8 +55,6 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
private Sensor coreVoltage;
|
||||
private Sensor coreLoad;
|
||||
|
||||
private List<ISensor> active = new List<ISensor>();
|
||||
|
||||
public ATIGPU(string name, int adapterIndex, int busNumber,
|
||||
int deviceNumber)
|
||||
{
|
||||
@@ -95,10 +93,6 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
get { return icon; }
|
||||
}
|
||||
|
||||
public ISensor[] Sensors {
|
||||
get { return active.ToArray(); }
|
||||
}
|
||||
|
||||
public string GetReport() {
|
||||
return null;
|
||||
}
|
||||
@@ -144,24 +138,5 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
||||
DeactivateSensor(coreLoad);
|
||||
}
|
||||
}
|
||||
|
||||
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