Beispiel #1
0
        public override void VerifySettings()
        {
            base.VerifySettings();

            if (MinValue.CompareTo(MaxValue) >= 0)
            {
                throw new ArgumentException(TextResource.MinPropertyMustBeLessThenMaxProperty.FormatWith("Min", "Max"));
            }


            if (SelectionStart != null && SelectionEnd != null)
            {
                if (SelectionStart.Value.CompareTo(SelectionEnd.Value) > 0)
                {
                    throw new ArgumentException(TextResource.FirstPropertyShouldNotBeBiggerThenSecondProperty.FormatWith("SelectionStart", "SelectionEnd"));
                }
            }

            if (SmallStep.CompareTo(LargeStep) > 0)
            {
                throw new ArgumentException(TextResource.FirstPropertyShouldNotBeBiggerThenSecondProperty.FormatWith("SmallStep", "LargeStep"));
            }

            if (SmallStep.CompareTo((T)Convert.ChangeType(0, typeof(T))) <= 0)
            {
                throw new ArgumentException(TextResource.PropertyMustBeBiggerThenZero.FormatWith("SmallStep"));
            }
        }
Beispiel #2
0
 public void setTrace(bool trace)
 {
     if (trace)
     {
         step = new SmallStep(stepWithDump);
     }
     else
     {
         step = new SmallStep(stepOperation);
     }
 }