private void Button_Click(object sender, RoutedEventArgs e) { Window2 addbook = new Window2(); addbook.Show(); this.Close(); }
private void Button_Click(object sender, RoutedEventArgs e) { Window bookswindow = new Window2(); if (txtuser.Text.ToString().Equals("tohan") && txtpass.Password.Equals("tohan")) { MessageBox.Show("Welcome Mr.Tohan"); bookswindow.Show(); this.Close(); } else { MessageBox.Show("Wrong username or password. Check again"); } }