public CounterEventArgs(float _amount, string _id, bool _refresh, INCREMENT _inc) { mID = _id; mRefresh = _refresh; switch (_inc) { case INCREMENT.HOURS: mTerm = (int)(_amount * C_hour); break; case INCREMENT.MINUTES: mTerm = (int)(_amount * C_minute); break; case INCREMENT.SECONDS: mTerm = (int)(_amount * C_seconds); break; case INCREMENT.MILLISECONDS: mTerm = (int)(_amount); break; default: mTerm = -1; break; } }
public void StartCounter(float _amount, bool _refresh, INCREMENT _inc) { CheckCounterAvailabillity("counter_0"); if (Start != null) Start(this, new CounterEventArgs(_amount, "counter_0", _refresh, _inc)); }
public void StartCounter(float _amount, bool _refresh, string _id, INCREMENT _inc) { CheckCounterAvailabillity(_id); if (Start != null) Start(this, new CounterEventArgs(_amount, _id, _refresh, _inc)); }
public void StartCounter(float _amount, INCREMENT _inc) { CheckCounterAvailabillity("counter_0"); if (Start != null) Start(null, new CounterEventArgs(_amount, "counter_0", true, _inc)); }