Example #1
0
        public void LogIn_Action()
        {
            CurrentUser = CryptoServices.LogIn(UserName, Password);
            if (CurrentUser == null)
            {
                MessageBox.Show("Login Not successful");
                Password = null;
            }
            else
            {
#if DEBUG
                Trace.WriteLine($"[LoginViewModel]: Welcome, {CurrentUser.Identity.Name}, Is Authenticated: {CurrentUser.Identity.IsAuthenticated}");
                Trace.Flush();
#endif

                Window wkspace = new WorkspaceWindow();
                wkspace.Show();
                Application.Current.MainWindow = wkspace;
                Application.Current.Windows[0].Close();
            }
        }