Esempio n. 1
0
        private void refreshView()
        {
            var parameters = _containers
                             .SelectMany(c => c.GetAllChildren <IParameter>(x => !x.IsDefault));

            _editParameterListPresenter.Edit(parameters);

            ColumnConfiguration(_editParameterListPresenter);
        }
Esempio n. 2
0
        private void updateFavorites()
        {
            var allFavoritesParameters = _favoriteRepository.All().Select(path => _parameterCache[path]).Where(p => p != null);

            _editParameterListPresenter.Edit(allFavoritesParameters);

            //name always visible
            _editParameterListPresenter.SetVisibility(PathElement.Name, isVisible: true);

            UpdateSpecialColumnsVisibility();
        }
Esempio n. 3
0
        protected override void Context()
        {
            _view = A.Fake <IUserDefinedParametersView>();
            _editParameterListPresenter = A.Fake <IEditParameterListPresenter>();
            sut = new UserDefinedParametersPresenter(_view, _editParameterListPresenter);

            _parameter1 = new Parameter().WithName("P1");
            _parameter2 = new Parameter().WithName("P2");
            _parameter3 = new Parameter().WithName("P3");

            _container1 = new Container {
                _parameter1, _parameter2
            };
            _container2 = new Container {
                _parameter3
            };

            _parameter1.IsDefault = true;
            _parameter2.IsDefault = false;
            _parameter3.IsDefault = false;

            A.CallTo(() => _editParameterListPresenter.Edit(A <IEnumerable <IParameter> > ._))
            .Invokes(x => _editedParameters = x.GetArgument <IEnumerable <IParameter> >(0).ToList());
        }