public virtual void Visit(QLDecimal value) { }
private static QLDecimal Divide(QLDecimal a, QLInteger b) => new QLDecimal(a.Value / b.Value);
public void Visit(QLDecimal value) { _result = value; }
private static QLDecimal Multiply(QLInteger a, QLDecimal b) => new QLDecimal(a.Value * b.Value);
private static QLDecimal Multiply(QLDecimal a, QLInteger b) => Multiply(b, a);
private static QLMoney Multiply(QLDecimal a, QLMoney b) => new QLMoney(a.Value * b.Value);
private static QLMoney Multiply(QLMoney a, QLDecimal b) => Multiply(b, a);
private static QLDecimal Add(QLDecimal a, QLDecimal b) => new QLDecimal(a.Value + b.Value);
private static QLDecimal Subtract(QLDecimal a, QLDecimal b) => new QLDecimal(a.Value - b.Value);
private static bool Equal(QLDecimal a, QLDecimal b) => a.Value == b.Value;
private static bool GreaterThan(QLDecimal a, QLDecimal b) => a.Value > b.Value;
private static bool LessThan(QLDecimal a, QLDecimal b) => a.Value < b.Value;
public void Visit(QLDecimal value) { _result = value.IsUndefined() ? NewUndefined(QLDecimal.Default) : new SpinBox(_label, value, _readOnly, _valueChangedHandler); }
public SpinBox(string label, QLDecimal value, bool readOnly, Action <IValue> valueChangedHandler) : this(label, value.Value, decimal.MinValue, decimal.MaxValue, 1, 2, readOnly) { _valueChangedHandler = () => valueChangedHandler(new QLDecimal(_numericUpDown.Value)); }