using System.Collections.Generic;
public static void Main()
var history_lesson = new History203Controller();
public class FrameEvent {
public FrameEvent(String Msg, Dictionary<String,object> Parameters) {
this.Parameters = Parameters;
public Dictionary<String,Object> Parameters;
public partial class History203 {
FrameEvent e = new FrameEvent("gotoA",null);
FrameEvent e = new FrameEvent("gotoB",null);
FrameEvent e = new FrameEvent("gotoC",null);
FrameEvent e = new FrameEvent("goBack",null);
private void _sWaiting_(FrameEvent e) {
else if (e.Msg.Equals("gotoA")) {
else if (e.Msg.Equals("gotoB")) {
private void _sA_(FrameEvent e) {
else if (e.Msg.Equals("gotoB")) {
private void _sB_(FrameEvent e) {
else if (e.Msg.Equals("gotoA")) {
private void _sAB_(FrameEvent e) {
if (e.Msg.Equals("gotoC")) {
print_do("|gotoC| in $AB");
_stateStack_push_(_state_);
private void _sC_(FrameEvent e) {
else if (e.Msg.Equals("goBack")) {
FrameState state = _stateStack_pop_();
protected virtual void print_do(string msg) { throw new NotImplementedException(); }
private delegate void FrameState(FrameEvent e);
private FrameState _state_;
private void _transition_(FrameState newState) {
FrameEvent exitEvent = new FrameEvent("<",null);
FrameEvent enterEvent = new FrameEvent(">",null);
private Stack<FrameState> _stateStack_ = new Stack<FrameState>();
private void _stateStack_push_(FrameState state) {
_stateStack_.Push(state);
private FrameState _stateStack_pop_() {
return _stateStack_.Pop();
public partial class History203Controller : History203 {
protected override void print_do(string msg) {