System.Windows.Forms.AutoCompleteStringCollection.AddRange(string[])

Here are the examples of the csharp api class System.Windows.Forms.AutoCompleteStringCollection.AddRange(string[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

31 Examples 7

1. Example

View license
private void ReviewersDataGridEditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
        {
            var cellEdit = e.Control as DataGridViewTextBoxEditingControl;
            if (cellEdit != null)
            {
                cellEdit.AutoCompleteCustomSource = new AutoCompleteStringCollection();
                cellEdit.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
                cellEdit.AutoCompleteSource = AutoCompleteSource.CustomSource;
                cellEdit.AutoCompleteCustomSource.AddRange(_stashUsers.ToArray());
            }
        }

2. Example

Project: 32feet
Source File: FormConsole.cs
View license
void LoadKnownAddresses()
        {
            _knownAddresses = new AutoCompleteStringCollection();
            _formReadAddress.SetKnownAddressList(_knownAddresses);
            string[] lines;
            try {
                lines = File.ReadAllLines(_knownAddressesPath);
            } catch (FileNotFoundException) {
                return;
            }
            _knownAddresses.AddRange(lines);
        }

3. Example

View license
public override object Clone()
        {
            KryptonDataGridViewComboBoxColumn cloned = base.Clone() as KryptonDataGridViewComboBoxColumn;

            // Convert collection of strings to an array
            string[] strings = new string[Items.Count];
            for (int i = 0; i < strings.Length; i++)
                strings[i] = Items[i];

            cloned.Items.AddRange(strings);

            // Convert collection of strings to an array
            strings = new string[AutoCompleteCustomSource.Count];
            for (int i = 0; i < strings.Length; i++)
                strings[i] = AutoCompleteCustomSource[i];

            cloned.AutoCompleteCustomSource.AddRange(strings);


            // Move the button specs over to the new clone
            foreach (ButtonSpec bs in ButtonSpecs)
                cloned.ButtonSpecs.Add(bs.Clone());

            return cloned;
        }

4. Example

View license
private void main_Load(object sender, EventArgs e)
        {
            configItemBindingSource.DataSource = items;

            var source = new AutoCompleteStringCollection();
            source.AddRange(Games.Select(x => x.Name).ToArray());

            inputAppID.AutoCompleteCustomSource = source;
            inputAppID.AutoCompleteSource = AutoCompleteSource.CustomSource;
            inputAppID.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
        }

5. Example

Project: xenadmin
Source File: AddServerDialog.cs
View license
protected void PopulateXenServerHosts()
        {
            AutoCompleteStringCollection history = Settings.GetServerHistory();

            string[] historyArray = new string[history.Count];
            history.CopyTo(historyArray, 0);
            Array.Sort(historyArray, StringUtility.NaturalCompare);
            foreach (string serverName in historyArray)
            {
                if (serverName != null)
                    ServerNameComboBox.Items.Add(serverName);
            }

            // Use a clone as the auto-complete source because of CA-38715
            AutoCompleteStringCollection historyClone = new AutoCompleteStringCollection();
            historyClone.AddRange(historyArray);
            ServerNameComboBox.AutoCompleteCustomSource = historyClone;
        }

6. Example

Project: ARKStatsExtractor
Source File: TribesControl.cs
View license
private void updateTribeSuggestions()
        {
            var l = new AutoCompleteStringCollection();
            l.AddRange(tribes.Select(t => t.TribeName).ToArray());
            textBoxPlayerTribe.AutoCompleteCustomSource = l;
        }

7. Example

Project: SharpSCADA
Source File: TagComplexEditor.cs
View license
private void TagComplexEditor_Load(object sender, System.EventArgs e)
        {
            if (_tag == null) return;
            if (string.IsNullOrEmpty(_tag.TagReadText))
            {
                _dict = new Dictionary<string, string>();
            }
            else
            {
                _dict = _tag.TagReadText.GetListFromText();
                foreach (var item in _dict)
                {
                    dataGridView1.Rows.Add(item.Key, item.Value);
                }
            }
            var list = TagList.GetTagNameList();
            scAutoComplete.AddRange(list.ToArray());
            _top = new TreeNode(_tag.Node);
            treeView1.Nodes.Add(_top);
            AddTreeNode(_tag, _top);
            treeView1.ExpandAll();
            //coolTextBox1. = list;
            this.Validate();
            dataGridView1.RowValidating += new DataGridViewCellCancelEventHandler(dataGridView1_RowValidating);
        }

8. Example

Project: FindUnusedFiles
Source File: FormMain.cs
View license
void SetAutoCompleteSource(TextBox textbox, string setting)
        {
            var settings               = Properties.Settings.Default;
            var patternCollection      = ((StringCollection)settings[setting]).Cast<string>().ToArray();
            var autoCompleteCollection = new AutoCompleteStringCollection();

            autoCompleteCollection.AddRange(patternCollection);

            textbox.AutoCompleteCustomSource = autoCompleteCollection;
            textbox.Text                     = patternCollection.FirstOrDefault();
        }

9. Example

Project: FindUnusedFiles
Source File: FormMain.cs
View license
void SetAutoCompleteSource(TextBox textbox, string setting)
        {
            var settings               = Properties.Settings.Default;
            var patternCollection      = ((StringCollection)settings[setting]).Cast<string>().ToArray();
            var autoCompleteCollection = new AutoCompleteStringCollection();

            autoCompleteCollection.AddRange(patternCollection);

            textbox.AutoCompleteCustomSource = autoCompleteCollection;
            textbox.Text                     = patternCollection.FirstOrDefault();
        }

10. Example

Project: MvvmFx
Source File: AutoTreeView.Designer.cs
View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

11. Example

Project: MvvmFx
Source File: AutoTreeView.Designer.cs
View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

12. Example

Project: Wolven-kit
Source File: BundleManager.cs
View license
public void RebuildAutoCompleteSource()
        {
            AutocompleteSource.AddRange(FileList.Select(x => GetFileName(x.Name)).Distinct().ToArray());
        }

13. Example

Project: Wolven-kit
Source File: TextureManager.cs
View license
public void RebuildAutoCompleteSource()
        {
            AutocompleteSource.AddRange(FileList.Select(x => GetFileName(x.Name)).Distinct().ToArray());
        }

14. Example

Project: Wolven-kit
Source File: SoundManager.cs
View license
public void RebuildAutoCompleteSource()
        {
            AutocompleteSource.AddRange(FileList.Select(x => GetFileName(x.Name)).Distinct().ToArray());
        }

15. Example

View license
private void InitializeComponent()
        {
            this.lblInstructions = new System.Windows.F/n ..... /n //View Source file for more details /n }

16. Example

Project: gitextensions
Source File: FilterBranchHelper.cs
View license
public void InitToolStripBranchFilter()
        {
            bool local = localToolStripMenuItem.Checked;
            bool tag = tagsToolStripMenuItem.Checked;
            bool remote = remoteToolStripMenuItem.Checked;

            _NO_TRANSLATE_toolStripBranches.Items.Clear();

            if (Module.IsValidGitWorkingDir())
            {
                AsyncLoader.DoAsync(() => GetBranchAndTagRefs(local, tag, remote),
                    branches =>
                    {
                        foreach (var branch in branches)
                            _NO_TRANSLATE_toolStripBranches.Items.Add(branch);

                        var autoCompleteList = _NO_TRANSLATE_toolStripBranches.AutoCompleteCustomSource.Cast<string>();
                        if (!autoCompleteList.SequenceEqual(branches))
                        {
                            _NO_TRANSLATE_toolStripBranches.AutoCompleteCustomSource.Clear();
                            _NO_TRANSLATE_toolStripBranches.AutoCompleteCustomSource.AddRange(branches.ToArray());
                        }
                    });
            }

            _NO_TRANSLATE_toolStripBranches.Enabled = Module.IsValidGitWorkingDir();
        }

17. Example

View license
public void ConfigureAutoComplete(TextBox tb, OLVColumn column, int maxRows) {
            // Don't consider more rows than we actually have
            maxRows = Math.Min(this.GetItemCount(), maxRows);

            // Reset any existing autocomplete
            tb.AutoCompleteCustomSource.Clear();

            // CONSIDER: Should we use ClusteringStrategy here?

            // Build a list of unique values, to be used as autocomplete on the editor
            Dictionary<string, bool> alreadySeen = new Dictionary<string, bool>();
            List<string> values = new List<string>();
            for (int i = 0; i < maxRows; i++) {
                string valueAsString = column.GetStringValue(this.GetModelObject(i));
                if (!String.IsNullOrEmpty(valueAsString) && !alreadySeen.ContainsKey(valueAsString)) {
                    values.Add(valueAsString);
                    alreadySeen[valueAsString] = true;
                }
            }

            tb.AutoCompleteCustomSource.AddRange(values.ToArray());
            tb.AutoCompleteSource = AutoCompleteSource.CustomSource;
            tb.AutoCompleteMode = column.AutoCompleteEditorMode;
        }

18. Example

Project: ZKWeb
Source File: MainForm.Designer.cs
View license
private void InitializeComponent() {
			System.ComponentModel.ComponentResourceManager resources = n/n ..... /n //View Source file for more details /n }

19. Example

Project: tesvsnip
Source File: ObjectListView.cs
View license
public void ConfigureAutoComplete(TextBox tb, OLVColumn column, int maxRows)
        {
            // Don't consider more rows than we actually have
            maxRows = Math.Min(GetItemCount(), maxRows);

            // Reset any existing autocomplete
            tb.AutoCompleteCustomSource.Clear();

            // CONSIDER: Should we use ClusteringStrategy here?

            // Build a list of unique values, to be used as autocomplete on the editor
            var alreadySeen = new Dictionary<string, bool>();
            var values = new List<string>();
            for (int i = 0; i < maxRows; i++)
            {
                string valueAsString = column.GetStringValue(GetModelObject(i));
                if (!String.IsNullOrEmpty(valueAsString) && !alreadySeen.ContainsKey(valueAsString))
                {
                    values.Add(valueAsString);
                    alreadySeen[valueAsString] = true;
                }
            }

            tb.AutoCompleteCustomSource.AddRange(values.ToArray());
            tb.AutoCompleteSource = AutoCompleteSource.CustomSource;
            tb.AutoCompleteMode = column.AutoCompleteEditorMode;
        }

20. Example

Project: falloutsnip
Source File: ObjectListView.cs
View license
public void ConfigureAutoComplete(TextBox tb, OLVColumn column, int maxRows)
        {
            // Don't consider more rows than we actually have
            maxRows = Math.Min(GetItemCount(), maxRows);

            // Reset any existing autocomplete
            tb.AutoCompleteCustomSource.Clear();

            // CONSIDER: Should we use ClusteringStrategy here?

            // Build a list of unique values, to be used as autocomplete on the editor
            var alreadySeen = new Dictionary<string, bool>();
            var values = new List<string>();
            for (int i = 0; i < maxRows; i++)
            {
                string valueAsString = column.GetStringValue(GetModelObject(i));
                if (!String.IsNullOrEmpty(valueAsString) && !alreadySeen.ContainsKey(valueAsString))
                {
                    values.Add(valueAsString);
                    alreadySeen[valueAsString] = true;
                }
            }

            tb.AutoCompleteCustomSource.AddRange(values.ToArray());
            tb.AutoCompleteSource = AutoCompleteSource.CustomSource;
            tb.AutoCompleteMode = column.AutoCompleteEditorMode;
        }

21. Example

View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

22. Example

Project: SAI-Editor
Source File: UserControl.Designer.cs
View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

23. Example

Project: logwizard
Source File: ObjectListView.cs
View license
public void ConfigureAutoComplete(TextBox tb, OLVColumn column, int maxRows) {
            // Don't consider more rows than we actually have
            maxRows = Math.Min(this.GetItemCount(), maxRows);

            // Reset any existing autocomplete
            tb.AutoCompleteCustomSource.Clear();

            // CONSIDER: Should we use ClusteringStrategy here?

            // Build a list of unique values, to be used as autocomplete on the editor
            Dictionary<string, bool> alreadySeen = new Dictionary<string, bool>();
            List<string> values = new List<string>();
            for (int i = 0; i < maxRows; i++) {
                string valueAsString = column.GetStringValue(this.GetModelObject(i));
                if (!String.IsNullOrEmpty(valueAsString) && !alreadySeen.ContainsKey(valueAsString)) {
                    values.Add(valueAsString);
                    alreadySeen[valueAsString] = true;
                }
            }

            tb.AutoCompleteCustomSource.AddRange(values.ToArray());
            tb.AutoCompleteSource = AutoCompleteSource.CustomSource;
            tb.AutoCompleteMode = column.AutoCompleteEditorMode;
        }

24. Example

Project: adbGUI
Source File: Main.Designer.cs
View license
private void InitializeComponent()
            {
            this.components = new System.ComponentM/n ..... /n //View Source file for more details /n }

25. Example

Project: SquareOne
Source File: ObjectListView.cs
View license
public void ConfigureAutoComplete(TextBox tb, OLVColumn column, int maxRows) {
            // Don't consider more rows than we actually have
            maxRows = Math.Min(this.GetItemCount(), maxRows);

            // Reset any existing autocomplete
            tb.AutoCompleteCustomSource.Clear();

            // CONSIDER: Should we use ClusteringStrategy here?

            // Build a list of unique values, to be used as autocomplete on the editor
            Dictionary<string, bool> alreadySeen = new Dictionary<string, bool>();
            List<string> values = new List<string>();
            for (int i = 0; i < maxRows; i++) {
                string valueAsString = column.GetStringValue(this.GetModelObject(i));
                if (!String.IsNullOrEmpty(valueAsString) && !alreadySeen.ContainsKey(valueAsString)) {
                    values.Add(valueAsString);
                    alreadySeen[valueAsString] = true;
                }
            }

            tb.AutoCompleteCustomSource.AddRange(values.ToArray());
            tb.AutoCompleteSource = AutoCompleteSource.CustomSource;
            tb.AutoCompleteMode = column.AutoCompleteEditorMode;
        }

26. Example

Project: MapViewer
Source File: ObjectListView.cs
View license
public void ConfigureAutoComplete(TextBox tb, OLVColumn column, int maxRows) {
            // Don't consider more rows than we actually have
            maxRows = Math.Min(this.GetItemCount(), maxRows);

            // Reset any existing autocomplete
            tb.AutoCompleteCustomSource.Clear();

            // CONSIDER: Should we use ClusteringStrategy here?

            // Build a list of unique values, to be used as autocomplete on the editor
            Dictionary<string, bool> alreadySeen = new Dictionary<string, bool>();
            List<string> values = new List<string>();
            for (int i = 0; i < maxRows; i++) {
                string valueAsString = column.GetStringValue(this.GetModelObject(i));
                if (!String.IsNullOrEmpty(valueAsString) && !alreadySeen.ContainsKey(valueAsString)) {
                    values.Add(valueAsString);
                    alreadySeen[valueAsString] = true;
                }
            }

            tb.AutoCompleteCustomSource.AddRange(values.ToArray());
            tb.AutoCompleteSource = AutoCompleteSource.CustomSource;
            tb.AutoCompleteMode = column.AutoCompleteEditorMode;
        }

27. Example

View license
private void InitializeComponent()
    {
      System.ComponentModel.ComponentResourceManager resour/n ..... /n //View Source file for more details /n }

28. Example

Project: EvilFOCA
Source File: FormMain.Designer.cs
View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

29. Example

Project: SAI-Editor
Source File: MainForm.Designer.cs
View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }

30. Example

View license
[System.Diagnostics.DebuggerStepThrough()]
            private void InitializeComponent()
          /n ..... /n //View Source file for more details /n }

31. Example

View license
private void InitializeComponent()
        {
            this.components = new System.ComponentModel/n ..... /n //View Source file for more details /n }