Example #1
0
        private void login_Click(object sender, RoutedEventArgs e)
        {
            //  string name = name.Text;
              //  MessageBox.Show(name.Text+passwd.Text);
            if (string.IsNullOrEmpty(name.Text) || string.IsNullOrEmpty(passwd.Text))
            {
                MessageBox.Show("不能有空项");
            }
            else if (name.Text == "yu" && passwd.Text == "111")
            {
              //  MessageBox.Show("登陆成功");

                Window1 w1 = new Window1();
                w1.Show();
                this.Close();

            }
            else
            {
                message.Content = "用户名或密码错误";
            }
        }
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     Window1 obj = new Window1();
     obj.Show();
 }
Example #3
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     Window1 w = new Window1();
        w.Show();
 }
Example #4
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Window1 W1 = new Window1();
     W1.Show();
     this.Close();
 }