/// <summary> /// Handles the execution interruption by calling the handler of the current IState. /// </summary> /// <param name="reason">The interrupt reason.</param> protected virtual void HandleExecutionInterrupt(ExecutionInterruptReason reason) { var main = Platform.Gui.MainForm; // Invoke will most likely be required because // Debugger runs in a separate thread. if (main.InvokeRequired) { main.BeginInvoke(new Action <ExecutionInterruptReason>(HandleExecutionInterrupt), reason); return; } ExecutionInterruptReason = reason; if (CurrentIState != null) { CurrentIState.HandleExecutionInterrupt(reason); } }
/// <summary> /// Steps out of the current sub-routine. /// </summary> /// <param name="back">A value indicating whether to take the step backwards.</param> public virtual void StepOut(bool back) { CurrentIState.StepOut(back); }
/// <summary> /// Restarts the current program. /// </summary> public virtual void Restart() { CurrentIState.Restart(); }
/// <summary> /// Stops the program execution. It is not possible to continue. /// </summary> public virtual void Stop() { CurrentIState.Stop(); }
/// <summary> /// Pauses program execution. /// </summary> public virtual void Pause() { CurrentIState.Pause(); }
/// <summary> /// Starts on continues program execution. /// </summary> public virtual void Run() { CurrentIState.Run(); }