예제 #1
0
        public AdminPage(IViewModeFactory <AdminMode> fac)
        {
            factory = fac;

            initFields();
            Mode.Value = AdminMode.MAIN;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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;
        }