예제 #1
0
 private void BtnSup_Click(object sender, EventArgs e)
 {
     if (CoBoxSource.Items.Contains(LBoxCible.SelectedItem) == false && LBoxCible.Text != "")
     {
         CoBoxSource.Items.Add(LBoxCible.SelectedItem);
         LBoxCible.Items.Remove((string)LBoxCible.SelectedItem);
     }
     LBoxCible.Focus();
 }
예제 #2
0
        private void BtnTtAjout_Click(object sender, EventArgs e)
        {
            BoutonTtAddActif();
            for (int i = 0; i < BindingList1.Count; i++)
            {
                LBoxCible.Items.Add(BindingList1[i]);
            }
            CoBoxSource.Items.Clear();
            LBoxCible.Focus();


            //2nde possibilité

            /*for (int i = 0; i < CoBoxSource.Items.Count; i++)
             * {
             *  CoBoxSource.Items.RemoveAt(0);
             * }*/
        }