private void ajouterNouveauPrefixListCombo() { bool b = co.listNouveauPrefix.Any(tr => tr.myValue.Equals(comboBoxNouveauPrefix.Text, StringComparison.CurrentCultureIgnoreCase)); if (!b) { //KeyValuePair<string, string> kvp = new KeyValuePair<string, string>(((DicdepotDirectory.Count) + 1).ToString(), comboBoxDepot.Text); comboItem ci = new comboItem(((co.listNouveauPrefix.Count) + 1).ToString(), comboBoxNouveauPrefix.Text); co.listNouveauPrefix.Add(ci); comboBoxNouveauPrefix.Items.Add(ci); comboBoxNouveauPrefix.SelectedIndex = comboBoxNouveauPrefix.FindStringExact(ci.myValue); } }
private void ajouterPatternArechercherListCombo() { bool b = co.ListPatternARechercher.Any(tr => tr.myValue.Equals(comboBoxTxt2Change.Text, StringComparison.CurrentCultureIgnoreCase)); if (!b) { //String str = comboBoxTxt2Change.Text; //Char.ToUpper(str[0]); //comboBoxTxt2Change.Text = str; //KeyValuePair<string, string> kvp = new KeyValuePair<string, string>(((DicdepotDirectory.Count) + 1).ToString(), comboBoxDepot.Text); comboItem ci = new comboItem(((co.ListPatternARechercher.Count) + 1).ToString(), comboBoxTxt2Change.Text); co.ListPatternARechercher.Add(ci); comboBoxTxt2Change.Items.Add(ci); comboBoxTxt2Change.SelectedIndex = comboBoxTxt2Change.FindStringExact(ci.myValue); } }
private void ajouterWorkinglistCombo() { if (!Directory.Exists(comboBoxWorkingDirectory.Text)) { MessageBox.Show("Ce repertoire est introuvable : " + comboBoxWorkingDirectory.Text); return; } bool b = co.ListRepertoire2Travail.Any(tr => tr.myValue.Equals(comboBoxWorkingDirectory.Text, StringComparison.CurrentCultureIgnoreCase)); if (!b) { //KeyValuePair<string, string> kvp = new KeyValuePair<string, string>(((DicdepotDirectory.Count) + 1).ToString(), comboBoxDepot.Text); comboItem ci = new comboItem(((co.ListRepertoire2Travail.Count) + 1).ToString(), comboBoxWorkingDirectory.Text); co.ListRepertoire2Travail.Add(ci); comboBoxWorkingDirectory.Items.Add(ci); comboBoxWorkingDirectory.SelectedIndex = comboBoxWorkingDirectory.FindStringExact(ci.myValue); } }