Hardware/Parameter.cs
changeset 109 70d0c3102424
parent 63 1a7c13ac7348
child 110 411b72b73d8f
     1.1 --- a/Hardware/Parameter.cs	Tue May 04 17:32:41 2010 +0000
     1.2 +++ b/Hardware/Parameter.cs	Thu May 06 19:20:38 2010 +0000
     1.3 @@ -68,8 +68,9 @@
     1.4      public Parameter(ParameterDescription description, ISensor sensor) {
     1.5        this.sensor = sensor;
     1.6        this.description = description;
     1.7 -      this.value = Utilities.Config.Get(Identifier, description.DefaultValue);
     1.8 -      this.isDefault = !Utilities.Config.Contains(Identifier);
     1.9 +      this.value = Utilities.Config.Get(Identifier.ToString(), 
    1.10 +        description.DefaultValue);
    1.11 +      this.isDefault = !Utilities.Config.Contains(Identifier.ToString());
    1.12      }
    1.13  
    1.14      public ISensor Sensor {
    1.15 @@ -78,10 +79,10 @@
    1.16        }
    1.17      }
    1.18  
    1.19 -    public string Identifier {
    1.20 +    public Identifier Identifier {
    1.21        get {
    1.22 -        return sensor.Identifier + "/parameter/" + 
    1.23 -          Name.Replace(" ", "").ToLower();
    1.24 +        return new Identifier(sensor.Identifier, "parameter", 
    1.25 +          Name.Replace(" ", "").ToLower());
    1.26        }
    1.27      }
    1.28  
    1.29 @@ -96,7 +97,7 @@
    1.30        set {
    1.31          this.isDefault = false;
    1.32          this.value = value;        
    1.33 -        Utilities.Config.Set(Identifier, value);
    1.34 +        Utilities.Config.Set(Identifier.ToString(), value);
    1.35        }
    1.36      }
    1.37  
    1.38 @@ -110,7 +111,7 @@
    1.39          this.isDefault = value;
    1.40          if (value) {
    1.41            this.value = description.DefaultValue;
    1.42 -          Utilities.Config.Remove(Identifier);
    1.43 +          Utilities.Config.Remove(Identifier.ToString());
    1.44          }
    1.45        }
    1.46      }