Hardware/HDD/SmartAttribute.cs
changeset 340 600962f8a298
parent 324 c6ee430d6995
child 344 3145aadca3d2
     1.1 --- a/Hardware/HDD/SmartAttribute.cs	Mon Feb 13 21:56:29 2012 +0000
     1.2 +++ b/Hardware/HDD/SmartAttribute.cs	Tue Feb 14 23:07:55 2012 +0000
     1.3 @@ -16,7 +16,7 @@
     1.4  
     1.5    The Initial Developer of the Original Code is 
     1.6    Michael Möller <m.moeller@gmx.ch>.
     1.7 -  Portions created by the Initial Developer are Copyright (C) 2011
     1.8 +  Portions created by the Initial Developer are Copyright (C) 2011-2012
     1.9    the Initial Developer. All Rights Reserved.
    1.10  
    1.11    Contributor(s):
    1.12 @@ -75,15 +75,17 @@
    1.13      /// <param name="sensorChannel">If there exists more than one attribute with 
    1.14      /// the same sensor channel and type, then a sensor is created only for the  
    1.15      /// first attribute.</param>
    1.16 +    /// <param name="defaultHiddenSensor">True to hide the sensor initially.</param>
    1.17      public SmartAttribute(byte identifier, string name,
    1.18        RawValueConversion rawValueConversion, SensorType? sensorType, 
    1.19 -      int sensorChannel) 
    1.20 +      int sensorChannel, bool defaultHiddenSensor = false) 
    1.21      {
    1.22        this.Identifier = identifier;
    1.23        this.Name = name;
    1.24        this.rawValueConversion = rawValueConversion;
    1.25        this.SensorType = sensorType;
    1.26        this.SensorChannel = sensorChannel;
    1.27 +      this.DefaultHiddenSensor = defaultHiddenSensor;
    1.28      }
    1.29  
    1.30      /// <summary>
    1.31 @@ -97,6 +99,8 @@
    1.32  
    1.33      public int SensorChannel { get; private set; }
    1.34  
    1.35 +    public bool DefaultHiddenSensor { get; private set; }
    1.36 +
    1.37      public bool HasRawValueConversion {
    1.38        get {
    1.39          return rawValueConversion != null;