Esempio n. 1
0
        public void SwapTo_RegularPropertiesApplied()
        {
            var original = A.Fake <ITextBoxWrapper>();

            _editableBehaviourTextboxStrategy.SwapTo(original, true);

            A.CallTo(() => _propertyApplier.Apply(original, _regularProperties)).MustHaveHappened();
        }
Esempio n. 2
0
        public void Build_NoStyle_CorrectCallsMade()
        {
            var tableLayout = A.Fake <ITableLayoutWrapper>();

            A.CallTo(() => _tableLayoutWrapperFactory.Create()).Returns(tableLayout);

            _centralLayoutBuilder.Build();

            A.CallTo(() => _propertyApplier.Apply(A <IControlProperties> .Ignored, A <IControlPropertiesStyle> .Ignored)).MustNotHaveHappened();
            A.CallTo(() => _layoutDecoratorApplier.Apply(tableLayout, _tableLayoutDecorators)).MustHaveHappened();
        }
Esempio n. 3
0
        public ITextBoxWrapper SwapTo(ITextBoxWrapper control, bool regularMode)
        {
            ITextBoxWrapper output;

            if (regularMode)
            {
//                control.Enter += OnEnter;
                control.TextChanged -= OnTextChanged;
                output = _propertyApplier.Apply(control, _regularProperties) as ITextBoxWrapper;
                //OnTextChanged(output, null);
            }
            else
            {
//                control.Enter -= OnEnter;
                control.TextChanged += OnTextChanged;
                output = _propertyApplier.Apply(control, _inEditProperties) as ITextBoxWrapper;
            }
            return(output);
        }
Esempio n. 4
0
        public ITableLayoutWrapper Build(IControlPropertiesStyle tablePropertiesStyle = null)
        {
            var middleLayoutPanel = _tableLayoutDecoratorApplier.Apply(_tableLayoutWrapperFactory.Create(), _tableLayoutDecorators);

            if (tablePropertiesStyle != null)
            {
                _propertyApplier.Apply(middleLayoutPanel, tablePropertiesStyle);
            }
            return(middleLayoutPanel);
        }