/// <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; }
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; }