Example #1
0
        private void ajouterPathDestListCombo()
        {
            bool b = co.ListPathDestination.Any(tr => tr.myValue.Equals(comboBoxdestination.Text, StringComparison.CurrentCultureIgnoreCase));

            if (!b)
            {
                comboItem ci = new comboItem(((co.ListPathDestination.Count) + 1).ToString(), comboBoxdestination.Text);
                co.ListPathDestination.Add(ci);
                comboBoxdestination.Items.Add(ci);
                comboBoxdestination.SelectedIndex = comboBoxdestination.FindStringExact(ci.myValue);
            }
        }
Example #2
0
        private void ajouterDestinationlistCombo()
        {
            if (!Directory.Exists(comboBoxdestination.Text))
            {
                MessageBox.Show("Ce repertoire est introuvable : " + comboBoxdestination.Text);
                return;
            }

            bool b = co.ListPathDestination.Any(tr => tr.myValue.Equals(comboBoxdestination.Text, StringComparison.CurrentCultureIgnoreCase));

            if (!b)
            {
                //KeyValuePair<string, string> kvp = new KeyValuePair<string, string>(((DicdepotDirectory.Count) + 1).ToString(), comboBoxDepot.Text);
                comboItem ci = new comboItem(((co.ListPathDestination.Count) + 1).ToString(), comboBoxdestination.Text);
                co.ListPathDestination.Add(ci);
                comboBoxdestination.Items.Add(ci);
                comboBoxdestination.SelectedIndex = comboBoxdestination.FindStringExact(ci.myValue);
            }
        }
Example #3
0
        public void ajouterListContient()
        {
            if (fp.comboBoxContient.Text == "")
            {
                MessageBox.Show("la chaine est vide sortie ");
                return;
            }

            bool b = co.ListContient.Any(tr => tr.myValue.Equals(fp.comboBoxContient.Text, StringComparison.CurrentCultureIgnoreCase));

            if (!b)
            {
                //KeyValuePair<string, string> kvp = new KeyValuePair<string, string>(((DicdepotDirectory.Count) + 1).ToString(), comboBoxDepot.Text);
                comboItem ci = new comboItem(((co.ListContient.Count) + 1).ToString(), fp.comboBoxContient.Text);
                co.ListContient.Add(ci);
                co.strContient = fp.comboBoxContient.Text;
                fp.comboBoxContient.Items.Add(ci);
                fp.comboBoxContient.SelectedIndex = fp.comboBoxContient.FindStringExact(ci.myValue);
            }
        }