Hardware/Mainboard/Mainboard.cs
changeset 76 42784fd84b16
parent 67 bb5696abab23
child 109 70d0c3102424
     1.1 --- a/Hardware/Mainboard/Mainboard.cs	Sun Mar 07 12:17:21 2010 +0000
     1.2 +++ b/Hardware/Mainboard/Mainboard.cs	Mon Mar 08 19:42:42 2010 +0000
     1.3 @@ -51,16 +51,22 @@
     1.4  
     1.5      public Mainboard() {
     1.6        this.smbios = new SMBIOS();
     1.7 -      if (smbios.Board != null && smbios.Board.ProductName != null
     1.8 -        && smbios.Board.ProductName != "") {
     1.9 -        if (smbios.Board.Manufacturer == Manufacturer.Unkown)
    1.10 -          this.name = smbios.Board.ProductName;
    1.11 -        else
    1.12 -          this.name = smbios.Board.Manufacturer + " " + 
    1.13 -            smbios.Board.ProductName;
    1.14 +     
    1.15 +      if (smbios.Board != null) {
    1.16 +        if (smbios.Board.ProductName != null
    1.17 +          && smbios.Board.ProductName != "") {
    1.18 +          if (smbios.Board.Manufacturer == Manufacturer.Unkown)
    1.19 +            this.name = smbios.Board.ProductName;
    1.20 +          else
    1.21 +            this.name = smbios.Board.Manufacturer + " " +
    1.22 +              smbios.Board.ProductName;
    1.23 +        } else {
    1.24 +          this.name = smbios.Board.Manufacturer.ToString();
    1.25 +        }
    1.26        } else {
    1.27 -        this.name = smbios.Board.Manufacturer.ToString();
    1.28 +        this.name = Manufacturer.Unkown.ToString();
    1.29        }
    1.30 +
    1.31        this.icon = Utilities.EmbeddedResources.GetImage("mainboard.png");
    1.32        this.lpcGroup = new LPCGroup();
    1.33      }