当前位置: 首页>>代码示例>>C#>>正文


C# AutoCompleteStringCollection.AddRange方法代码示例

本文整理汇总了C#中System.Windows.Forms.AutoCompleteStringCollection.AddRange方法的典型用法代码示例。如果您正苦于以下问题:C# AutoCompleteStringCollection.AddRange方法的具体用法?C# AutoCompleteStringCollection.AddRange怎么用?C# AutoCompleteStringCollection.AddRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.AutoCompleteStringCollection的用法示例。


在下文中一共展示了AutoCompleteStringCollection.AddRange方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateSuggestions

 private void UpdateSuggestions() {
     var source = new AutoCompleteStringCollection();
     source.AddRange(SpeechControll.Keywords.ToArray());
     source.AddRange(MusicCollection.GetAllSongKeywords());
     KeyInput.AutoCompleteCustomSource.Clear();
     KeyInput.AutoCompleteCustomSource = source;
     KeyInput.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
     KeyInput.AutoCompleteSource = AutoCompleteSource.CustomSource;
 }
开发者ID:GWigWam,项目名称:SpeechMusicController,代码行数:9,代码来源:MainForm.cs

示例2: initGui

        public void initGui()
        {
            clg = new dataHandler.catalog(timeout: gpExtension.timeout);
            keyWords = new AutoCompleteStringCollection();
            keyWords.AddRange(  clg.getKeyWords().ToArray() );
            keywordTxt.AutoCompleteSource = AutoCompleteSource.CustomSource;
            keywordTxt.AutoCompleteCustomSource = keyWords;
            gdiThemes = clg.getGDIthemes();
            gdiThemes.Insert(0, "");
            GDIthemeCbx.DataSource = gdiThemes;

            orgNames = clg.getOrganisations();
            orgNames.Insert(0, "");
            orgNameCbx.DataSource = orgNames;

            dataBronnen = clg.getSources();
            List<string> bronnen = dataBronnen.Select(c => c.Key).ToList();
            bronnen.Insert(0, "");
            bronCatCbx.DataSource = bronnen;

            dataTypes = clg.dataTypes;
            List<string> dtypes = dataTypes.Select(c => c.Key).ToList();
            dtypes.Insert(0, "");
            typeCbx.DataSource = dtypes;

            inspKeyw = clg.inspireKeywords();
            inspKeyw.Insert(0, "");
            INSPIREthemeCbx.DataSource = inspKeyw;

            INSPIREannexCbx.DataSource = clg.inpireAnnex;

            INSPIREserviceCbx.DataSource = clg.inspireServiceTypes;

            filterResultsCbx.SelectedIndex = 0;
        }
开发者ID:geopunt,项目名称:geopunt4arcgis,代码行数:35,代码来源:catalogForm.cs

示例3: Reload

        /// <summary>Reloads the repo's objects tree.</summary>
        public void Reload()
        {
            // todo: task exception handling
            Cancel();
            _cancelledTokenSource = new CancellationTokenSource();
            var token = _cancelledTokenSource.Token;
            var tasks = rootNodes.Select(r => r.ReloadTask(token)).ToArray();
            Task.Factory.ContinueWhenAll(tasks,
                (t) =>
                {
                    if (!t.All(r => r.Status == TaskStatus.RanToCompletion))
                    {
                        return;
                    }
                    if (token.IsCancellationRequested)
                    {
                        return;
                    }
                    BeginInvoke(new Action(() =>
                    {
                        var autoCompletionSrc = new AutoCompleteStringCollection();
                        autoCompletionSrc.AddRange(
                            _branchFilterAutoCompletionSrc.ToArray());

                        txtBranchFilter.AutoCompleteCustomSource = autoCompletionSrc;
                    }));
                }, _cancelledTokenSource.Token);
            tasks.ToList().ForEach(t => t.Start());
        }
开发者ID:Yasami,项目名称:gitextensions,代码行数:30,代码来源:RepoObjectsTree.cs

示例4: SetupElements

		private void SetupElements(NationSelectForm nationSelectForm, Nation selectedNation, int numberOfCrewSlots)
		{
			_nationSelectForm = nationSelectForm;
			_selectedNation = selectedNation;
			_numberOfCrewSlots = numberOfCrewSlots;
			_vehicleType = new VehicleType();	// Crappy default value
			_crewSlotData = Helpers.LoadCrewSlotDataFromFile(CrewSlotDataFileName) ?? new List<CrewSlotData>();	// Load from file, if null is returned, creates a new (empty) list

			if (_crewSlotData.Count < 1) // Happens only when nothing comes from reading the file with data.
			{
				_crewSlotData.Add(new CrewSlotData(_selectedNation));
			}

			#region Setup fields for form controls
			List<string> vehicleNames = Helpers.LoadVehicleDataFromJson(Helpers.GetVehicleJsonDataForNation(_selectedNation)).OrderBy(v => v.VehicleName).Select(v => v.VehicleName).ToList();
			_faytVehicleSource = new AutoCompleteStringCollection();
			_faytVehicleSource.AddRange(vehicleNames.ToArray());

			List<string> vehicleTypes = Helpers.LoadVehicleTypesDataFromJson(Helpers.GetVehicleTypesJsonData()).OrderBy(t => t.VehicleTypeLongName).Select(t => t.VehicleTypeLongName).ToList();
			_faytVehicleTypeSource = new AutoCompleteStringCollection();
			_faytVehicleTypeSource.AddRange(vehicleTypes.ToArray());

			_crewSlotConfigurations = new List<CrewSlotConfiguration>();
			_crewSlotGroupBoxes = new Dictionary<int, GroupBox>();
			_crewNameComboBoxes = new Dictionary<int, ComboBox>();
			_crewTrainedMembersNumericScrollers = new Dictionary<int, NumericUpDown>();
			_crewVehicleTypeComboBoxes = new Dictionary<int, ComboBox>();
			#endregion

			SetFormHeight();
			Helpers.ChangeBackground(this, selectedNation);
			PopulateFormControls();
		}
开发者ID:BeigeBadger,项目名称:WTadministration,代码行数:33,代码来源:ConfigureCrewSlotsForm.cs

示例5: MainWindow

        public MainWindow()
        {
            InitializeComponent();

            using (var db = new MySqlContext())
            {
                var permissions = from a in db.Permissions
                                  select a.Name;
                this.checkedListBox_permissions.Items.AddRange(permissions.ToArray());
                this.checkedListBox_modificar_permissions.Items.AddRange(permissions.ToArray());

                var users = from b in db.LoginModels
                            select b.User;
                this.checkedListBox_users.Items.AddRange(users.ToArray());
                this.checkedListBox_modificar_users.Items.AddRange(users.ToArray());

                var roles = from r in db.Roles
                            select r.Name;
                AutoCompleteStringCollection accl = new AutoCompleteStringCollection();
                accl.AddRange(roles.ToArray());

                txt_rol_nombre.AutoCompleteMode = AutoCompleteMode.Suggest;
                txt_rol_nombre.AutoCompleteCustomSource = accl;
                txt_rol_nombre.AutoCompleteSource = AutoCompleteSource.CustomSource;

                txt_modificar_nombre.AutoCompleteMode = AutoCompleteMode.Suggest;
                txt_modificar_nombre.AutoCompleteCustomSource = accl;
                txt_modificar_nombre.AutoCompleteSource = AutoCompleteSource.CustomSource;

            }
        }
开发者ID:rafareyes7,项目名称:UnifyWS,代码行数:31,代码来源:MainWindow.cs

示例6: UC_mailSearchWeb

 public UC_mailSearchWeb()
 {
     InitializeComponent();
     m_identifier = Page.MailSearchWeb;
     m_next = Page.Gesture;
     m_previous = Page.Action;
     lbl_icon.Text = Translation.GetText("C_SearchOpenWeb_lbl_icon");
     m_timer = new Timer();
     m_timer.Interval = 2000;
     m_timer.Tick += new EventHandler(m_timer_Tick);
     m_webIconExtractor = new Favicon();
     m_webIconExtractor.IconObatined += new Favicon.DlgIconObtained(IconObtained);
     m_autoCompleteSearchItems = new AutoCompleteStringCollection();
     m_autoCompleteSearchItems.AddRange(new string[] {
         "http://www.google.com/search?&q=(*)",
         "http://en.wikipedia.org/w/index.php?&search=(*)",
         "http://maps.google.com/maps?q=(*)",
         "http://translate.google.com/#auto|en|(*)",
         "http://www.last.fm/search?q=(*)",
         "http://www.imdb.com/find?s=all&q=(*)",                
         "http://search.yahoo.com/search?p=(*)",
         "http://www.bing.com/search?q=(*)",                
         "http://search.seznam.cz/?q=(*)",
         "http://www.slovnik.seznam.cz/?q=(*)&lang=en_cz",                
         "http://www.mapy.cz/?query=(*)",
         "http://www.csfd.cz/hledani-filmu-hercu-reziseru-ve-filmove-databazi/?search=(*)"
     });
 }
开发者ID:schultzisaiah,项目名称:just-gestures,代码行数:28,代码来源:UC_mailSearchWeb.cs

示例7: AddRestrictForm_Load

        private void AddRestrictForm_Load(object sender, EventArgs e)
        {
            AutoCompleteStringCollection c = new AutoCompleteStringCollection();
            c.AddRange(this.SuggestProperties);
            txtPropertyName.AutoCompleteCustomSource = c;

            AutoCompleteStringCollection c1 = new AutoCompleteStringCollection();
            c1.AddRange(this.SuggestRoles);
            txtRole.AutoCompleteCustomSource = c1;

            if (Xml != null)
            {
                string type = Xml.GetAttribute("Type");
                if (type.Equals("PropertyEquals",StringComparison.CurrentCulture))
                {
                    rbPropertyEquals.Checked = true;
                    txtPropertyName.Text = Xml.GetAttribute("Property");
                    txtPropertyValue.Text = Xml.GetAttribute("Value");
                }
                else if (type.Equals("RoleContain", StringComparison.CurrentCulture))
                {
                    rbRoleContain.Checked = true;
                    txtRole.Text = Xml.GetAttribute("Role");
                }
                else
                {
                    rbDB.Checked = true;
                    txtSQL.Text = Xml.InnerText.Trim();
                }
            }
        }
开发者ID:lidonghao1116,项目名称:ProjectManager,代码行数:31,代码来源:AddRestrictForm.cs

示例8: AutoComplete

 private void AutoComplete(TextBox txtBox, string[] items)
 {
     var itemCollection = new AutoCompleteStringCollection();
     itemCollection.AddRange(items);
     txtBox.AutoCompleteCustomSource = itemCollection;
     txtBox.AutoCompleteMode = AutoCompleteMode.Suggest;
     txtBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
 }
开发者ID:mayurdo,项目名称:UNISoftware,代码行数:8,代码来源:CandidateReport.cs

示例9: LoadCustomer

 private void LoadCustomer()
 {
     var biz = new CustomerBiz();
     var items = biz.LoadAllCustomerName();
     AutoCompleteStringCollection list = new AutoCompleteStringCollection();
     list.AddRange(items.ToArray());
     textCustomerName.AutoCompleteCustomSource = null;
     textCustomerName.AutoCompleteCustomSource = list;
 }
开发者ID:chauit,项目名称:ElectronicStore,代码行数:9,代码来源:SearchCustomer.cs

示例10: setupAutoComplete

 private void setupAutoComplete() { 
     // List
     userSource = new AutoCompleteStringCollection();
     userSource.AddRange(brokerManager.listUsers());
     // AutoComplete properties
     txtBoxUser.AutoCompleteCustomSource = userSource;
     txtBoxUser.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
     txtBoxUser.AutoCompleteSource = AutoCompleteSource.CustomSource;
 }
开发者ID:Globlock,项目名称:Version0,代码行数:9,代码来源:GUI_Login.cs

示例11: GetAutoCompleteNames

		/// ------------------------------------------------------------------------------------
		public AutoCompleteStringCollection GetAutoCompleteNames()
		{
			var list = (_autoCompleteProvider != null ?
				_autoCompleteProvider.GetValuesForKey("person") : new List<string>(0));

			var autoCompleteValues = new AutoCompleteStringCollection();
			autoCompleteValues.AddRange(list.ToArray());
			return autoCompleteValues;
		}
开发者ID:JohnThomson,项目名称:libpalaso,代码行数:10,代码来源:ContributorsListControlViewModel.cs

示例12: Form1_Load

 private void Form1_Load(object sender, EventArgs e)
 {
     List<string> allPaises = getPaises();
     textBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
     AutoCompleteStringCollection accl = new AutoCompleteStringCollection();            
     accl.AddRange(allPaises.ToArray());
     textBox1.AutoCompleteCustomSource = accl;
     textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
 }
开发者ID:joelgasso,项目名称:blogcodes,代码行数:9,代码来源:Form1.cs

示例13: kryptonTextBox1_Enter

 private void kryptonTextBox1_Enter(object sender, EventArgs e)
 {
     if (deafultSearchText == this.searchTextbox.Text)
         this.searchTextbox.Text = String.Empty;
     this.searchTextbox.StateCommon.Content.Color1 = SystemColors.WindowText;
     AutoCompleteStringCollection col = new AutoCompleteStringCollection();
     col.AddRange(DataService.Create().GetAllSearchWords().ToArray());
     this.searchTextbox.AutoCompleteCustomSource = col;
 }
开发者ID:huoxudong125,项目名称:VideoSearch,代码行数:9,代码来源:SearchPanelWidget.cs

示例14: ConfigureAutoComplete

        private void ConfigureAutoComplete()
        {
            var autoComplete = new AutoCompleteStringCollection();
            autoComplete.AddRange(_dc.EntryEvents.ToArray());

            txtEventName.AutoCompleteMode = AutoCompleteMode.Suggest;
            txtEventName.AutoCompleteSource = AutoCompleteSource.CustomSource;
            txtEventName.AutoCompleteCustomSource = autoComplete;

        }
开发者ID:chudson121,项目名称:Diary,代码行数:10,代码来源:Form1.cs

示例15: LoadAutoComplete

        private void LoadAutoComplete()
        {
            List<Processo> processos = (new ProcessoDB()).LoadAll();
            // Create the list to use as the custom source. 
            var source = new AutoCompleteStringCollection();
            source.AddRange((from p in processos select p.NumeroProcesso).ToArray<string>());
            // Create and initialize the text box.
            _textBoxNumeroProcesso.AutoCompleteCustomSource = source;
            _textBoxNumeroProcesso.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            _textBoxNumeroProcesso.AutoCompleteSource = AutoCompleteSource.CustomSource;

            List<Contacto> contactos = (new ContactoDB()).LoadAll();
            // Create the list to use as the custom source. 
            source = new AutoCompleteStringCollection();
            source.AddRange((from c in contactos select c.Nome).ToArray<string>());
            // Create and initialize the text box.
            _textBoxContacto.AutoCompleteCustomSource = source;
            _textBoxContacto.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            _textBoxContacto.AutoCompleteSource = AutoCompleteSource.CustomSource;
            
            List<Instancia> instancias = (new InstanciaDB()).LoadAll();
            // Create the list to use as the custom source. 
            source = new AutoCompleteStringCollection();
            source.AddRange((from i in instancias select i.Nome).ToArray<string>());
            // Create and initialize the text box.
            _textBoxPesquisaInstancia.AutoCompleteCustomSource = source;
            _textBoxPesquisaInstancia.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            _textBoxPesquisaInstancia.AutoCompleteSource = AutoCompleteSource.CustomSource;
            
            List<Capa> capas = (new CapaDB()).LoadAll();
            // Create the list to use as the custom source. 
            source = new AutoCompleteStringCollection();
            source.AddRange((from c in capas select c.Nome).ToArray<string>());
            // Create and initialize the text box.
            _textBoxPesquisaCapa.AutoCompleteCustomSource = source;
            _textBoxPesquisaCapa.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            _textBoxPesquisaCapa.AutoCompleteSource = AutoCompleteSource.CustomSource;

            ///CAPAS ComboBox 
            BindingSource bsCapas = new BindingSource();
            bsCapas.DataSource = capas;
            _comboBoxCapa.ValueMember = "ID";
            _comboBoxCapa.DisplayMember = "Nome";
            _comboBoxCapa.DataSource = bsCapas;

            ///CAPAS ComboBox 
            BindingSource bsInstancias = new BindingSource();
            bsInstancias.DataSource = instancias;
            _comboBoxInstancia.ValueMember = "ID";
            _comboBoxInstancia.DisplayMember = "Nome";
            _comboBoxInstancia.DataSource = bsInstancias;

        }
开发者ID:hpestana,项目名称:ADV_MVC,代码行数:53,代码来源:ProcessosForm.cs


注:本文中的System.Windows.Forms.AutoCompleteStringCollection.AddRange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。