コード例 #1
0
 protected override int ToSliderValueY(double propertyValue)
 {
     if (this.useExponentialScale)
     {
         return(PropertyControlUtil.ToSliderValueExp(propertyValue, base.Property.MinValueY, base.Property.MaxValueY, this.DecimalPlaces));
     }
     return(PropertyControlUtil.ToSliderValue(propertyValue, this.DecimalPlaces));
 }
コード例 #2
0
 protected override int ToSliderValueY(double propertyValue)
 {
     if (this.useExponentialScale)
     {
         return(PropertyControlUtil.ToSliderValueExp(propertyValue, Property.MinValueY, Property.MaxValueY, DecimalPlaces));
     }
     else
     {
         double toIntScale        = Math.Pow(10, DecimalPlaces);
         double sliderValueDouble = propertyValue * toIntScale;
         int    sliderValueInt    = (int)sliderValueDouble;
         return(sliderValueInt);
     }
 }