1.1 --- a/Hardware/CPU/AMD10CPU.cs Thu Aug 05 19:28:50 2010 +0000
1.2 +++ b/Hardware/CPU/AMD10CPU.cs Sun Aug 08 13:57:26 2010 +0000
1.3 @@ -37,15 +37,13 @@
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 namespace OpenHardwareMonitor.Hardware.CPU {
1.12 -
1.13 - public class AMD10CPU : Hardware, IHardware {
1.14 +
1.15 + internal class AMD10CPU : Hardware, IHardware {
1.16 private string name;
1.17 - private Image icon;
1.18
1.19 private int processorIndex;
1.20 private uint pciAddress;
1.21 @@ -61,20 +59,19 @@
1.22 private const ushort PCI_AMD_11H_MISCELLANEOUS_DEVICE_ID = 0x1303;
1.23 private const uint REPORTED_TEMPERATURE_CONTROL_REGISTER = 0xA4;
1.24
1.25 - public AMD10CPU(int processorIndex, CPUID[][] cpuid) {
1.26 + public AMD10CPU(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
1.34 - totalLoad = new Sensor("CPU Total", 0, SensorType.Load, this);
1.35 + totalLoad = new Sensor("CPU Total", 0, SensorType.Load, this, settings);
1.36
1.37 coreLoads = new Sensor[coreCount];
1.38 for (int i = 0; i < coreCount; i++)
1.39 coreLoads[i] = new Sensor("Core #" + (i + 1), i + 1,
1.40 - SensorType.Load, this);
1.41 + SensorType.Load, this, settings);
1.42
1.43 cpuLoad = new CPULoad(cpuid);
1.44 if (cpuLoad.IsAvailable) {
1.45 @@ -88,7 +85,7 @@
1.46 "Core" + (coreCount > 1 ? " #1 - #" + coreCount : ""), 0,
1.47 SensorType.Temperature, this, new ParameterDescription[] {
1.48 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
1.49 - });
1.50 + }, settings);
1.51
1.52 pciAddress = WinRing0.FindPciDeviceById(PCI_AMD_VENDOR_ID,
1.53 PCI_AMD_10H_MISCELLANEOUS_DEVICE_ID, (byte)processorIndex);
1.54 @@ -107,8 +104,8 @@
1.55 get { return new Identifier("amdcpu", processorIndex.ToString()); }
1.56 }
1.57
1.58 - public override Image Icon {
1.59 - get { return icon; }
1.60 + public override HardwareType HardwareType {
1.61 + get { return HardwareType.CPU; }
1.62 }
1.63
1.64 public override void Update() {