示例#1
0
 private void SetNumberBoxRange(NumberBoxRange newValue)
 {
     SControl.SetRange2(
         (int)newValue.Units,
         newValue.Minimum,
         newValue.Maximum,
         newValue.Inclusive,
         newValue.Increment,
         newValue.FastIncr,
         newValue.SlowIncr);
 }
示例#2
0
        private void OnNumberBoxChanged(NumberBoxRange oldValue, NumberBoxRange newValue)
        {
            if (oldValue != newValue &&
                SControl != null &&
                newValue != null)
            {
                if (oldValue != null &&
                    newValue.Units != newValue.Units &&
                    SldControlVisibility)
                {
                    throw new InvalidOperationException($"控件显示后不能更改单位属性:{nameof(NumberBoxRange.Units)}");
                }

                SetNumberBoxRange(newValue);
            }
        }