コード例 #1
0
 private void Window_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Escape)
     {
         Close();
     }
     else if (e.Key == Key.Up && Pass_Txt.IsFocused)
     {
         User_Txt.Focus();
     }
     else if (e.Key == Key.Down)
     {
         if (User_Txt.IsFocused)
         {
             Pass_Txt.Focus();
         }
         else if (Pass_Txt.IsFocused)
         {
             Insert_CheckBox.Focus();
         }
     }
 }
コード例 #2
0
        public AddUser()
        {
            InitializeComponent();

            User_Txt.Focus();
        }