Added a new icon for RAM hardware.

This commit is contained in:
Michael Möller
2012-07-25 15:33:16 +00:00
parent b702e42e3b
commit a3f3febfb3
6 changed files with 23 additions and 13 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2010 Michael Möller <mmoeller@openhardwaremonitor.org>
Copyright (C) 2010-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
*/
@@ -57,7 +57,7 @@ namespace OpenHardwareMonitor.GUI {
image = Utilities.EmbeddedResources.GetImage("bigng.png");
break;
case HardwareType.RAM:
image = Utilities.EmbeddedResources.GetImage("chip.png");
image = Utilities.EmbeddedResources.GetImage("ram.png");
break;
default:
image = new Bitmap(1, 1);
+17 -10
View File
@@ -183,6 +183,10 @@ namespace OpenHardwareMonitor.Hardware {
r.AppendLine(MemoryDevices[i].ManufacturerName);
r.Append("Memory Device [" + i + "] Part Number: ");
r.AppendLine(MemoryDevices[i].PartNumber);
r.Append("Memory Device [" + i + "] Device Locator: ");
r.AppendLine(MemoryDevices[i].DeviceLocator);
r.Append("Memory Device [" + i + "] Bank Locator: ");
r.AppendLine(MemoryDevices[i].BankLocator);
r.AppendLine();
}
@@ -357,32 +361,35 @@ namespace OpenHardwareMonitor.Hardware {
public class MemoryDevice : Structure {
private readonly string deviceLocator;
private readonly string bankLocator;
private readonly string manufacturerName;
private readonly string serialNumber;
private readonly string partNumber;
public MemoryDevice(string manufacturerName, string serialNumber,
string partNumber)
: base(0x11, 0, null, null) {
this.manufacturerName = manufacturerName;
this.serialNumber = serialNumber;
this.partNumber = partNumber;
}
private readonly string partNumber;
public MemoryDevice(byte type, ushort handle, byte[] data,
string[] strings)
: base(type, handle, data, strings) {
: base(type, handle, data, strings)
{
this.deviceLocator = GetString(0x10).Trim();
this.bankLocator = GetString(0x11).Trim();
this.manufacturerName = GetString(0x17).Trim();
this.serialNumber = GetString(0x18).Trim();
this.partNumber = GetString(0x1A).Trim();
}
public string DeviceLocator { get { return deviceLocator; } }
public string BankLocator { get { return bankLocator; } }
public string ManufacturerName { get { return manufacturerName; } }
public string SerialNumber { get { return serialNumber; } }
public string PartNumber { get { return partNumber; } }
}
}
}
+3
View File
@@ -284,6 +284,9 @@
<EmbeddedResource Include="Resources\Web\js\knockout-2.1.0.min.js" />
<EmbeddedResource Include="Resources\Web\js\knockout.mapping-latest.min.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\ram.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio AllowExistingFolder="true" />
Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 806 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

+1 -1
View File
@@ -316,7 +316,7 @@ namespace OpenHardwareMonitor.Utilities
case HardwareType.TBalancer:
return "bigng.png";
case HardwareType.RAM:
return "chip.png";
return "ram.png";
default:
return "cpu.png";
}