public ExamplesMenu() { Selector = "examples"; PromptCharacter = "examples>"; Add (new MI_Add ()); Add (new MI_Echo ()); Add (new MI_If ()); Add (new MI_Pause ()); Add (new MI_Stopwatch ()); var frs = new FileRecordStore (); Add (new MI_Record (frs)); Add (new MI_Replay (this, frs)); var procmgr = new ProcManager (); Add (new MI_Proc (procmgr)); Add (new MI_Call (this, procmgr)); Add (new MI_Return (this, procmgr)); Add (new MI_Goto (procmgr)); OnRun += m => { Console.Write ("Example menu - "); m.CQ.ImmediateInput ("help"); }; }
public MI_Goto(ProcManager mgr) : base("goto") { if (mgr == null) { throw new ArgumentNullException ("mgr"); } _Mgr = mgr; }
public MI_Goto(ProcManager mgr) : base("goto") { if (mgr == null) { throw new ArgumentNullException("mgr"); } _Mgr = mgr; }
public MI_Return (CMenu menu, ProcManager mgr) : base ("return") { if (menu == null) { throw new ArgumentNullException ("menu"); } if (mgr == null) { throw new ArgumentNullException ("mgr"); } _Mgr = mgr; }
public MI_Proc(ProcManager mgr) : base("proc", false) { if (mgr == null) { throw new ArgumentNullException ("mgr"); } _Mgr = mgr; PromptCharacter = "proc>"; Add (EndRecordCommand, s => Quit ()); Add (null, s => _Lines.Add (s)); }
public MI_Call(CMenu menu, ProcManager mgr) : base("call") { if (menu == null) { throw new ArgumentNullException ("menu"); } if (mgr == null) { throw new ArgumentNullException ("mgr"); } _Menu = menu; _Mgr = mgr; }
public MI_Proc(ProcManager mgr) : base("proc", false) { if (mgr == null) { throw new ArgumentNullException("mgr"); } _Mgr = mgr; PromptCharacter = "proc>"; Add(EndRecordCommand, s => Quit()); Add(null, s => _Lines.Add(s)); }
public MI_Return(CMenu menu, ProcManager mgr) : base("return") { if (menu == null) { throw new ArgumentNullException("menu"); } if (mgr == null) { throw new ArgumentNullException("mgr"); } _Mgr = mgr; }
public MI_Call(CMenu menu, ProcManager mgr) : base("call") { if (menu == null) { throw new ArgumentNullException("menu"); } if (mgr == null) { throw new ArgumentNullException("mgr"); } _Menu = menu; _Mgr = mgr; }