Refactored the hardware code and added the visitor pattern for operations on the computer/hardware/sensor/parameter tree.

This commit is contained in:
Michael Möller
2010-05-09 16:22:13 +00:00
parent a49919717e
commit 4cd9cd9125
28 changed files with 372 additions and 89 deletions

View File

@@ -99,23 +99,19 @@ namespace OpenHardwareMonitor.Hardware.CPU {
Update();
}
public string Name {
public override string Name {
get { return name; }
}
public Identifier Identifier {
public override Identifier Identifier {
get { return new Identifier("amdcpu", processorIndex.ToString()); }
}
public Image Icon {
public override Image Icon {
get { return icon; }
}
public string GetReport() {
return null;
}
public void Update() {
public override void Update() {
if (pciAddress != 0xFFFFFFFF) {
uint value;
if (WinRing0.ReadPciConfigDwordEx(pciAddress,