示例#1
0
 private void sendEvent(Myargs args)
 {
     if (TimerExpiredEvent != null)
     {
         TimerExpiredEvent.Invoke(args);
     }
 }
示例#2
0
        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);
        }