Changed the RAM implementation (removed Microsoft.VisualBasic dependency which is not implemented in Mono) and added code to prevent RAM hardware from loading on Linux.

This commit is contained in:
Michael Möller
2012-07-24 16:45:48 +00:00
parent 5d04d3f2f4
commit b702e42e3b
3 changed files with 44 additions and 10 deletions

View File

@@ -8,12 +8,22 @@
*/
using System;
namespace OpenHardwareMonitor.Hardware.RAM {
internal class RAMGroup : IGroup {
private IHardware[] hardware;
public RAMGroup(SMBIOS smbios, ISettings settings) {
// No implementation for RAM on Unix systems
int p = (int)Environment.OSVersion.Platform;
if ((p == 4) || (p == 128)) {
hardware = new IHardware[0];
return;
}
string name;
if (smbios.MemoryDevices.Length > 0) {
name = smbios.MemoryDevices[0].ManufacturerName + " " +