Beispiel #1
0
 private void OnStateWaitingForInput(State state)
 {
     if (SyncContext != null && SyncContext.InvokeRequired)
     {
         SyncContext.BeginInvoke(new Procedure <State>(OnStateWaitingForInput), new object[] { state });
     }
     else
     {
         StateWaitingForInput?.Invoke(this, new EventArgs <State>(state));
     }
 }
Beispiel #2
0
 private void OnStateMachineFinished()
 {
     if (SyncContext != null && SyncContext.InvokeRequired)
     {
         SyncContext.BeginInvoke(new Procedure(OnStateMachineFinished), null);
     }
     else
     {
         StateMachineFinished?.Invoke(this, EventArgs.Empty);
     }
 }
Beispiel #3
0
 private void OnStateProgress(double percent)
 {
     if (SyncContext != null && SyncContext.InvokeRequired)
     {
         SyncContext.BeginInvoke(new Procedure <double>(OnStateProgress), new object[] { percent });
     }
     else
     {
         StateProgress?.Invoke(this, new ProgressEventArgs(percent));
     }
 }