Hardware/RAM/RAMGroup.cs
author moel.mich
Tue, 24 Jul 2012 16:04:30 +0000
changeset 371 c1a0d321e646
child 372 2de3a3e5f0b5
permissions -rw-r--r--
Added a wrapper for the NotifyIconAdv to use the normal NotifyIcon class on Linux systems and the (fixed) custom implementation on Windows systems.
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@370
     7
  Copyright (C) 2012 Michael Möller <mmoeller@openhardwaremonitor.org>
moel@370
     8
	
moel@370
     9
*/
moel@370
    10
moel@370
    11
namespace OpenHardwareMonitor.Hardware.RAM {
moel@370
    12
  internal class RAMGroup : IGroup {
moel@370
    13
moel@370
    14
    private IHardware[] hardware;
moel@370
    15
moel@370
    16
    public RAMGroup(SMBIOS smbios, ISettings settings) {
moel@370
    17
      string name;
moel@370
    18
      if (smbios.MemoryDevices.Length > 0) {
moel@370
    19
        name = smbios.MemoryDevices[0].ManufacturerName + " " + 
moel@370
    20
          smbios.MemoryDevices[0].PartNumber;
moel@370
    21
      } else {
moel@370
    22
        name = "Generic Memory";
moel@370
    23
      }
moel@370
    24
moel@370
    25
      hardware = new IHardware[] { new GenericRAM(name, settings) };
moel@370
    26
    }
moel@370
    27
moel@370
    28
    public string GetReport() {
moel@370
    29
      return null;
moel@370
    30
    }
moel@370
    31
moel@370
    32
    public IHardware[] Hardware {
moel@370
    33
      get {
moel@370
    34
        return hardware;
moel@370
    35
      }
moel@370
    36
    }
moel@370
    37
moel@370
    38
    public void Close() {
moel@370
    39
moel@370
    40
    }
moel@370
    41
  }
moel@370
    42
}