示例#1
0
 private void Limpiar()
 {
     TxtBox1.Clear();
     TxtBox2.Clear();
     TxtBox3.Clear();
     TxtBox4.Clear();
     TxtBox5.Clear();
 }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();
            Binding b = new Binding
            { // Initialze the same attributes as in XAML
                ElementName = "TxtBox1",
                Path        = new PropertyPath("Text")
            };

            b.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            TxtBox3.SetBinding(TextBox.TextProperty, b);

            people.Add(new Person("Ivan Ivanov", 39));
            people.Add(new Person("Petar Petrov", 21));
            people.Add(new Person("John Atanasoff", 80));
            StcPanel.DataContext = people;
            people.Add(new Person("Petya Petrova", 32));
        }
示例#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);
            }
        }