static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var mainForm = new MainForm(); var tableLayoutWrapperFactory = new TableLayoutWrapperFactory(); var centralLayoutBuilderDecorators = new List <ITableLayoutDecorator> { new EqualColumnsTableLayoutDecorator(2) }; var centralLayoutBuilder = new CentralLayoutBuilder(new TableLayoutDecoratorApplier(), centralLayoutBuilderDecorators, tableLayoutWrapperFactory, new PropertyApplier <IControlProperties>()); var textBoxStyleApplier = new PropertyApplier <ITextBoxProperties>(); var dataEntryFormManager = new DataEntryFormManager( new DataEntryFormBuilder(tableLayoutWrapperFactory), new DataMapper(new EditableTextBoxBuilder(new TextBoxWrapperFactory(), new SwappableStrategyFactory(textBoxStyleApplier), new EditableTextBoxFactory()), new ControlPropertiesFactory())); var verticalScrollStrategy = new VerticalScrollStrategy(new Win32Adapter(new NativeMethods())); var mainFormProcessor = new MainFormProcessor(mainForm.MainLayoutPanel, centralLayoutBuilder, dataEntryFormManager, verticalScrollStrategy); mainForm.MainFormProcessor = mainFormProcessor; mainFormProcessor.SetUpStatPage(); Application.Run(mainForm); }
public void Setup() { _tableLayoutDecorators = new List <ITableLayoutDecorator>(); _layoutDecoratorApplier = A.Fake <ITableLayoutDecoratorApplier>(); _tableLayoutWrapperFactory = A.Fake <ITableLayoutWrapperFactory>(); _propertyApplier = A.Fake <IPropertyApplier <IControlProperties> >(); _centralLayoutBuilder = new CentralLayoutBuilder(_layoutDecoratorApplier, _tableLayoutDecorators, _tableLayoutWrapperFactory, _propertyApplier); }