public static async Task ShowIn(ViewStack viewStack) { var model = new MyModel(); var presenter = new MyPresenter(); presenter.targetView = viewStack.ShowView("7GUIs_Task4_Timer"); await presenter.LoadModelIntoView(model); }
public static async Task ShowIn(ViewStack viewStack) { TestDataStore(); DataStore <MyModel> store = NewDataStore(); MyPresenter presenter = new MyPresenter(); presenter.targetView = viewStack.ShowView("7GUIs_Task6_CircleDrawer"); await presenter.LoadModelIntoView(store); }
public static async Task ShowIn(ViewStack viewStack) { var model = new MyModel() { degreeInCelsius = 0 }; var presenter = new MyPresenter(); presenter.targetView = viewStack.ShowView("7GUIs_Task2_TemperatureConverter"); await presenter.LoadModelIntoView(model); }
public static async Task ShowIn(ViewStack viewStack) { MyModel model = new MyModel(null, ImmutableList <MyUser> .Empty); Middleware <MyModel> exampleMiddleware = Middlewares.NewLoggingMiddleware <MyModel>(); UndoRedoReducer <MyModel> undoLogic = new UndoRedoReducer <MyModel>(); DataStore <MyModel> store = new DataStore <MyModel>(undoLogic.Wrap(MyReducer), model, exampleMiddleware); MyPresenter presenter = new MyPresenter(); presenter.targetView = viewStack.ShowView("7GUIs_Task5_CRUD"); await presenter.LoadModelIntoView(store); }
public static async Task ShowIn(ViewStack viewStack) { // Call model unit tests manually before the UI is shown: CellsModelTests.TestFromAndToRowName(); CellsModelTests.TestDataStoreTransitiveChanges(); CellsModel model = new CellsModel(ImmutableDictionary <CellPos, Cell> .Empty); Middleware <CellsModel> logging = Middlewares.NewLoggingMiddleware <CellsModel>(); UndoRedoReducer <CellsModel> undoLogic = new UndoRedoReducer <CellsModel>(); DataStore <CellsModel> store = new DataStore <CellsModel>(undoLogic.Wrap(CellsReducers.MainReducer), model, logging); MyPresenter presenter = new MyPresenter(); presenter.targetView = viewStack.ShowView("7GUIs_Task7_Cells"); await presenter.LoadModelIntoView(store); await TaskV2.Delay(2000); Toast.Show("Now simulating some table model changes.."); // Simulate changes in the model to check if the UI updates correctly: CellsModelTests.SimulateSomeChangesInModel(store); }