1.1 --- a/Hardware/CPU/AMD0FCPU.cs Thu Aug 05 19:28:50 2010 +0000
1.2 +++ b/Hardware/CPU/AMD0FCPU.cs Sun Aug 08 13:57:26 2010 +0000
1.3 @@ -37,16 +37,12 @@
1.4
1.5 using System;
1.6 using System.Collections.Generic;
1.7 -using System.Drawing;
1.8 -using System.Diagnostics;
1.9 using System.Text;
1.10
1.11 -
1.12 namespace OpenHardwareMonitor.Hardware.CPU {
1.13 - public class AMD0FCPU : Hardware, IHardware {
1.14 + internal class AMD0FCPU : Hardware, IHardware {
1.15
1.16 private string name;
1.17 - private Image icon;
1.18
1.19 private int processorIndex;
1.20 private uint pciAddress;
1.21 @@ -64,15 +60,14 @@
1.22 private const byte THERM_SENSE_CORE_SEL_CPU0 = 0x4;
1.23 private const byte THERM_SENSE_CORE_SEL_CPU1 = 0x0;
1.24
1.25 - public AMD0FCPU(int processorIndex, CPUID[][] cpuid) {
1.26 + public AMD0FCPU(int processorIndex, CPUID[][] cpuid, ISettings settings) {
1.27
1.28 this.processorIndex = processorIndex;
1.29 this.name = cpuid[0][0].Name;
1.30 - this.icon = Utilities.EmbeddedResources.GetImage("cpu.png");
1.31
1.32 - int coreCount = cpuid.Length;
1.33 + int coreCount = cpuid.Length;
1.34
1.35 - totalLoad = new Sensor("CPU Total", 0, SensorType.Load, this);
1.36 + totalLoad = new Sensor("CPU Total", 0, SensorType.Load, this, settings);
1.37
1.38 float offset = -49.0f;
1.39
1.40 @@ -93,7 +88,7 @@
1.41 new ParameterDescription("Offset [°C]",
1.42 "Temperature offset of the thermal sensor.\n" +
1.43 "Temperature = Value + Offset.", offset)
1.44 - });
1.45 + }, settings);
1.46 }
1.47 } else {
1.48 coreTemperatures = new Sensor[0];
1.49 @@ -102,7 +97,7 @@
1.50 coreLoads = new Sensor[coreCount];
1.51 for (int i = 0; i < coreCount; i++)
1.52 coreLoads[i] = new Sensor("Core #" + (i + 1), i + 1,
1.53 - SensorType.Load, this);
1.54 + SensorType.Load, this, settings);
1.55
1.56 cpuLoad = new CPULoad(cpuid);
1.57 if (cpuLoad.IsAvailable) {
1.58 @@ -125,8 +120,8 @@
1.59 get { return new Identifier("amdcpu", processorIndex.ToString()); }
1.60 }
1.61
1.62 - public override Image Icon {
1.63 - get { return icon; }
1.64 + public override HardwareType HardwareType {
1.65 + get { return HardwareType.CPU; }
1.66 }
1.67
1.68 public override void Update() {