Here are the examples of the csharp api class System.Windows.Forms.AutoCompleteStringCollection.Contains(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
9 Examples
0
1. Example
Project: 32feet
Source File: FormConsole.cs
Source File: FormConsole.cs
void AddKnownAddress(InTheHand.Net.BluetoothAddress value) { var text = value.ToString("C"); if (!_knownAddresses.Contains(text)) { _knownAddresses.Add(text); } }
0
2. Example
Project: profit-calc
Source File: ProfitCalc.cs
Source File: ProfitCalc.cs
private void UpdateHistoricAlgo(IEnumerable<CustomAlgo> customAlgoList) { if (_historicAlgoList == null) { _historicAlgoList = new AutoCompleteStringCollection(); } foreach (CustomAlgo customAlgo in customAlgoList) { if (!_historicAlgoList.Contains(customAlgo.Name)) { _historicAlgoList.Add(customAlgo.Name); } } }
0
3. Example
Project: FindUnusedFiles
Source File: FormMain.cs
Source File: FormMain.cs
void UpateAutoCompleteSource(TextBox textbox, string setting) { if (IsRegexPatternValid(textbox.Text)) { if (!textbox.AutoCompleteCustomSource.Contains(textbox.Text)) { var settings = Properties.Settings.Default; var patternCollection = ((StringCollection) settings[setting]); // add to top of list patternCollection.Insert(0, textbox.Text); settings.Save(); // refresh autocomplete list SetAutoCompleteSource(textbox, setting); } } }
0
4. Example
Project: FindUnusedFiles
Source File: FormMain.cs
Source File: FormMain.cs
void UpateAutoCompleteSource(TextBox textbox, string setting) { if (IsRegexPatternValid(textbox.Text)) { if (!textbox.AutoCompleteCustomSource.Contains(textbox.Text)) { var settings = Properties.Settings.Default; var patternCollection = ((StringCollection) settings[setting]); // add to top of list patternCollection.Insert(0, textbox.Text); settings.Save(); // refresh autocomplete list SetAutoCompleteSource(textbox, setting); } } }
0
5. Example
Project: libpalaso
Source File: ContributorsListControlViewModelTests.cs
Source File: ContributorsListControlViewModelTests.cs
[Test] public void GetAutoCompleteNames_HasGatherer_ReturnsNames() { var gatherer = new Mock<IAutoCompleteValueProvider>(); gatherer.Setup(g => g.GetValuesForKey("person")).Returns(new[] { "jimmy", "tommy" }); _model = new ContributorsListControlViewModel(gatherer.Object, null); var names = _model.GetAutoCompleteNames(); Assert.AreEqual(2, names.Count); Assert.IsTrue(names.Contains("jimmy")); Assert.IsTrue(names.Contains("tommy")); }
0
6. Example
Project: xenadmin
Source File: Settings.cs
Source File: Settings.cs
public static void UpdateServerHistory(string hostnameWithPort) { AutoCompleteStringCollection history = GetServerHistory(); if (!history.Contains(hostnameWithPort)) { while (history.Count >= 20) history.RemoveAt(0); history.Add(hostnameWithPort); Properties.Settings.Default.ServerHistory = history; TrySaveSettings(); } }
0
7. Example
Project: FindUnusedFiles
Source File: FormMain.cs
Source File: FormMain.cs
void RemoveFromAutoCompleteSource(TextBox textbox, string setting) { if (IsRegexPatternValid(textbox.Text)) { if (textbox.AutoCompleteCustomSource.Contains(textbox.Text)) { var settings = Properties.Settings.Default; var patternCollection = (StringCollection)settings[setting]; // add to top of list patternCollection.Remove(textbox.Text); textbox.AutoCompleteCustomSource.Remove(textbox.Text); settings.Save(); textbox.Text = patternCollection.Cast<string>().FirstOrDefault(); } } }
0
8. Example
Project: FindUnusedFiles
Source File: FormMain.cs
Source File: FormMain.cs
void RemoveFromAutoCompleteSource(TextBox textbox, string setting) { if (IsRegexPatternValid(textbox.Text)) { if (textbox.AutoCompleteCustomSource.Contains(textbox.Text)) { var settings = Properties.Settings.Default; var patternCollection = (StringCollection)settings[setting]; // add to top of list patternCollection.Remove(textbox.Text); textbox.AutoCompleteCustomSource.Remove(textbox.Text); settings.Save(); textbox.Text = patternCollection.Cast<string>().FirstOrDefault(); } } }
0
9. Example
Project: referencesource
Source File: TypeBrowserDialog.cs
Source File: TypeBrowserDialog.cs
private void UpdateTreeView(Type[] types, AutoCompleteStringCollection autoCompleteStringCollection)/n ..... /n //View Source file for more details /n }