Hardware/RAM/RAMGroup.cs
author StephaneLenclud
Thu, 18 Apr 2013 23:25:10 +0200
branchMiniDisplay
changeset 444 9b09e2ee0968
parent 401 c37f2b5ee55b
permissions -rw-r--r--
Front View plug-in does not init if no sensor added.
Fixing some format to make strings shorter.
Now trying to start SoundGraphAccess.exe process from same directory.
Packed mode now can display three sensors along with the current time.
moel@370
     1
/*
moel@370
     2
 
moel@370
     3
  This Source Code Form is subject to the terms of the Mozilla Public
moel@370
     4
  License, v. 2.0. If a copy of the MPL was not distributed with this
moel@370
     5
  file, You can obtain one at http://mozilla.org/MPL/2.0/.
moel@370
     6
 
moel@401
     7
  Copyright (C) 2012-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
moel@370
     8
	
moel@370
     9
*/
moel@370
    10
moel@372
    11
using System;
moel@372
    12
moel@370
    13
namespace OpenHardwareMonitor.Hardware.RAM {
moel@370
    14
  internal class RAMGroup : IGroup {
moel@370
    15
moel@401
    16
    private Hardware[] hardware;
moel@370
    17
moel@370
    18
    public RAMGroup(SMBIOS smbios, ISettings settings) {
moel@372
    19
moel@372
    20
      // No implementation for RAM on Unix systems
moel@372
    21
      int p = (int)Environment.OSVersion.Platform;
moel@372
    22
      if ((p == 4) || (p == 128)) {
moel@401
    23
        hardware = new Hardware[0];
moel@372
    24
        return;
moel@372
    25
      }
moel@372
    26
moel@410
    27
      hardware = new Hardware[] { new GenericRAM("Generic Memory", settings) };
moel@370
    28
    }
moel@370
    29
moel@370
    30
    public string GetReport() {
moel@370
    31
      return null;
moel@370
    32
    }
moel@370
    33
moel@370
    34
    public IHardware[] Hardware {
moel@370
    35
      get {
moel@370
    36
        return hardware;
moel@370
    37
      }
moel@370
    38
    }
moel@370
    39
moel@370
    40
    public void Close() {
moel@401
    41
      foreach (Hardware ram in hardware)
moel@401
    42
        ram.Close();
moel@370
    43
    }
moel@370
    44
  }
moel@370
    45
}