public AdminPage(IViewModeFactory <AdminMode> fac) { factory = fac; initFields(); Mode.Value = AdminMode.MAIN; }
public LoginPage(Credentials cred) { factory = new LoginViewModeFactory(cred, handleViewModeChanged); credentials = cred; credentials.LoggedIn += handleLoggedIn; credentials.LoggedOut += handleLoggedOut; initFields(); Mode.setBackingField(LoginMode.LOGIN); Visible.Value = Visibility.Collapsed; }
public MainView(Credentials cred, NavigationView nav, SimpleSearchBar search, IViewModeFactory <MainViewMode> fac, IViewModeFactory <PopupViewMode> pop) { credentials = cred; NavView = nav; SearchView = search; main_factory = fac; pop_factory = pop; initFields(); Mode.Value = MainViewMode.SEARCH; PopMode.Value = PopupViewMode.NONE; NavView.AdminSelected += handleAdminSelection; NavView.PopupLaunched += handlePopupLaunched; SearchView.Searched += handleSearch; SearchView.AdvancedSearch += handleAdvancedSearch; }