public LoginWindow(MainWindow mainWindow, Logic logicRef) { mainWindow_ = mainWindow; logicRef_ = logicRef; InitializeComponent(); TB_username.Focus(); TB_username.SelectAll(); }
//Opretter en metode der verificerer logindet private void verifyLogin() { if (logicRef_.checkLogin(TB_username.Text, PWB_password.Password)) { this.Close(); mainWindow_.Show(); mainWindow_.SoSecNb = TB_username.Text.ToString(); } else { MessageBox.Show("Forkert brugernavn eller adgangskode"); PWB_password.Password = ""; TB_username.Focus(); TB_username.SelectAll(); } }