Ejemplo n.º 1
0
 private void TxtBoxGen_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key == Key.Up)
         {
             e.Handled = true;
             TxtBoxRegion.Focus();
         }
         else if (e.Key == Key.Down)
         {
             e.Handled = true;
             TxtBoxName.Focus();
         }
         else if (e.Key == Key.Enter)
         {
             e.Handled = true;
             ButtonAdd.RaiseEvent(new RoutedEventArgs(System.Windows.Controls.Primitives.ButtonBase.ClickEvent));
         }
     }
     catch (Exception)
     {
         LabelMessage.Content = "Error during keyboard navigation.";
     }
 }
Ejemplo n.º 2
0
 private void BtnEnable_Click(object sender, System.EventArgs e)
 {
     groupBox1.Enabled = true;
     TxtBoxName.Focus();
 }
Ejemplo n.º 3
0
 public RegisterWindow()
 {
     InitializeComponent();
     TxtBoxName.Focus();
 }