예제 #1
0
        public MinerApplication()
        {
            commandProcessor = new CommandProcessor(AddNotification, (s) =>
            {
                replBuffer.Add(s);
            });

            var setCommand = CommandNames.Set.ToLower();
            settingsProcessor = new CommandProcessor((s) =>
            {
                AddNotification(String.Format("{0} {1}", setCommand, s));
            }, 
            (s) =>
            {
                if (s.StartsWith("\t"))
                    replBuffer.Add(s);
                else
                    replBuffer.Add(String.Format("{0} {1}", setCommand, s));
            });
        }
예제 #2
0
        private void OutputCommandHelp(CommandProcessor processor, string[] input)
        {
            replBuffer.Add(String.Empty);

            if (input.Count() == 1)
                processor.OutputHelp();
            else
                processor.OutputComamndHelp(input[1]);

            screenManager.SetCurrentScreen(ScreenNames.Repl);
        }