Hardware/RAM/RAMGroup.cs
author StephaneLenclud
Sun, 03 Feb 2013 18:01:50 +0100
branchMiniDisplay
changeset 433 090259cfd699
parent 401 c37f2b5ee55b
permissions -rw-r--r--
Adding SoundGraphDisplay and SensorFrontView classes.
They were respectively based on SystemTray and SensorNotifyIcon.
SoundGraphDisplay is now able to load iMONDisplay.dll providing it lives on your PATH.
Adding option to sensor context menu for adding it into FrontView.
     1 /*
     2  
     3   This Source Code Form is subject to the terms of the Mozilla Public
     4   License, v. 2.0. If a copy of the MPL was not distributed with this
     5   file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6  
     7   Copyright (C) 2012-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
     8 	
     9 */
    10 
    11 using System;
    12 
    13 namespace OpenHardwareMonitor.Hardware.RAM {
    14   internal class RAMGroup : IGroup {
    15 
    16     private Hardware[] hardware;
    17 
    18     public RAMGroup(SMBIOS smbios, ISettings settings) {
    19 
    20       // No implementation for RAM on Unix systems
    21       int p = (int)Environment.OSVersion.Platform;
    22       if ((p == 4) || (p == 128)) {
    23         hardware = new Hardware[0];
    24         return;
    25       }
    26 
    27       hardware = new Hardware[] { new GenericRAM("Generic Memory", settings) };
    28     }
    29 
    30     public string GetReport() {
    31       return null;
    32     }
    33 
    34     public IHardware[] Hardware {
    35       get {
    36         return hardware;
    37       }
    38     }
    39 
    40     public void Close() {
    41       foreach (Hardware ram in hardware)
    42         ram.Close();
    43     }
    44   }
    45 }