示例#1
0
        public void SetUp()
        {
            _mocks = new MockRepository();

            _commandManager = _mocks.StrictMock<ICommandManager>();
            _commandLoader = _mocks.StrictMock<ICommandLoader>();
            _commandHost = new CommandHost(_commandManager, _commandLoader);
        }
示例#2
0
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);

            _tabSettings = _applicationSettingsManager.LoadTabSettings();

            _shellIntegration.ThumbnailActivated += (tabSender, eArgs) => _commandTabContainer.SelectTab(tabSender as TabPage);
            _shellIntegration.ThumbnailClosed += (tabSender, eArgs) => CloseTab(tabSender as TabPage);
            _shellIntegration.Init();

            _commandHost = new CommandHost(_internalCommandManager, _commandLoader);
            _commandLoadStatusViewPresenter = new CommandLoadStatusViewPresenter(statusBar, _commandHost, tslCommandsStatus);
            _commandLoadStatusViewPresenter.Init();

            NewCommandTab();

            _commandHistoryManager.Init();
            _autoCompletePresenter.Init();
            _autoCompletePresenter.ItemClicked += (sender, commandArg) => {
                _autoCompletePresenter.Hide();

                var tabPresenter = GetActiveTab();
                tabPresenter.InsertCommand(commandArg.Command);
                tabPresenter.Focus();
            };

            _clipboardHistoryPresenter.Init();
        }