示例#1
0
 private void TxtBox2_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         TxtBox2.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
     }
 }
示例#2
0
 private void Limpiar()
 {
     TxtBox1.Clear();
     TxtBox2.Clear();
     TxtBox3.Clear();
     TxtBox4.Clear();
     TxtBox5.Clear();
 }
示例#3
0
        /// <summary>
        /// Méthode de rénitialisation de la fenetre
        /// </summary>
        private void Renitialisation()
        {
            MessageBox.Show("Le pokémon " + TxtBox1.Text + " est enregistré avec succès. \n", "Enregistrement");

            //Rénitialiser le tout
            TxtBox1.Clear();
            TxtBox2.Clear();
            TxtBox3.Clear();
            ComboBox1.SelectedItem       = null;
            CheckedListBox1.SelectedItem = null;
            RadioBtn1.Checked            = false;
            RadioBtn2.Checked            = false;
            CheckBox1.Checked            = false;
            Lbl6.Enabled    = false;
            TxtBox3.Enabled = false;

            foreach (int i in CheckedListBox1.CheckedIndices)
            {
                CheckedListBox1.SetItemCheckState(i, CheckState.Unchecked);
            }
        }