Added a new icon for RAM hardware.
authormoel.mich
Wed, 25 Jul 2012 15:33:16 +0000
changeset 3733b8443edb0e6
parent 372 2de3a3e5f0b5
child 374 ea86cea126bc
Added a new icon for RAM hardware.
GUI/HardwareTypeImage.cs
Hardware/SMBIOS.cs
OpenHardwareMonitor.csproj
Resources/chip.png
Resources/ram.png
Utilities/HttpServer.cs
     1.1 --- a/GUI/HardwareTypeImage.cs	Tue Jul 24 16:45:48 2012 +0000
     1.2 +++ b/GUI/HardwareTypeImage.cs	Wed Jul 25 15:33:16 2012 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4    License, v. 2.0. If a copy of the MPL was not distributed with this
     1.5    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.6   
     1.7 -  Copyright (C) 2010 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.8 +  Copyright (C) 2010-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.9  	
    1.10  */
    1.11  
    1.12 @@ -57,7 +57,7 @@
    1.13              image = Utilities.EmbeddedResources.GetImage("bigng.png");
    1.14              break;
    1.15            case HardwareType.RAM:
    1.16 -            image = Utilities.EmbeddedResources.GetImage("chip.png");
    1.17 +            image = Utilities.EmbeddedResources.GetImage("ram.png");
    1.18              break;
    1.19            default:
    1.20              image = new Bitmap(1, 1);
     2.1 --- a/Hardware/SMBIOS.cs	Tue Jul 24 16:45:48 2012 +0000
     2.2 +++ b/Hardware/SMBIOS.cs	Wed Jul 25 15:33:16 2012 +0000
     2.3 @@ -183,6 +183,10 @@
     2.4          r.AppendLine(MemoryDevices[i].ManufacturerName);
     2.5          r.Append("Memory Device [" + i + "] Part Number: ");
     2.6          r.AppendLine(MemoryDevices[i].PartNumber);
     2.7 +        r.Append("Memory Device [" + i + "] Device Locator: ");
     2.8 +        r.AppendLine(MemoryDevices[i].DeviceLocator);
     2.9 +        r.Append("Memory Device [" + i + "] Bank Locator: ");
    2.10 +        r.AppendLine(MemoryDevices[i].BankLocator);
    2.11          r.AppendLine();
    2.12        }
    2.13  
    2.14 @@ -357,32 +361,35 @@
    2.15  
    2.16      public class MemoryDevice : Structure {
    2.17  
    2.18 +      private readonly string deviceLocator;
    2.19 +      private readonly string bankLocator;
    2.20        private readonly string manufacturerName;
    2.21        private readonly string serialNumber;
    2.22 -      private readonly string partNumber;
    2.23 -
    2.24 -      public MemoryDevice(string manufacturerName, string serialNumber,
    2.25 -        string partNumber)
    2.26 -        : base(0x11, 0, null, null) {
    2.27 -        this.manufacturerName = manufacturerName;
    2.28 -        this.serialNumber = serialNumber;
    2.29 -        this.partNumber = partNumber;
    2.30 -      }
    2.31 +      private readonly string partNumber;      
    2.32  
    2.33        public MemoryDevice(byte type, ushort handle, byte[] data,
    2.34          string[] strings)
    2.35 -        : base(type, handle, data, strings) {
    2.36 +        : base(type, handle, data, strings) 
    2.37 +      {
    2.38 +        this.deviceLocator = GetString(0x10).Trim();
    2.39 +        this.bankLocator = GetString(0x11).Trim();
    2.40          this.manufacturerName = GetString(0x17).Trim();
    2.41          this.serialNumber = GetString(0x18).Trim();
    2.42          this.partNumber = GetString(0x1A).Trim();
    2.43        }
    2.44  
    2.45 +      public string DeviceLocator { get { return deviceLocator; } }
    2.46 +
    2.47 +      public string BankLocator { get { return bankLocator; } }
    2.48 +
    2.49        public string ManufacturerName { get { return manufacturerName; } }
    2.50  
    2.51        public string SerialNumber { get { return serialNumber; } }
    2.52  
    2.53        public string PartNumber { get { return partNumber; } }
    2.54  
    2.55 +       
    2.56 +
    2.57      }
    2.58    }
    2.59  }
     3.1 --- a/OpenHardwareMonitor.csproj	Tue Jul 24 16:45:48 2012 +0000
     3.2 +++ b/OpenHardwareMonitor.csproj	Wed Jul 25 15:33:16 2012 +0000
     3.3 @@ -284,6 +284,9 @@
     3.4      <EmbeddedResource Include="Resources\Web\js\knockout-2.1.0.min.js" />
     3.5      <EmbeddedResource Include="Resources\Web\js\knockout.mapping-latest.min.js" />
     3.6    </ItemGroup>
     3.7 +  <ItemGroup>
     3.8 +    <EmbeddedResource Include="Resources\ram.png" />
     3.9 +  </ItemGroup>
    3.10    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    3.11    <ProjectExtensions>
    3.12      <VisualStudio AllowExistingFolder="true" />
     4.1 Binary file Resources/chip.png has changed
     5.1 Binary file Resources/ram.png has changed
     6.1 --- a/Utilities/HttpServer.cs	Tue Jul 24 16:45:48 2012 +0000
     6.2 +++ b/Utilities/HttpServer.cs	Wed Jul 25 15:33:16 2012 +0000
     6.3 @@ -316,7 +316,7 @@
     6.4                  case HardwareType.TBalancer:
     6.5                      return "bigng.png";
     6.6                  case HardwareType.RAM:
     6.7 -                    return "chip.png";
     6.8 +                    return "ram.png";
     6.9                  default:
    6.10                      return "cpu.png";
    6.11              }