Exemple #1
0
 public MainFormProcessor(ITableLayoutWrapper mainLayout, ICentralLayoutBuilder centralLayoutBuilder, IDataEntryFormManager dataEntryFormManager, IVerticalScrollStrategy verticalScrollStrategy)
 {
     _centralLayoutBuilder   = centralLayoutBuilder;
     _dataEntryFormManager   = dataEntryFormManager;
     _mainLayout             = mainLayout;
     _verticalScrollStrategy = verticalScrollStrategy;
 }
Exemple #2
0
 public void Setup()
 {
     _tableLayoutWrapper       = A.Fake <ITableLayoutWrapper>();
     _hScrollPropertiesWrapper = A.Fake <IHScrollPropertiesWrapper>();
     _vScrollPropertiesWrapper = A.Fake <IVScrollPropertiesWrapper>();
     _win32Adapter             = A.Fake <IWin32Adapter>();
     _strategy = new VerticalScrollStrategy(_win32Adapter);
 }
Exemple #3
0
 public void Setup()
 {
     _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>();
     _layoutColumnStyleCollectionWrapper = A.Fake <ITableLayoutColumnStyleCollectionWrapper>();
     _layoutRowStyleCollectionWrapper    = A.Fake <ITableLayoutRowStyleCollectionWrapper>();
     _layoutControlCollectionWrapper     = A.Fake <ITableLayoutControlCollectionWrapper>();
     _dataEntryForm = new DataEntryForm(_tableLayoutWrapper);
 }
Exemple #4
0
 public void Setup()
 {
     _tableLayoutWrapper        = A.Fake <ITableLayoutWrapper>();
     _createdTableLayoutWrapper = A.Fake <ITableLayoutWrapper>();
     _centralLayoutBuilder      = A.Fake <ICentralLayoutBuilder>();
     _dataEntryFormManager      = A.Fake <IDataEntryFormManager>();
     _VerticalScrollStrategy    = A.Fake <IVerticalScrollStrategy>();
     _mainFormProcessor         = new MainFormProcessor(_tableLayoutWrapper, _centralLayoutBuilder, _dataEntryFormManager,
                                                        _VerticalScrollStrategy);
 }
Exemple #5
0
        public ITableLayoutWrapper Apply(ITableLayoutWrapper input, List <ITableLayoutDecorator> decorators)
        {
            ITableLayoutWrapper output = input;

            for (var i = 0; i < decorators.Count; i++)
            {
                output = decorators[i].Apply(output);
            }
            return(output);
        }
Exemple #6
0
        private ITableLayoutWrapper ApplyChanges(ITableLayoutWrapper input)
        {
            float diviser = 100 / _numCols;

            for (var i = 0; i < _numCols; i++)
            {
                input.AccessColumnStyles.Add(new ColumnStyle(SizeType.Percent, diviser));
            }
            input.ColumnCount = input.AccessColumnStyles.Count;
            return(input);
        }
Exemple #7
0
 public DataEntryForm(ITableLayoutWrapper tableLayoutWrapper)
 {
     _tableLayoutWrapper                 = tableLayoutWrapper;
     _tableLayoutWrapper.Dock            = DockStyle.Top;
     _tableLayoutWrapper.CellBorderStyle = TableLayoutPanelCellBorderStyle.Outset;
     _tableLayoutWrapper.AutoSize        = true;
     _tableLayoutWrapper.GrowStyle       = TableLayoutPanelGrowStyle.FixedSize;
     TrueControl                = _tableLayoutWrapper.TrueControl;
     _insertedControls          = new List <List <ITrueControl> >();
     _tableLayoutWrapper.Click += _tableLayoutWrapper_Click;
 }
Exemple #8
0
        public void Setup()
        {
            _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>();

            _tableLayoutDecorator1 = A.Fake <ITableLayoutDecorator>();
            _tableLayoutDecorator2 = A.Fake <ITableLayoutDecorator>();
            _tableLayoutDecorators = new List <ITableLayoutDecorator>()
            {
                _tableLayoutDecorator1, _tableLayoutDecorator2
            };
            _tableLayoutDecoratorApplier = new TableLayoutDecoratorApplier();
        }
Exemple #9
0
 private ITableLayoutWrapper ApplyChanges(ITableLayoutWrapper input)
 {
     if (_control == null)
     {
         _control         = input;
         input.AutoScroll = false;
         input.AccessHorizontalScroll.Maximum = 0;
         input.AccessVerticalScroll.Visible   = false;
         input.AccessHorizontalScroll.Visible = false;
         input.AutoScroll = true;
         input.Scroll    += Input_Scroll;
     }
     return(input);
 }
Exemple #10
0
        public void SetUpStatPage()
        {
            var centralLayoutStyle = new ControlPropertiesStyle
            {
                BackColor = Color.Aquamarine,
                Dock      = DockStyle.Fill,
                Margin    = new Padding(20)
            };

            _centralLayoutPanel = _centralLayoutBuilder.Build(centralLayoutStyle);
            _centralLayoutPanel = _verticalScrollStrategy.ExecuteOn(_centralLayoutPanel);

            _mainLayout.AccessControls.Add(_centralLayoutPanel, 2, 1);
            _centralLayoutPanel.AccessControls.Add(_dataEntryFormManager);
        }
Exemple #11
0
 public ITableLayoutWrapper Apply(ITableLayoutWrapper input)
 {
     return(ApplyChanges(input));
 }
Exemple #12
0
 public ITableLayoutWrapper ExecuteOn(ITableLayoutWrapper input)
 {
     return(ApplyChanges(input));
 }
Exemple #13
0
 public void Setup()
 {
     _layoutColumnStyleCollectionWrapper = A.Fake <ITableLayoutColumnStyleCollectionWrapper>();
     _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>();
 }