Example #1
0
 private void Nex_Click(object sender, RoutedEventArgs e)
 {
     if (ps1.Password == "123456")
     {
         Rigist ww = new Rigist();
         ww.Show();
         this.Close();
     }
 }
Example #2
0
 private void Window_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (ps1.Password == "123456")
         {
             Rigist ww = new Rigist();
             ww.Show();
             if (e.Key == Key.Escape)
             {
                 this.Close();
             }
         }
     }
     if (e.Key == Key.Escape)
     {
         this.Close();
     }
 }