Пример #1
0
        /// <summary>
        /// Povratak na login screen.
        /// </summary>
        public static void ReturnToLoginWindow()
        {
            LoginWindow loginWindow = new LoginWindow();
            App.Current.MainWindow = loginWindow;

            mainWindow.Close();
            mainWindow = null;
            loginWindow.Show();

            currentAppContext = AppContext.Login;
        }
Пример #2
0
        public LoginController(Model model, Window view)
        {
            this.model = model;
            this.view = (LoginWindow) view;

            usernameStringBuilder = new StringBuilder();
            passwordStringBuilder = new StringBuilder();

            this.view.buttonLogin.IsEnabled = false;

            this.view.buttonLogin.Click += ActionLogin;
            this.view.textBoxPassword.KeyUp += ActionKeyPress;
            this.view.textBoxUsername.KeyUp += ActionKeyPress;
        }