2012-07-23 21:54:35 +00:00
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
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/.
|
|
|
|
|
|
2013-06-09 17:50:45 +00:00
|
|
|
|
Copyright (C) 2012-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
|
2012-07-23 21:54:35 +00:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2012-07-24 16:45:48 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
2012-07-23 21:54:35 +00:00
|
|
|
|
namespace OpenHardwareMonitor.Hardware.RAM {
|
|
|
|
|
internal class RAMGroup : IGroup {
|
|
|
|
|
|
2013-06-09 17:50:45 +00:00
|
|
|
|
private Hardware[] hardware;
|
2012-07-23 21:54:35 +00:00
|
|
|
|
|
|
|
|
|
public RAMGroup(SMBIOS smbios, ISettings settings) {
|
2012-07-24 16:45:48 +00:00
|
|
|
|
|
|
|
|
|
// No implementation for RAM on Unix systems
|
|
|
|
|
int p = (int)Environment.OSVersion.Platform;
|
|
|
|
|
if ((p == 4) || (p == 128)) {
|
2013-06-09 17:50:45 +00:00
|
|
|
|
hardware = new Hardware[0];
|
2012-07-24 16:45:48 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-14 13:57:13 +00:00
|
|
|
|
hardware = new Hardware[] { new GenericRAM("Generic Memory", settings) };
|
2012-07-23 21:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GetReport() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IHardware[] Hardware {
|
|
|
|
|
get {
|
|
|
|
|
return hardware;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Close() {
|
2013-06-09 17:50:45 +00:00
|
|
|
|
foreach (Hardware ram in hardware)
|
|
|
|
|
ram.Close();
|
2012-07-23 21:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|