Exemplo n.º 1
0
        public void CanAddBindings()
        {
            var bindingAdder = new InputBindingAdder(_view,
                                                     new CommandContainer(new FullscreenCommand(_view),
                                                                          new RefreshCommand(_view),
                                                                          new ShowSettingsCommand(_view, _settingsWindow)));

            bindingAdder.AddBindings();

            _view.AssertWasCalled(v=>v.AddWindowBinding(Arg<InputBinding>.Is.Anything), v=>v.Repeat.AtLeastOnce());
        }
Exemplo n.º 2
0
        public CradiatorPresenter(ICradiatorView view, IConfigSettings configSettings,
		                          IConfigFileWatcher configFileWatcher, ISkinLoader skinLoader,
		                          ConfigChangeHandlerFarm changeHandlerFarm, IScreenUpdater screenUpdater,
		                          InputBindingAdder inputBindingAdder)
        {
            _view = view;
            view.Presenter = this;
            _configSettings = configSettings;
            _configFileWatcher = configFileWatcher;
            _screenUpdater = screenUpdater;
            _skinLoader = skinLoader;
            _changeHandlerFarm = changeHandlerFarm;

            inputBindingAdder.AddBindings();
            configSettings.AddObserver(this);
        }