Here are the examples of the csharp api class System.Windows.Forms.ComboBox.ObjectCollection.Clear() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
155 Examples
0
101. Example
Project: ContinuousTests
Source File: TextOutputSettingsPage.cs
Source File: TextOutputSettingsPage.cs
private void FillComboBox() { tabSelectComboBox.Items.Clear(); foreach( TextDisplayTabSettings.TabInfo tabInfo in this.tabSettings.Tabs ) this.tabSelectComboBox.Items.Add( tabInfo.Title ); tabSelectComboBox.Items.Add( "<New...>" ); tabSelectComboBox.Items.Add( "<Edit...>" ); }
0
102. Example
Project: ContinuousTests
Source File: ProjectEditor.cs
Source File: ProjectEditor.cs
private void configComboBox_Populate() { configComboBox.Items.Clear(); if ( selectedConfig == null ) selectedConfig = project.ActiveConfig; int selectedIndex = -1; foreach( ProjectConfig config in project.Configs ) { string name = config.Name; int index = configComboBox.Items.Add( name ); if ( name == selectedConfig.Name ) selectedIndex = index; } if ( selectedIndex == -1 && configComboBox.Items.Count > 0 ) { selectedIndex = 0; selectedConfig = project.Configs[0]; } if ( selectedIndex == -1 ) selectedConfig = null; else configComboBox.SelectedIndex = selectedIndex; addAssemblyButton.Enabled = removeAssemblyButton.Enabled = project.Configs.Count > 0; }
0
103. Example
Project: ContinuousTests
Source File: ProjectEditor.cs
Source File: ProjectEditor.cs
private void populateDomainUsageComboBox() { domainUsageComboBox.Items.Clear(); domainUsageComboBox.Items.Add("Default"); //domainUsageComboBox.Items.Add("None"); domainUsageComboBox.Items.Add("Single"); if (project.ProcessModel != ProcessModel.Multiple) domainUsageComboBox.Items.Add("Multiple"); domainUsageComboBox.SelectedIndex = 0; }
0
104. Example
Project: ContinuousTests
Source File: TextOutputSettingsPage.cs
Source File: TextOutputSettingsPage.cs
private void FillTabSelectComboBox() { tabSelectComboBox.Items.Clear(); foreach( TextDisplayTabSettings.TabInfo tabInfo in this.tabSettings.Tabs ) this.tabSelectComboBox.Items.Add( tabInfo.Title ); tabSelectComboBox.Items.Add( "<New...>" ); tabSelectComboBox.Items.Add( "<Edit...>" ); }
0
105. Example
Project: ContinuousTests
Source File: PropertyView.cs
Source File: PropertyView.cs
private void SetComboBoxOptions(ComboBox comboBox, string[] options) { comboBox.Items.Clear(); foreach (object opt in options) comboBox.Items.Add(opt); if (comboBox.Items.Count > 0) comboBox.SelectedIndex = 0; }
0
106. Example
Project: ContinuousTests
Source File: TextOutputSettingsPage.cs
Source File: TextOutputSettingsPage.cs
private void FillComboBox() { tabSelectComboBox.Items.Clear(); foreach( TextDisplayTabSettings.TabInfo tabInfo in this.tabSettings.Tabs ) this.tabSelectComboBox.Items.Add( tabInfo.Title ); tabSelectComboBox.Items.Add( "<New...>" ); tabSelectComboBox.Items.Add( "<Edit...>" ); }
0
107. Example
Project: ContinuousTests
Source File: ProjectEditor.cs
Source File: ProjectEditor.cs
private void configComboBox_Populate() { configComboBox.Items.Clear(); if ( selectedConfig == null ) selectedConfig = project.ActiveConfig; int selectedIndex = -1; foreach( ProjectConfig config in project.Configs ) { string name = config.Name; int index = configComboBox.Items.Add( name ); if ( name == selectedConfig.Name ) selectedIndex = index; } if ( selectedIndex == -1 && configComboBox.Items.Count > 0 ) { selectedIndex = 0; selectedConfig = project.Configs[0]; } if ( selectedIndex == -1 ) selectedConfig = null; else configComboBox.SelectedIndex = selectedIndex; addAssemblyButton.Enabled = removeAssemblyButton.Enabled = project.Configs.Count > 0; }
0
108. Example
Project: ContinuousTests
Source File: ProjectEditor.cs
Source File: ProjectEditor.cs
private void populateDomainUsageComboBox() { domainUsageComboBox.Items.Clear(); domainUsageComboBox.Items.Add("Default"); //domainUsageComboBox.Items.Add("None"); domainUsageComboBox.Items.Add("Single"); if (project.ProcessModel != ProcessModel.Multiple) domainUsageComboBox.Items.Add("Multiple"); domainUsageComboBox.SelectedIndex = 0; }
0
109. Example
Project: dp2
Source File: DbNameMapItemDlg.cs
Source File: DbNameMapItemDlg.cs
private void DbNameMapItemDlg_Load(object sender, System.EventArgs e) { if (this.AskMode == AskMode.AskNullOrigin) { this.textBox_origin.Enabled = false; this.button_findOrigin.Enabled = false; this.button_directAllServerMap.Enabled = false; this.comboBox_writeMode.Items.Clear(); this.comboBox_writeMode.Items.Add("append -- ??"); this.comboBox_writeMode.Items.Add("skip -- ??"); } else if (this.AskMode == AskMode.AskNotMatchOrigin) { this.textBox_origin.Enabled = false; this.button_findOrigin.Enabled = false; this.button_directAllServerMap.Enabled = true; } }
0
110. Example
Project: dp2
Source File: DbNameMapItemDlg.cs
Source File: DbNameMapItemDlg.cs
private void DbNameMapItemDlg_Load(object sender, System.EventArgs e) { if (this.AskMode == AskMode.AskNullOrigin) { this.textBox_origin.Enabled = false; this.button_findOrigin.Enabled = false; this.button_directMap.Enabled = false; this.comboBox_writeMode.Items.Clear(); this.comboBox_writeMode.Items.Add("append -- ???"); this.comboBox_writeMode.Items.Add("skip -- ????"); } else if (this.AskMode == AskMode.AskNotMatchOrigin) { this.textBox_origin.Enabled = false; this.button_findOrigin.Enabled = false; this.button_directMap.Enabled = true; } }
0
111. Example
Project: DNTLive
Source File: CityForm.cs
Source File: CityForm.cs
private void BindCityInfoById(ComboBox comboBox, int pid) { var list = ShopMenuHelper.GetCityInfoList<CityModel>(tempModel.ConnStr, pid); if (list == null) { return; } comboBox.Items.Clear(); foreach (var item in list) { comboBox.Items.Add(item); } }
0
112. Example
Project: DllExport
Source File: Storage.cs
Source File: Storage.cs
private void Populate() { box.Items.Clear(); foreach(var elem in storage) { box.Items.Add(elem.name); } }
0
113. Example
Project: Clausewitz-EU4-Editor
Source File: Main.cs
Source File: Main.cs
void LoadCombobox(ComboBox cmb, List<string> items) //loads a list into combobox items { cmb.Items.Clear(); foreach (string item in items) { cmb.Items.Add(item); } }
0
114. Example
Project: Clausewitz-EU4-Editor
Source File: SubEditor.cs
Source File: SubEditor.cs
void LoadCombobox(ComboBox cmb, List<string> items) //loads a list into combobox items { cmb.Items.Clear(); foreach (string item in items) { cmb.Items.Add(item); } }
0
115. Example
Project: gong-shell
Source File: ShellComboBox.cs
Source File: ShellComboBox.cs
void CreateItems() { if (!m_CreatingItems) { try { m_CreatingItems = true; m_Combo.Items.Clear(); CreateItem(m_RootFolder, 0); } finally { m_CreatingItems = false; } } }
0
116. Example
Project: gong-shell
Source File: ShellComboBox.cs
Source File: ShellComboBox.cs
void CreateItems() { if (!m_CreatingItems) { try { m_CreatingItems = true; m_Combo.Items.Clear(); CreateItem(m_RootFolder, 0); } finally { m_CreatingItems = false; } } }
0
117. Example
Project: Irony
Source File: GrammarItemList.cs
Source File: GrammarItemList.cs
public void ShowIn(ComboBox combo) { combo.Items.Clear(); foreach (GrammarItem item in this) combo.Items.Add(item); }
0
118. Example
Project: Irony
Source File: GrammarItemList.cs
Source File: GrammarItemList.cs
public void ShowIn(ComboBox combo) { combo.Items.Clear(); foreach (GrammarItem item in this) combo.Items.Add(item); }
0
119. Example
Project: lphant
Source File: FormDownloads.cs
Source File: FormDownloads.cs
private void m_UpdateCategoryLabels() { //if in listBox comboBoxCategories.Items.Clear(); //fixed labels comboBoxCategories.Items.Add(eLePhantForm.Globalization["LBL_ALL"]); comboBoxCategories.Items.Add(eLePhantForm.Globalization["LBL_VIDEO"]); comboBoxCategories.Items.Add(eLePhantForm.Globalization["LBL_FILE"]); comboBoxCategories.Items.Add(eLePhantForm.Globalization["LBL_AUDIO"]); //category labels ArrayList categories=krnGateway.GetCategories(); foreach (CCategory category in categories) { comboBoxCategories.Items.Add(category.Name); } comboBoxCategories.SelectedIndex=0; //end if }
0
120. Example
Project: lphant
Source File: FormSearch.cs
Source File: FormSearch.cs
private void m_Globalize() { checkBoxSearchAny.Text = eLePhantForm.Globalization["LBL_SEARCHANY"]; buttonExtend.Text = eLePhantForm.Globalization["LBL_SEARCHEXTEND"]; buttonSearch.Text = eLePhantForm.Globalization["LBL_SEARCHFILE"]; labelAvailability.Text = eLePhantForm.Globalization["LBL_AVAILABILITY"] + " > "; labelSizeLower.Text = eLePhantForm.Globalization["LBL_SIZELOWER"] + " < "; labelSizeUpper.Text = eLePhantForm.Globalization["LBL_SIZEUPPER"] + " > "; labelExclude.Text=eLePhantForm.Globalization["LBL_EXCLUDE"]+":"; comboBoxSearchType.Items.Clear(); comboBoxSearchType.Items.AddRange(new object[] { eLePhantForm.Globalization["LBL_ANY"], eLePhantForm.Globalization["LBL_VIDEO"], eLePhantForm.Globalization["LBL_PROGRAM"], eLePhantForm.Globalization["LBL_AUDIO"], eLePhantForm.Globalization["LBL_IMAGE"]}); if (comboBoxSearchType.SelectedIndex==-1) comboBoxSearchType.SelectedIndex=0; }
0
121. Example
Project: PKHeX
Source File: SAV_HallOfFame7.cs
Source File: SAV_HallOfFame7.cs
private void Setup() { int ofs = SAV.HoF; CHK_Flag.Checked = (BitConverter.ToUInt16(SAV.Data, ofs) & 1) == 1; NUD_Count.Value = BitConverter.ToUInt16(SAV.Data, ofs + 2); var specList = GameInfo.SpeciesDataSource.Where(s => s.Value <= SAV.MaxSpeciesID).ToList(); for (int i = 0; i < entries.Length; i++) { int o = ofs + 4 + i*2; var cb = entries[i]; cb.Items.Clear(); cb.DisplayMember = "Text"; cb.ValueMember = "Value"; cb.DataSource = new BindingSource(specList, null); cb.SelectedValue = (int)BitConverter.ToUInt16(SAV.Data, o); } }
0
122. Example
Project: LiveSplit
Source File: GrammarItemList.cs
Source File: GrammarItemList.cs
public void ShowIn(ComboBox combo) { combo.Items.Clear(); foreach (GrammarItem item in this) combo.Items.Add(item); }
0
123. Example
Project: My-FyiReporting
Source File: BackgroundCtl.cs
Source File: BackgroundCtl.cs
private void bEmbedded_Click(object sender, System.EventArgs e) { DialogEmbeddedImages dlgEI = new DialogEmbeddedImages(this._Draw); dlgEI.StartPosition = FormStartPosition.CenterParent; try { DialogResult dr = dlgEI.ShowDialog(); if (dr != DialogResult.OK) return; // Populate the EmbeddedImage names cbValueEmbedded.Items.Clear(); cbValueEmbedded.Items.AddRange(_Draw.ReportNames.EmbeddedImageNames); } finally { dlgEI.Dispose(); } }
0
124. Example
Project: My-FyiReporting
Source File: ChartCtl - Copy.cs
Source File: ChartCtl - Copy.cs
private void cbChartType_SelectedIndexChanged(object sender, System.EventArgs e) { fChartType =/n ..... /n //View Source file for more details /n }
0
125. Example
Project: My-FyiReporting
Source File: ChartCtl.cs
Source File: ChartCtl.cs
private void cbChartType_SelectedIndexChanged(object sender, System.EventArgs e) { fChartType =/n ..... /n //View Source file for more details /n }
0
126. Example
Project: My-FyiReporting
Source File: DialogNewChart.cs
Source File: DialogNewChart.cs
private void cbChartData_Enter(object sender, System.EventArgs e) { ComboBox cb = sender as ComboBox; if (cb == null) return; cb.Items.Clear(); foreach (string field in this.lbFields.Items) { if (this.lbChartCategories.Items.IndexOf(field) >= 0 || this.lbChartSeries.Items.IndexOf(field) >= 0) continue; // Field selected in columns and rows cb.Items.Add(string.Format("=Sum(Fields!{0}.Value)", field)); } }
0
127. Example
Project: My-FyiReporting
Source File: ImageCtl.cs
Source File: ImageCtl.cs
private void bEmbedded_Click(object sender, System.EventArgs e) { DialogEmbeddedImages dlgEI = new DialogEmbeddedImages(this._Draw); dlgEI.StartPosition = FormStartPosition.CenterParent; try { DialogResult dr = dlgEI.ShowDialog(); if (dr != DialogResult.OK) return; } finally { dlgEI.Dispose(); } // Populate the EmbeddedImage names cbValueEmbedded.Items.Clear(); cbValueEmbedded.Items.AddRange(_Draw.ReportNames.EmbeddedImageNames); }
0
128. Example
Project: referencesource
Source File: ObjectListCommandsPage.cs
Source File: ObjectListCommandsPage.cs
private void LoadDefaultCommands() { _cmbDefaultCommand.Items.Clear(); foreach (CommandTreeNode commandNode in TreeList.TvList.Nodes) { _cmbDefaultCommand.Items.Add(commandNode.Name); } }
0
129. Example
Project: referencesource
Source File: WorkflowPageSetupDialog.cs
Source File: WorkflowPageSetupDialog.cs
private void InitializePaperInformation() { PrinterSettings.PaperSizeCollection /n ..... /n //View Source file for more details /n }
0
130. Example
Project: mRemoteNG
Source File: CredentialRecordComboBox.cs
Source File: CredentialRecordComboBox.cs
private void PopulateItems(IEnumerable<ICredentialRecord> credentialRecords) { if (credentialRecords == null) return; Items.Clear(); foreach (var credential in credentialRecords) Items.Add(credential); }
0
131. Example
Project: llilum
Source File: EnvironmentForm.cs
Source File: EnvironmentForm.cs
internal void ApplyToComboBox( ComboBox comboBox ) { ComboBox.ObjectColl/n ..... /n //View Source file for more details /n }
0
132. Example
Project: NetOffice
Source File: TrayMenu.cs
Source File: TrayMenu.cs
internal void OnDropDownItem_ListItemsCleared(TrayMenuDropDownListItem item) { ToolStripComboBox targetStrip = Find(item) as ToolStripComboBox; if (null != targetStrip) targetStrip.Items.Clear(); }
0
133. Example
Project: nHydrate
Source File: RelationshipDialog.cs
Source File: RelationshipDialog.cs
private void LoadTables(ComboBox cboEntity) { cboEntity.Items.Clear(); foreach (var entity in _model.Entities.OrderBy(x => x.Name)) { cboEntity.Items.Add(entity.Name); } }
0
134. Example
Project: nHydrate
Source File: RelationshipDialog.cs
Source File: RelationshipDialog.cs
private void LoadFields(string tableName, ComboBox cboField) { cboField.Items.Clear(); var entity = _model.Entities.FirstOrDefault(x => x.Name == tableName); if (entity != null) { foreach (var field in entity.Fields) { cboField.Items.Add(field.Name); } } cboField.Enabled = (cboField.Items.Count > 0); }
0
135. Example
Project: nHydrate
Source File: RelationshipViewDialog.cs
Source File: RelationshipViewDialog.cs
private void LoadTables(ComboBox cboEntity) { cboEntity.Items.Clear(); foreach (var entity in _model.Entities.OrderBy(x => x.Name)) { cboEntity.Items.Add(entity.Name); } }
0
136. Example
Project: nHydrate
Source File: RelationshipViewDialog.cs
Source File: RelationshipViewDialog.cs
private void LoadFields(string tableName, ComboBox cboField) { cboField.Items.Clear(); var entity = _model.Entities.FirstOrDefault(x => x.Name == tableName); if (entity != null) { foreach (var field in entity.Fields) { cboField.Items.Add(field.Name); } } cboField.Enabled = (cboField.Items.Count > 0); }
0
137. Example
Project: nHydrate
Source File: RelationshipViewDialog.cs
Source File: RelationshipViewDialog.cs
private void LoadViewFields(string viewName, ComboBox cboField) { cboField.Items.Clear(); var entity = _model.Views.FirstOrDefault(x => x.Name == viewName); if (entity != null) { foreach (var field in entity.Fields) { cboField.Items.Add(field.Name); } } cboField.Enabled = (cboField.Items.Count > 0); }
0
138. Example
Project: nHydrate
Source File: ColumnRelationshipCollectionEditorForm.cs
Source File: ColumnRelationshipCollectionEditorForm.cs
private void LoadFields(string tableName, ComboBox cboField) { cboField.Items.Clear(); var table = ((ModelRoot)this.Relation.Root).Database.Tables[tableName]; foreach (Reference reference in table.Columns) { cboField.Items.Add(((Column)reference.Object).Name); } cboField.Enabled = (cboField.Items.Count > 0); }
0
139. Example
Project: OpenLiveWriter
Source File: DelayedFetchComboBox.cs
Source File: DelayedFetchComboBox.cs
public void Initialize(object[] items, object initialValue, IDelayedFetchHandler fetchHandler) { Items.Clear(); Items.AddRange(items); SelectedItem = initialValue; _fetchHandler = fetchHandler; }
0
140. Example
Project: OpenLiveWriter
Source File: HtmlImageTargetEditor.cs
Source File: HtmlImageTargetEditor.cs
private void LoadLinkTargetsCombo() { LinkTargetType targetType = HtmlImageTargetSettings.LinkTarget; this.comboBoxLinkTargets.Items.Clear(); if (LinkToSourceImageEnabled) comboBoxLinkTargets.Items.Add(new OptionItem(Res.Get(StringId.LinkToSource), LinkTargetType.IMAGE)); comboBoxLinkTargets.Items.Add(new OptionItem(Res.Get(StringId.LinkToURL), LinkTargetType.URL)); comboBoxLinkTargets.Items.Add(new OptionItem(Res.Get(StringId.LinkToNone), LinkTargetType.NONE)); comboBoxLinkTargets.SelectedItem = new OptionItem("", targetType); //comboBoxLinkTargets.Visible = comboBoxLinkTargets.Items.Count > 1; }
0
141. Example
Project: OpenLiveWriter
Source File: ImageSizePickerControl.cs
Source File: ImageSizePickerControl.cs
private void InitializeComboItems() { Items.Clear(); if (!DesignMode) { Items.Add(new ImageSizeComboItem(ImageSize.Small, Res.Get(StringId.ImgSBSizerSmall), _scaledImageSizeDelegate)); Items.Add(new ImageSizeComboItem(ImageSize.Medium, Res.Get(StringId.ImgSBSizerMedium), _scaledImageSizeDelegate)); Items.Add(new ImageSizeComboItem(ImageSize.Large, Res.Get(StringId.ImgSBSizerLarge), _scaledImageSizeDelegate)); Items.Add(new ImageSizeComboItem(ImageSize.Original, Res.Get(StringId.ImgSBSizerOriginal), _scaledImageSizeDelegate)); } }
0
142. Example
Project: the-dot-factory
Source File: OutputConfigurationManager.cs
Source File: OutputConfigurationManager.cs
public void comboboxPopulate(ComboBox combobox) { // clear all items combobox.Items.Clear(); // iterate through items foreach (OutputConfiguration oc in m_outputConfigurationList) { // get the name combobox.Items.Add(oc.displayName); } }
0
143. Example
Project: SE-Community-Mod-API
Source File: SEConfigTool.cs
Source File: SEConfigTool.cs
private void FillComboWithItems(ComboBox combo) { //Add all physical items, components, and ammo to the combo box combo.Items.Clear(); foreach (var itemType in m_physicalItemsDefinitionsManager.Definitions) { combo.Items.Add(itemType.Id); } foreach (var itemType in m_componentsDefinitionsManager.Definitions) { combo.Items.Add(itemType.Id); } foreach (var itemType in m_ammoMagazinesDefinitionsManager.Definitions) { combo.Items.Add(itemType.Id); } }
0
144. Example
Project: SLED
Source File: SledTargetService.cs
Source File: SledTargetService.cs
private void UpdateRemoteTargetComboBox() { try { // Add all targets to combo box m_remoteTargetComboBox.Items.Clear(); foreach (var target in m_lstTargets) m_remoteTargetComboBox.Items.Add(target); // Select the proper target var selTarget = SelectedTarget; if (selTarget != null) m_remoteTargetComboBox.SelectedItem = selTarget; else if (m_remoteTargetComboBox.Items.Count > 0) m_remoteTargetComboBox.SelectedItem = m_remoteTargetComboBox.Items[0]; else m_remoteTargetComboBox.Text = string.Empty; } catch (Exception ex) { SledOutDevice.OutLine( SledMessageType.Error, SledUtil.TransSub(Localization.SledRemoteTargetErrorUpdatingComboBox, ex.Message)); } }
0
145. Example
Project: SLED
Source File: SledLuaFunctionToolbar.cs
Source File: SledLuaFunctionToolbar.cs
private void ProjectServiceFileRemoving(object sender, SledProjectServiceFileEventArgs e) { if (e.File.SledDocument != m_sd) return; m_bChangingSelection = true; Items.Clear(); Items.Add(NotProjectFile); SelectedItem = NotProjectFile; Enabled = false; m_bChangingSelection = false; }
0
146. Example
Project: Gorgon
Source File: ComboFonts.cs
Source File: ComboFonts.cs
public void RefreshFonts() { Items.Clear(); foreach (var font in FontFamily.Families) { Items.Add(font.Name); } }
0
147. Example
Project: justdecompile-plugins
Source File: GenericOperandReferenceEditor.cs
Source File: GenericOperandReferenceEditor.cs
public void Initialize(MethodDefinition mdef) { Items.Clear(); if (mdef.HasBody) { foreach (T refItem in m_referenceditems) { W item = new W(); item.Item = refItem; item.MethodDefinition = mdef; Items.Add(item); } } }
0
148. Example
Project: justdecompile-plugins
Source File: GenericTypeReferenceEditor.cs
Source File: GenericTypeReferenceEditor.cs
public void Initialize(MethodDefinition mdef) { Items.Clear(); AppendGenericParameters(mdef.GenericParameters); AppendGenericParameters(mdef.DeclaringType.GenericParameters); this.Sorted = true; }
0
149. Example
Project: justdecompile-plugins
Source File: GenericOperandReferenceEditor.cs
Source File: GenericOperandReferenceEditor.cs
public void Initialize(MethodDefinition mdef) { Items.Clear(); if (mdef.HasBody) { foreach (T refItem in m_referenceditems) { W item = new W(); item.Item = refItem; item.MethodDefinition = mdef; Items.Add(item); } } }
0
150. Example
Project: justdecompile-plugins
Source File: GenericTypeReferenceEditor.cs
Source File: GenericTypeReferenceEditor.cs
public void Initialize(MethodDefinition mdef) { Items.Clear(); AppendGenericParameters(mdef.GenericParameters); AppendGenericParameters(mdef.DeclaringType.GenericParameters); this.Sorted = true; }