示例#1
0
        private void Algorithm_Paused(object sender, EventArgs e)
        {
            var action = pausedForTermination ? ExecutionState.Stopped : (pausedForSnapshot ? ExecutionState.Started : ExecutionState.Paused);

            if (pausedForSnapshot || pausedForTermination)
            {
                pausedForSnapshot = pausedForTermination = false;
                MakeSnapshot();
                FindNextSnapshotTimeIndex(ExecutionTime);
            }
            OnPaused();
            if (action == ExecutionState.Started)
            {
                Algorithm.Start();
            }
            else if (action == ExecutionState.Stopped)
            {
                Algorithm.Stop();
            }
        }
示例#2
0
 public void Start()
 {
     Algorithm.Start();
 }
示例#3
0
 public void Start(CancellationToken cancellationToken)
 {
     Algorithm.Start(cancellationToken);
 }