Fixed an issue in the ram group implementation (sensor values did not get stored to the settings instance).
authormoel.mich
Sun, 09 Jun 2013 17:50:45 +0000
changeset 401c37f2b5ee55b
parent 400 f4e2e3e69651
child 402 0bad639907a3
Fixed an issue in the ram group implementation (sensor values did not get stored to the settings instance).
Hardware/RAM/RAMGroup.cs
     1.1 --- a/Hardware/RAM/RAMGroup.cs	Sun Jun 09 17:44:05 2013 +0000
     1.2 +++ b/Hardware/RAM/RAMGroup.cs	Sun Jun 09 17:50:45 2013 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4    License, v. 2.0. If a copy of the MPL was not distributed with this
     1.5    file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.6   
     1.7 -  Copyright (C) 2012 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.8 +  Copyright (C) 2012-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
     1.9  	
    1.10  */
    1.11  
    1.12 @@ -13,14 +13,14 @@
    1.13  namespace OpenHardwareMonitor.Hardware.RAM {
    1.14    internal class RAMGroup : IGroup {
    1.15  
    1.16 -    private IHardware[] hardware;
    1.17 +    private Hardware[] hardware;
    1.18  
    1.19      public RAMGroup(SMBIOS smbios, ISettings settings) {
    1.20  
    1.21        // No implementation for RAM on Unix systems
    1.22        int p = (int)Environment.OSVersion.Platform;
    1.23        if ((p == 4) || (p == 128)) {
    1.24 -        hardware = new IHardware[0];
    1.25 +        hardware = new Hardware[0];
    1.26          return;
    1.27        }
    1.28  
    1.29 @@ -32,7 +32,7 @@
    1.30          name = "Generic Memory";
    1.31        }
    1.32  
    1.33 -      hardware = new IHardware[] { new GenericRAM(name, settings) };
    1.34 +      hardware = new Hardware[] { new GenericRAM(name, settings) };
    1.35      }
    1.36  
    1.37      public string GetReport() {
    1.38 @@ -46,7 +46,8 @@
    1.39      }
    1.40  
    1.41      public void Close() {
    1.42 -
    1.43 +      foreach (Hardware ram in hardware)
    1.44 +        ram.Close();
    1.45      }
    1.46    }
    1.47  }