Beispiel #1
0
        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");
            }
        }