예제 #1
0
 public ValueBoundSpinner(
     UICommChannel ui,
     string id,
     SpinnerValueDescriptor svd,
     double initialValue)
     : this(ui, id, svd.min, svd.max, initialValue, svd.rateOfChange)
 {
 }
예제 #2
0
 public void SetValueDescriptor(SpinnerValueDescriptor svd)
 {
     this.MinValue     = svd.min;
     this.MaxValue     = svd.max;
     this.RateOfChange = svd.rateOfChange;
     if ((this.Value - svd.max) % svd.rateOfChange == 0.0)
     {
         this.Value = Math.Max(svd.min, Math.Min(svd.max, this.Value));
     }
     else
     {
         this.Value = svd.min;
     }
 }