Beispiel #1
0
 public void Start()
 {
     ActualState  = GetInitState();
     _t           = new Timer();
     _t.Elapsed  += TimerElapsed;
     _t.AutoReset = true;
     _t.Interval  = ActualState.TimeOut;
     _t.Start();
     ActualState.Enter();
     CheckNewState(ActualState.ProcessTimerElapsed());
 }
Beispiel #2
0
 private void TimerElapsed(object sender, ElapsedEventArgs e)
 {
     Console.WriteLine($"{GetType()} - TimeElapsed");
     CheckNewState(ActualState.ProcessTimerElapsed());
 }