Ejemplo n.º 1
0
 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);
Ejemplo n.º 10
0
 private static bool Equal(QLDecimal a, QLDecimal b) => a.Value == b.Value;
Ejemplo n.º 11
0
 private static bool GreaterThan(QLDecimal a, QLDecimal b) => a.Value > b.Value;
Ejemplo n.º 12
0
 private static bool LessThan(QLDecimal a, QLDecimal b) => a.Value < b.Value;
Ejemplo n.º 13
0
 public void Visit(QLDecimal value)
 {
     _result = value.IsUndefined() ? NewUndefined(QLDecimal.Default) : new SpinBox(_label, value, _readOnly, _valueChangedHandler);
 }
Ejemplo n.º 14
0
 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));
 }