示例#1
0
        public ConsoleInstance(LocalizationManager localizationProvider, IPersistence persistence)
        {
            Localization = localizationProvider;
            NameHint     = new CommandNameHint(m_Commands, false);
            OptionHint   = new CommandNameHint(m_Commands, true);

            InputModule   = new InputModule(this);
            HintModule    = new HintModule(this);
            HistoryModule = new HistoryModule(this);
            MacroModule   = new MacroModule(this);

            Persistence = (persistence ?? new MockPersistence());

            m_Modules = new List <AConsoleModule>()
            {
                InputModule, HintModule, HistoryModule, MacroModule
            };

            m_DefaultOptions = new List <AConsoleCommand>()
            {
                new RepeatOption(this)
            };

            for (int x = 0; x < m_Modules.Count; x++)
            {
                AConsoleModule module = m_Modules[x];
                module.Read(Persistence);
                module.BindEvents();
            }

            InputModule.SetInput("", 0);
        }
示例#2
0
 public MacroNameHint(MacroModule state, List <Macro> macros)
 {
     m_MacroState = state;
     m_Macros     = macros;
 }