Example #1
0
        public MainWindow()
        {
            Application.Current.DispatcherUnhandledException += (_, e) => {
                MaterialDesignThemes.Wpf.DialogHost.Show(e.Exception, "general_error_dialog_host");
                e.Handled = true;
            };

            InitializeComponent();
            OriginalTitle = Title;
            Business      = BusinessFactory.New();

            AdminSession = new Session <Admin>(Business, AdminPage);
            HostSession  = new Session <Host>(Business, HostPage);
            GuestSession = new Session <Guest>(Business, GuestPage);

            AdminPage.Navigate(new AdminSignInPage(Business, AdminSession, AdminPage));
            HostPage.Navigate(new HostSignInPage(Business, HostSession, HostPage));
            GuestPage.Navigate(new GuestSignInPage(Business, GuestSession, GuestPage));
        }