Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
 public void Stop()
 {
     Algorithm.Stop();
 }