private void sendEvent(Myargs args) { if (TimerExpiredEvent != null) { TimerExpiredEvent.Invoke(args); } }
public void CreateTimer(string name, int runTime) { JustTimer justTimer = new JustTimer(); justTimer.SomeTimer.Elapsed += (obj, ea) => { var args = new Myargs(); args.Name = name; sendEvent(args); }; justTimer.SetAndGo(name, runTime); }