Пример #1
0
        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");
            };
        }
Пример #2
0
        public MI_Goto(ProcManager mgr)
            : base("goto")
        {
            if (mgr == null) {
                throw new ArgumentNullException ("mgr");
            }

            _Mgr = mgr;
        }
Пример #3
0
        public MI_Goto(ProcManager mgr)
            : base("goto")
        {
            if (mgr == null)
            {
                throw new ArgumentNullException("mgr");
            }

            _Mgr = mgr;
        }
Пример #4
0
		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;
		}
Пример #5
0
        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));
        }
Пример #6
0
        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;
        }
Пример #7
0
        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));
        }
Пример #8
0
        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;
        }
Пример #9
0
        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;
        }