Example #1
0
        private static ToolScalingSetting GetScaling(
            ScalingSetting scalingSetting,
            ThresholdWithHiSetting thresholdSetting)
        {
            if (scalingSetting.byScalingValid == (byte)0)
            {
                return(new ToolScalingSetting());
            }
            uint pdwEdgeThresholdMax;
            byte pbyDotPosition;

            ScalingToolSettingBase.GetScalingThresholdRange(scalingSetting, thresholdSetting, out pdwEdgeThresholdMax, out pbyDotPosition);
            uint num = thresholdSetting.byHiThresholdSettingType == (byte)0 ? pdwEdgeThresholdMax : thresholdSetting.dwHiThreshold;

            return(new ToolScalingSetting(true, (ulong)pdwEdgeThresholdMax, 0UL, (ulong)num, (ulong)thresholdSetting.dwLowThreshold));
        }
Example #2
0
 protected void Initialize(
     ScalingSetting scalingSetting,
     ThresholdWithHiSetting thresholdSetting)
 {
     this.Scaling = ScalingToolSettingBase.GetScaling(scalingSetting, thresholdSetting);
     if (!this.Scaling.Enabled)
     {
         this.OkMaxValue = (int)thresholdSetting.dwHiThreshold;
         this.OkMinValue = (int)thresholdSetting.dwLowThreshold;
     }
     this.MinValue = 0;
     this.MaxValue = ScalingToolSettingBase.GetMaxValue(thresholdSetting);
     if (thresholdSetting.byHiThresholdSettingType != (byte)0)
     {
         return;
     }
     this.OkMaxValue = this.MaxValue;
 }