Example #1
0
        public void LoginRoutine()
        {
            Logger.Log(LoggingLevel.Info, string.Format("Show login Screen"));
            LogInScreen logon = new LogInScreen();

#if DEBUG
            logon.HintVisible = true;
#endif
            bool?res = logon.ShowDialog();
            if (!res ?? true)
            {
                Logger.Log(LoggingLevel.Info, string.Format("Login Canceled Shutting down"));
                Shutdown(1);
            }
            else
            if (Authenticate(logon.UserName, logon.Password))
            {
                //StartupContainer();
                LogInScreen logon1 = new LogInScreen();
                logon1.Cashier = _cashier;
                logon1.Show();
                logon1.ShowOptions();
            }
            else
            {
                MessageBox.Show(
                    "Application is exiting due to invalid credentials",
                    "Application Exit",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
                Shutdown(1);
            }
        }
Example #2
0
        public void LoginRoutine()
        {
            LogInScreen logon = new LogInScreen();

#if DEBUG
            logon.HintVisible = true;
#endif
            bool?res = logon.ShowDialog();
            if (!res ?? true)
            {
                Shutdown(1);
            }
            else
            if (Authenticate(logon.UserName, logon.Password))
            {
                //StartupContainer();
                LogInScreen logon1 = new LogInScreen();
                logon1.Show();
                logon1.ShowOptions();
            }
            else
            {
                MessageBox.Show(
                    "Application is exiting due to invalid credentials",
                    "Application Exit",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
                Shutdown(1);
            }
        }