public IntegerCounter(int defaultValue, int min, int max, int step, Action action = null) : base(defaultValue, min, max, step) { if (action != null) { CounterListener <int> cl = new CounterListener <int>((value) => { action(); }); this.ActionOnCounter = cl; } }
public AbstractCounter(T defaultValue, T min, T max, T step, CounterListener <T> cl = null) { this.Value = defaultValue; this.Min = min; this.Max = max; this.Step = step; if (cl != null) { this.ActionOnCounter = cl; } else { this.ActionOnCounter = new CounterListener <T>(); } }
public IntegerCounter(int defaultValue, int min, int max, int step, CounterListener <int> cl = null) : base(defaultValue, min, max, step, cl) { }