1.1 --- a/Hardware/Mainboard/Mainboard.cs Sat May 29 13:49:20 2010 +0000
1.2 +++ b/Hardware/Mainboard/Mainboard.cs Thu Jun 03 22:40:18 2010 +0000
1.3 @@ -47,7 +47,8 @@
1.4 private string name;
1.5 private Image icon;
1.6
1.7 - private LPCIO lpcGroup;
1.8 + private LPCIO lpcio;
1.9 + private IHardware[] superIOHardware;
1.10
1.11 public Mainboard() {
1.12 this.smbios = new SMBIOS();
1.13 @@ -68,9 +69,14 @@
1.14 }
1.15
1.16 this.icon = Utilities.EmbeddedResources.GetImage("mainboard.png");
1.17 - this.lpcGroup = new LPCIO(
1.18 - smbios.Board != null ? smbios.Board.Manufacturer : Manufacturer.Unknown,
1.19 - smbios.Board != null ? smbios.Board.Model : Model.Unknown);
1.20 + this.lpcio = new LPCIO();
1.21 + ISuperIO[] superIO = lpcio.SuperIO;
1.22 + superIOHardware = new IHardware[superIO.Length];
1.23 + for (int i = 0; i < superIO.Length; i++)
1.24 + superIOHardware[i] = new SuperIOHardware(superIO[i],
1.25 + smbios.Board != null ? smbios.Board.Manufacturer :
1.26 + Manufacturer.Unknown, smbios.Board != null ? smbios.Board.Model :
1.27 + Model.Unknown);
1.28 }
1.29
1.30 public string Name {
1.31 @@ -92,7 +98,7 @@
1.32 r.AppendLine();
1.33 r.Append(smbios.GetReport());
1.34
1.35 - r.Append(lpcGroup.GetReport());
1.36 + r.Append(lpcio.GetReport());
1.37
1.38 return r.ToString();
1.39 }
1.40 @@ -102,7 +108,7 @@
1.41 public void Close() { }
1.42
1.43 public IHardware[] SubHardware {
1.44 - get { return lpcGroup.Hardware; }
1.45 + get { return superIOHardware; }
1.46 }
1.47
1.48 public ISensor[] Sensors {
1.49 @@ -119,7 +125,7 @@
1.50 }
1.51
1.52 public void Traverse(IVisitor visitor) {
1.53 - foreach (IHardware hardware in lpcGroup.Hardware)
1.54 + foreach (IHardware hardware in superIOHardware)
1.55 hardware.Accept(visitor);
1.56 }
1.57 }