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() { _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); }