Esempio n. 1
0
        private void SwitchToTheMainApplication(IClosableScreen thisLoginScreen, Person connectedUser)
        {
            ApplicationMainWindow appMainWindow = new ApplicationMainWindow();
            ApplicationViewModel  context       = new ApplicationViewModel(connectedUser, _messageBoxService);

            appMainWindow.DataContext = context;
            appMainWindow.Show();

            // Close this Login Window
            thisLoginScreen.CloseScreen();
        }
Esempio n. 2
0
        /// <summary>
        /// Closes the application and returns to the login menu
        /// </summary>
        /// <param name="thisApplicationScreen">ICloseableScreen object to close the application</param>
        private void LogoutUser(IClosableScreen thisApplicationScreen)
        {
            // Launch the login window
            LoginWindow    appLoginWindow = new LoginWindow();
            LoginViewModel context        = new LoginViewModel(_messageBoxService);

            appLoginWindow.DataContext = context;
            appLoginWindow.Show();

            // Close this Window
            thisApplicationScreen.CloseScreen();
        }