Hardware/LPC/W83627DHG.cs
author moel.mich
Wed, 27 Jan 2010 18:12:51 +0000
changeset 2 105939e4eb7e
child 7 9523a3322777
permissions -rw-r--r--
Fixed a NullReferenceException in the HDD SMART code.
moel@1
     1
using System;
moel@1
     2
using System.Collections.Generic;
moel@1
     3
using System.Drawing;
moel@1
     4
using System.Text;
moel@1
     5
moel@1
     6
namespace OpenHardwareMonitor.Hardware.LPC {
moel@1
     7
  public class W83627DHG : IHardware {
moel@1
     8
moel@1
     9
    private byte revision;
moel@1
    10
moel@1
    11
    private string name;
moel@1
    12
    private Image icon;
moel@1
    13
moel@1
    14
    private bool available = false;
moel@1
    15
moel@1
    16
    public W83627DHG(byte revision) {      
moel@1
    17
      this.revision = revision;
moel@1
    18
moel@1
    19
      this.name = "Winbond W83627DHG";
moel@1
    20
      this.icon = Utilities.EmbeddedResources.GetImage("chip.png");
moel@1
    21
    }
moel@1
    22
moel@1
    23
    public bool IsAvailable {
moel@1
    24
      get { return available; }
moel@1
    25
    }
moel@1
    26
moel@1
    27
    public string Name {
moel@1
    28
      get { return name; }
moel@1
    29
    }
moel@1
    30
moel@1
    31
    public string Identifier {
moel@1
    32
      get { return "/lpc/w83627dhg"; }
moel@1
    33
    }
moel@1
    34
moel@1
    35
    public Image Icon {
moel@1
    36
      get { return icon; }
moel@1
    37
    }
moel@1
    38
moel@1
    39
    public ISensor[] Sensors {
moel@1
    40
      get { return new ISensor[0]; }
moel@1
    41
    }
moel@1
    42
moel@1
    43
    public string GetReport() {
moel@1
    44
      StringBuilder r = new StringBuilder();
moel@1
    45
moel@1
    46
      r.AppendLine("LPC W83627DHG");
moel@1
    47
      r.AppendLine();
moel@1
    48
      r.Append("Chip revision: 0x"); r.AppendLine(revision.ToString("X"));     
moel@1
    49
moel@1
    50
      return r.ToString();
moel@1
    51
    }
moel@1
    52
moel@1
    53
    public void Update() { }
moel@1
    54
moel@1
    55
    #pragma warning disable 67
moel@1
    56
    public event SensorEventHandler SensorAdded;
moel@1
    57
    public event SensorEventHandler SensorRemoved;
moel@1
    58
    #pragma warning restore 67
moel@1
    59
  }
moel@1
    60
}