public MainFormProcessor(ITableLayoutWrapper mainLayout, ICentralLayoutBuilder centralLayoutBuilder, IDataEntryFormManager dataEntryFormManager, IVerticalScrollStrategy verticalScrollStrategy) { _centralLayoutBuilder = centralLayoutBuilder; _dataEntryFormManager = dataEntryFormManager; _mainLayout = mainLayout; _verticalScrollStrategy = verticalScrollStrategy; }
public void Setup() { _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>(); _hScrollPropertiesWrapper = A.Fake <IHScrollPropertiesWrapper>(); _vScrollPropertiesWrapper = A.Fake <IVScrollPropertiesWrapper>(); _win32Adapter = A.Fake <IWin32Adapter>(); _strategy = new VerticalScrollStrategy(_win32Adapter); }
public void Setup() { _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>(); _layoutColumnStyleCollectionWrapper = A.Fake <ITableLayoutColumnStyleCollectionWrapper>(); _layoutRowStyleCollectionWrapper = A.Fake <ITableLayoutRowStyleCollectionWrapper>(); _layoutControlCollectionWrapper = A.Fake <ITableLayoutControlCollectionWrapper>(); _dataEntryForm = new DataEntryForm(_tableLayoutWrapper); }
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); }
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); }
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); }
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; }
public void Setup() { _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>(); _tableLayoutDecorator1 = A.Fake <ITableLayoutDecorator>(); _tableLayoutDecorator2 = A.Fake <ITableLayoutDecorator>(); _tableLayoutDecorators = new List <ITableLayoutDecorator>() { _tableLayoutDecorator1, _tableLayoutDecorator2 }; _tableLayoutDecoratorApplier = new TableLayoutDecoratorApplier(); }
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); }
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); }
public ITableLayoutWrapper Apply(ITableLayoutWrapper input) { return(ApplyChanges(input)); }
public ITableLayoutWrapper ExecuteOn(ITableLayoutWrapper input) { return(ApplyChanges(input)); }
public void Setup() { _layoutColumnStyleCollectionWrapper = A.Fake <ITableLayoutColumnStyleCollectionWrapper>(); _tableLayoutWrapper = A.Fake <ITableLayoutWrapper>(); }