private static void CreateStateInstances(IApplicationController applicationController, IItemFormatter itemFormatter, IMargin labelMargin, out IBackgroundState backgroundState, out IGridState gridState, out IScaleState scaleState, out IDataDrawState graphState, out IScalingState scalingState, out IGraphControlFormState graphControlFormState) { backgroundState = new BackgroundState(); applicationController.RegisterInstance <IBackgroundState>(backgroundState); gridState = new GridState(); gridState.LabelPadding = labelMargin; gridState.ItemFormatter = itemFormatter; applicationController.RegisterInstance <IGridState>(gridState); scaleState = new ScaleState(); applicationController.RegisterInstance <IScaleState>(scaleState); graphState = new DataDrawState(); applicationController.RegisterInstance <IDataDrawState>(graphState); scalingState = new ScalingState(); applicationController.RegisterInstance <IScalingState>(scalingState); graphControlFormState = new GraphControlFormState(); applicationController.RegisterInstance <IGraphControlFormState>(graphControlFormState); }
public BackgroundNodeTests() { initialState = A.Dummy <IBackgroundState>(); newState = A.Dummy <IBackgroundState>(); when = A.Dummy <ICondition>(); context = A.Dummy <INavigationContext>(); context.State.Background = initialState; sut = new BackgroundNode(newState, when); }
private static void CreateStateInstancees(IApplicationController applicationController, out IBackgroundState backgroundState, out IGridState gridState, out IScaleState scaleState, out IDataDrawState graphState, out IGraphControlFormState graphControlFormState) { backgroundState = new BackgroundState(); applicationController.RegisterInstance <IBackgroundState>(backgroundState); gridState = new GridState(); applicationController.RegisterInstance <IGridState>(gridState); scaleState = new ScaleState(); applicationController.RegisterInstance <IScaleState>(scaleState); graphState = new DataDrawState(); applicationController.RegisterInstance <IDataDrawState>(graphState); graphControlFormState = new GraphControlFormState(); applicationController.RegisterInstance <IGraphControlFormState>(graphControlFormState); }
private static void CreateViewInstances(IApplicationController applicationController, IGraphControlView controlView, IDataService dataService, IScaleService scaleService, IBackgroundView userBackgroundView, IGridView userGridView, IDataView userDataView, IScalingSelectionView userScalingSelectionView, IBackgroundState userBackgroundState, IGridState userGridState, IDataDrawState userDataDrawState, out IBackgroundPresenter backgroundPresenter, out IGridPresenter gridPresenter, out IDataPresenter dataPresenter, out IScalingSelectionView scalingView) { var backgroundView = userBackgroundView ?? new BackgroundView(); backgroundPresenter = new BackgroundPresenter(backgroundView, userBackgroundState); applicationController.RegisterInstance <IBackgroundPresenter>(backgroundPresenter); var gridView = userGridView ?? new GridView(scaleService); gridPresenter = new GridPresenter(gridView, userGridState); applicationController.RegisterInstance <IGridPresenter>(gridPresenter); var dataView = userDataView ?? new DataView(scaleService, dataService); dataPresenter = new DataPresenter(dataView, userDataDrawState, dataService); applicationController.RegisterInstance <IDataPresenter>(dataPresenter); scalingView = userScalingSelectionView ?? new ScalingView(); // Register IGraphControlView here applicationController.RegisterInstance <IGraphControlView>(controlView); }
public BackgroundPresenter(IBackgroundView view, IBackgroundState state) { this.View = view; this.state = state; }
public BackgroundNode(IBackgroundState state, ICondition?when) => (State, When) = (state, when);
public BackgroundChangeEvent(IBackgroundState state) => State = state;