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); }
/// <summary> /// Configures the relevant components that require knowledge of the Interactor. /// </summary> public virtual void ConfigureInteractor() { Pointer.FollowSource = Facade.FollowSource != null ? Facade.FollowSource : Facade.Interactor.gameObject; Grabber.Interactor = Facade.Interactor; PropertyApplier.SetSource(Facade.Interactor.gameObject); GrabProxy.RunWhenActiveAndEnabled(() => GrabProxy.ClearSources()); GrabProxy.RunWhenActiveAndEnabled(() => GrabProxy.AddSource(Facade.Interactor.GrabAction)); UnregisterInteractorListeners(); RegisterInteractorListeners(); }
/// <summary> /// Configures the transition duration for the snapping process. /// </summary> public virtual void ConfigurePropertyApplier() { PropertyApplier.RunWhenActiveAndEnabled(() => PropertyApplier.TransitionDuration = Facade.TransitionDuration); }
public void Setup() { _propertyApplier = new PropertyApplier <IGeneric>(); }