Hardware/HDD/HDD.cs
changeset 165 813d8bc3192f
parent 110 411b72b73d8f
child 166 fa9dfbfc4145
     1.1 --- a/Hardware/HDD/HDD.cs	Thu Aug 05 19:28:50 2010 +0000
     1.2 +++ b/Hardware/HDD/HDD.cs	Sun Aug 08 13:57:26 2010 +0000
     1.3 @@ -37,10 +37,9 @@
     1.4  
     1.5  using System;
     1.6  using System.Collections.Generic;
     1.7 -using System.Drawing;
     1.8  
     1.9  namespace OpenHardwareMonitor.Hardware.HDD {
    1.10 -  public class HDD : IHardware {
    1.11 +  internal class HDD : IHardware {
    1.12  
    1.13      private const int UPDATE_DIVIDER = 30; // update only every 30s
    1.14  
    1.15 @@ -48,19 +47,20 @@
    1.16      private IntPtr handle;
    1.17      private int drive;
    1.18      private int attribute;    
    1.19 -    private Image icon;
    1.20      private Sensor temperature;
    1.21      private int count;
    1.22      
    1.23  
    1.24 -    public HDD(string name, IntPtr handle, int drive, int attribute) {
    1.25 +    public HDD(string name, IntPtr handle, int drive, int attribute, 
    1.26 +      ISettings settings) 
    1.27 +    {
    1.28        this.name = name;
    1.29        this.handle = handle;
    1.30        this.drive = drive;
    1.31        this.attribute = attribute;
    1.32        this.count = 0;
    1.33 -      this.icon = Utilities.EmbeddedResources.GetImage("hdd.png");
    1.34 -      this.temperature = new Sensor("HDD", 0, SensorType.Temperature, this);
    1.35 +      this.temperature = new Sensor("HDD", 0, SensorType.Temperature, this, 
    1.36 +        settings);
    1.37        Update();
    1.38      }
    1.39  
    1.40 @@ -73,8 +73,8 @@
    1.41        get { return new Identifier("hdd", drive.ToString()); }
    1.42      }
    1.43  
    1.44 -    public Image Icon {
    1.45 -      get { return icon; }
    1.46 +    public HardwareType HardwareType {
    1.47 +      get { return HardwareType.HDD; }
    1.48      }
    1.49  
    1.50      public IHardware[] SubHardware {