System.Windows.Forms.ComboBox.ObjectCollection.Add(object)

Here are the examples of the csharp api class System.Windows.Forms.ComboBox.ObjectCollection.Add(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

101. Example

Project: MapleShark
Source File: FindReplace.cs
public void FindNext()
        {
            string text = cboFind.Text;

            if (_Last != "" && _Last != text)
            {
                mOwner.Caret.Position.X = 0;
                mOwner.Caret.Position.Y = 0;
                mOwner.ScrollIntoView();
            }

            _Last = text;

            if (text == "")
                return;

            bool found = false;
            foreach (string s in cboFind.Items)
            {
                if (s == text)
                {
                    found = true;
                    break;
                }
            }
            if (!found)
                cboFind.Items.Add(text);

            mOwner.SelectNext(cboFind.Text, chkMatchCase.Checked,
                              chkWholeWord.Checked, chkRegEx.Checked);
        }

102. Example

Project: dp2
Source File: ReaderManageForm.cs
private void comboBox_operation_DropDown(object sender, EventArgs e)
        {
            // ???? 2009/7/19
            if (this.m_nInDropDown > 0)
                return;

            Cursor oldCursor = this.Cursor;
            this.Cursor = Cursors.WaitCursor;
            this.m_nInDropDown++;
            try
            {

                ComboBox combobox = (ComboBox)sender;

                if (combobox.Items.Count == 0
                    && this.GetValueTable != null)
                {
                    GetValueTableEventArgs e1 = new GetValueTableEventArgs();
                    if (String.IsNullOrEmpty(this.RecPath) == false)
                        e1.DbName = Global.GetDbName(this.RecPath);

                    e1.TableName = "readerState";

                    this.GetValueTable(this, e1);

                    if (e1.values != null)
                    {
                        for (int i = 0; i < e1.values.Length; i++)
                        {
                            combobox.Items.Add(e1.values[i]);
                        }
                    }
                    else
                    {
                        combobox.Items.Add("<not found>");
                    }
                }
            }
            finally
            {
                this.Cursor = oldCursor;
                this.m_nInDropDown--;
            }
        }

103. Example

Project: dp2
Source File: OneActionDialog.cs
void FillDropDown(ComboBox combobox)
        {
            if (this._actionCfg == null
                || string.IsNullOrEmpty(this._actionCfg.List) == true)
                return;

            // ????
            if (this.m_nInDropDown > 0)
                return;

            Cursor oldCursor = this.Cursor;
            this.Cursor = Cursors.WaitCursor;
            this.m_nInDropDown++;
            try
            {
                if (combobox.Items.Count <= 0
                    && this.GetValueTable != null)
                {
                    GetValueTableEventArgs e1 = new GetValueTableEventArgs();
                    e1.DbName = this.RefDbName;
                    e1.TableName = this._actionCfg.List;

                    this.GetValueTable(this, e1);

                    // combobox.Items.Add("<???>");

                    if (e1.values != null)
                    {
                        for (int i = 0; i < e1.values.Length; i++)
                        {
                            combobox.Items.Add(e1.values[i]);
                        }
                    }
                    else
                    {
                        // combobox.Items.Add("{not found}");
                    }
                }
            }
            finally
            {
                this.Cursor = oldCursor;
                this.m_nInDropDown--;
            }
        }

104. Example

Project: FreeSCADA
Source File: BaseCommandContext.cs
private void InitializeDropDownBoxCommand(ToolStripComboBox tsi, ICommand cmd)
		{
			tsi.ToolTipText = cmd.Description;
			tsi.Image = cmd.Icon;
			tsi.Enabled = cmd.CanExecute;

			foreach (object obj in cmd.DropDownItems.Items)
				tsi.Items.Add(obj);
			if(cmd.DropDownItems.Current != null)
				tsi.Text = cmd.DropDownItems.Current.ToString();

			tsi.KeyUp += new KeyEventHandler(OnDropDownCommandKeyUp);
			tsi.SelectedIndexChanged += new EventHandler(OnDropDownCommandSelectedChanged);
		}

105. Example

Project: FreeSCADA
Source File: MenuCommandContext.cs
private void InitializeDropDownBoxCommand(ToolStripComboBox tsi, ICommand cmd)
		{
			tsi.ToolTipText = cmd.Description;
			tsi.Image = cmd.Icon;
			tsi.Enabled = cmd.CanExecute;

			foreach (object obj in cmd.DropDownItems.Items)
				tsi.Items.Add(obj);
			if(cmd.DropDownItems.Current != null)
				tsi.Text = cmd.DropDownItems.Current.ToString();

			tsi.KeyUp += new KeyEventHandler(OnDropDownCommandKeyUp);
			tsi.SelectedIndexChanged += new EventHandler(OnDropDownCommandSelectedChanged);
		}

106. Example

Project: FreeSCADA
Source File: ToolbarCommandContext.cs
private void InitializeDropDownBoxCommand(ToolStripComboBox tsi, ICommand cmd)
        {
            tsi.ToolTipText = cmd.Description;
            tsi.Image = cmd.Icon;
            tsi.Enabled = cmd.CanExecute;

            foreach (object obj in cmd.DropDownItems.Items)
                tsi.Items.Add(obj);
            if (cmd.DropDownItems.Current != null)
                tsi.Text = cmd.DropDownItems.Current.ToString();

            tsi.KeyUp += new KeyEventHandler(OnDropDownCommandKeyUp);
            tsi.SelectedIndexChanged += new EventHandler(OnDropDownCommandSelectedChanged);
        }

107. Example

Project: google-drive-proxy
Source File: SettingsForm.cs
public static void AddItem(ComboBox comboBox, string text, object value)
      {
        comboBox.Items.Add(new ComboBoxItem(text, value));
      }

108. Example

Project: ares
Source File: EditExtentForm.cs
private void InitializeRasterComboBox(System.Windows.Forms.ComboBox rasterComboBox)
        {
            for (int i = 0; i < ArcMap.Document.FocusMap.LayerCount; i++)
            {
                ILayer layer = ArcMap.Document.FocusMap.Layer[i];
                if (layer is IRasterLayer)
                {
                    rasterComboBox.Items.Add(layer.Name);
                }
            }

            rasterComboBox.KeyPress += (s, e) => e.Handled = true;
            rasterComboBox.KeyUp += (s, e) => e.Handled = true;
            rasterComboBox.KeyDown += (s, e) => e.Handled = true;
        }

109. Example

Project: KeeAnywhere
Source File: ImageComboBox.cs
public int ComboBoxAddItem(ImageComboBoxItem item)
		{
			item.Text = (item.Text.Length == 0)?item.GetType ().Name+base.Items.Count.ToString ():item.Text;
			base.Items.Add (item);
		
			return base.Items.Count-1;
		}

110. Example

Project: My-FyiReporting
Source File: TableColumnCtl.cs
private void InitValues(XmlNode node)
		{
			// Handle Width definition
			this.tbColumnWidth.Text = _Draw.GetElementValue(node, "Width", "");
		
			this.chkFixedHeader.Checked = _Draw.GetElementValue(node, "FixedHeader", "false").ToLower() == "true"? true: false;

			// Handle Visiblity definition
			XmlNode visNode = _Draw.GetNamedChildNode(node, "Visibility");
			if (visNode != null)
			{
				this.tbHidden.Text = _Draw.GetElementValue(visNode, "Hidden", "");
				this.cbToggle.Text = _Draw.GetElementValue(visNode, "ToggleItem", "");
			}
			IEnumerable list = _Draw.GetReportItems("//Textbox");
			if (list != null)
			{
				foreach (XmlNode tNode in list)
				{
					XmlAttribute name = tNode.Attributes["Name"];
					if (name != null && name.Value != null && name.Value.Length > 0)
						cbToggle.Items.Add(name.Value);
				}
			}
			// nothing has changed now
			fWidth = fHidden = fToggle = fFixedHeader = false;
		}

111. Example

Project: My-FyiReporting
Source File: TableRowCtl.cs
private void InitValues(XmlNode node)
		{
			// Handle Width definition
			this.tbRowHeight.Text = _Draw.GetElementValue(node, "Height", "");
		
			// Handle Visiblity definition
			XmlNode visNode = _Draw.GetNamedChildNode(node, "Visibility");
			if (visNode != null)
			{
				this.tbHidden.Text = _Draw.GetElementValue(visNode, "Hidden", "");
				this.cbToggle.Text = _Draw.GetElementValue(visNode, "ToggleItem", "");
			}
			IEnumerable list = _Draw.GetReportItems("//Textbox");
			if (list != null)
			{
				foreach (XmlNode tNode in list)
				{
					XmlAttribute name = tNode.Attributes["Name"];
					if (name != null && name.Value != null && name.Value.Length > 0)
						cbToggle.Items.Add(name.Value);
				}
			}
			// nothing has changed now
			fHeight = fHidden = fToggle = false;
		}

112. Example

Project: My-FyiReporting
Source File: VisibilityCtl.cs
private void InitValues(XmlNode node)
		{
			
			
			// Handle Visiblity definition
			XmlNode visNode = _Draw.GetNamedChildNode(node, "Visibility");
			if (visNode != null)
			{
				XmlNode hNode = _Draw.GetNamedChildNode(node, "Visibility");
				this.tbHidden.Text = _Draw.GetElementValue(visNode, "Hidden", "");
				this.cbToggle.Text = _Draw.GetElementValue(visNode, "ToggleItem", "");
			}
			IEnumerable list = _Draw.GetReportItems("//Textbox");
			if (list != null)
			{
				foreach (XmlNode tNode in list)
				{
					XmlAttribute name = tNode.Attributes["Name"];
					if (name != null && name.Value != null && name.Value.Length > 0)
						cbToggle.Items.Add(name.Value);
				}
			}
			// nothing has changed now
			fHidden = fToggle = false;
		}

113. Example

Project: referencesource
Source File: UnsettableComboBox.cs
internal void EnsureNotSetItem() 
        {
            if (Items.Count == 0) 
            {
                Items.Add(notSetText);
            }
        }

114. Example

Project: referencesource
Source File: DeviceFilterEditorDialog.cs
private void LoadAvailableCapabilities()
        {
            Type type = typeof(System.Web.Mobile.MobileCapabilities);
            PropertyInfo[] properties = type.GetProperties();
            foreach(PropertyInfo property in properties)
            {
                _cbCompare.Items.Add(property.Name);
            }
        }

115. Example

Project: clrprofiler
Source File: CommentRangeForm.cs
private void FillComboBoxes()
        {
            ReadNewLog log = MainForm.instance.log;

            startComboBox.Items.Add(startCommentString);
            endComboBox.Items.Add(startCommentString);

            for (int i = 0; i < log.commentEventList.count; i++)
            {
                string comment = log.commentEventList.eventString[i];
                startComboBox.Items.Add(comment);
                endComboBox.Items.Add(comment);
            }

            startComboBox.Items.Add(shutdownCommentString);
            endComboBox.Items.Add(shutdownCommentString);

            startComboBox.SelectedIndex = 0;
            endComboBox.SelectedIndex = endComboBox.Items.Count - 1;
            if (startComboBox.Items.Count > 2)
                startComboBox.SelectedIndex = 1;
            if (endComboBox.Items.Count > 2)
                endComboBox.SelectedIndex = 2;
        }

116. Example

Project: lslib
Source File: ExportItemSelection.cs
private void PopulateCombo()
        {
            switch (_currentItem.SubItems[1].Text)
            {
                case "Mesh":
                {
                    _currentItemCombo.Items.Add("Automatic");
                    foreach (KeyValuePair<string, Type> defn in VertexFormatRegistry.GetAllTypes())
                    {
                        _currentItemCombo.Items.Add(defn.Key);
                    }
                    break;
                }
                case "Position Track":
                case "Rotation Track":
                case "Scale/Shear Track":
                {
                    _currentItemCombo.Items.Add("Automatic");
                    foreach (KeyValuePair<string, Type> defn in CurveRegistry.GetAllTypes())
                    {
                        _currentItemCombo.Items.Add(defn.Key);
                    }
                    break;
                }
            }
        }

117. Example

Project: LaserGRBL
Source File: ComboBoxEnumItem.cs
public void AddItem(Enum item)
		{ Items.Add(new ComboBoxEnumItem(item)); }

118. Example

Project: OpenLiveWriter
Source File: MapSidebarControl.cs
public void Initialize()
            {
                Items.Add(NO_MARGINS);
                Items.Add(CUSTOM_MARGINS);
            }

119. Example

Project: OpenLiveWriter
Source File: AdvancedPanel.cs
private void SetSupportValues()
        {
            using (Blog blog = new Blog(TemporaryBlogSetti/n ..... /n //View Source file for more details /n }

120. Example

Project: OpenLiveWriter
Source File: HtmlMarginEditor.cs
public void Initialize()
            {
                Items.Add(NO_MARGINS);
                Items.Add(CUSTOM_MARGINS);
            }

121. Example

Project: NClass
Source File: ColorComboBox.cs
void Fill()
    {
      Items.Add(new ColorItem(XColor.Empty, "custom"));
      XKnownColor[] knownColors = XColorResourceManager.GetKnownColors(false);
      int count = knownColors.Length;
      for (int idx = 0; idx < knownColors.Length; idx++)
      {
        XKnownColor color = knownColors[idx];
        Items.Add(new ColorItem(XColor.FromKnownColor(color), crm.ToColorName(color)));
      }
    }

122. Example

Project: MailSystem.NET
Source File: frmDnsCheck.Designer.cs
private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Labe/n ..... /n //View Source file for more details /n }

123. Example

Project: MailSystem.NET
Source File: frmDnsCheck.Designer.cs
private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Labe/n ..... /n //View Source file for more details /n }

124. Example

Project: SLED
Source File: SledLuaFunctionToolbar.cs
public void Initialize(ISledDocument sd)
        {
            m_sd = sd;

            // Default state
            m_bChangingSelection = true;
            Items.Add(NotProjectFile);
            SelectedItem = NotProjectFile;
            Enabled = false;
            m_bChangingSelection = false;

            // Follow user interaction
            SelectedIndexChanged += SledLuaFunctionToolbarSelectedIndexChanged;

            m_gotoService = SledServiceInstance.Get<ISledGotoService>();

            m_projectService = SledServiceInstance.Get<ISledProjectService>();

            m_projectService.FileOpened += ProjectServiceFileOpened;
            m_projectService.Opened += ProjectServiceOpened;
            m_projectService.FileAdded += ProjectServiceFileAdded;
            m_projectService.FileRemoving += ProjectServiceFileRemoving;

            m_luaFunctionParserService = SledServiceInstance.Get<ISledLuaFunctionParserService>();
            m_luaFunctionParserService.ParsedFunctions += LuaFunctionParserServiceParsedFunctions;

            m_luaFunctionCursorWatcherService = SledServiceInstance.Get<ISledLuaFunctionCursorWatcherService>();
            m_luaFunctionCursorWatcherService.CursorFunctionChanged += LuaFunctionCursorWatcherServiceCursorFunctionChanged;
        }

125. Example

Project: subtitleedit
Source File: GoogleTranslate.cs
public void FillComboWithGoogleLanguages(ComboBox comboBox)
        {
            comboBox.Items.Add/n ..... /n //View Source file for more details /n }

126. Example

Project: justdecompile-plugins
Source File: GenericTypeReferenceEditor.cs
private void AppendGenericParameters(Mono.Collections.Generic.Collection<GenericParameter> collection)
		{
			foreach (GenericParameter item in collection)
			{
				Items.Add(item);
			}
		}

127. Example

Project: justdecompile-plugins
Source File: GenericTypeReferenceEditor.cs
private void AppendGenericParameters(Mono.Collections.Generic.Collection<GenericParameter> collection)
		{
			foreach (GenericParameter item in collection)
			{
				Items.Add(item);
			}
		}

128. Example

Project: Wolven-kit
Source File: CHandle.cs
public override Control GetEditor()
        {
            if (ChunkHandle)
            {
           /n ..... /n //View Source file for more details /n }

129. Example

Project: Wolven-kit
Source File: CPtr.cs
public override Control GetEditor()
        {
            var editor = new ComboBox();
            editor.Items.Add(new PtrComboItem {Text = "", Value = 0});

            for (var i = 0; i < cr2w.chunks.Count; i++)
            {
                editor.Items.Add(new PtrComboItem {Text = cr2w.chunks[i].Type + " #" + (i + 1), Value = i + 1});
            }

            editor.SelectedIndexChanged += delegate(object sender, EventArgs e)
            {
                var item = (PtrComboItem) ((ComboBox) sender).SelectedItem;
                if (item != null)
                {
                    ChunkIndex = item.Value - 1;
                }
            };

            var selIndex = ChunkIndex + 1;
            if (selIndex < editor.Items.Count && selIndex >= 0)
            {
                editor.SelectedIndex = selIndex;
            }
            return editor;
        }

130. Example

Project: codegenerator
Source File: ServerSettingsForm.cs
private void InitializingProviderTypes()
		{
			uiProviderTypeSelection.Items.Add(new DataAccessProviderInfo(DataProviderType.SqlClient));
			uiProviderTypeSelection.Items.Add(new DataAccessProviderInfo(DataProviderType.MySql));
			uiProviderTypeSelection.Items.Add(new DataAccessProviderInfo(DataProviderType.PostgresSql));
			uiProviderTypeSelection.Items.Add(new DataAccessProviderInfo(DataProviderType.Oracle));

			uiProviderTypeSelection.DisplayMember = "Name";
		}

131. Example

Project: AnotherSc2Hack
Source File: ImageCombobox.cs
private void LoadUnits()
        {
            var imgTerran = Properties.Resources.Race_Terran64.Se/n ..... /n //View Source file for more details /n }

132. Example

Project: DiabloInterface
Source File: FontComboBox.cs
void PopulateFonts()
        {
            if (Items.Count != 0) return;
            foreach (FontFamily family in FontFamily.Families)
            {
                Items.Add(family.Name);
            }
        }

133. Example

Project: AutoTest.Net
Source File: AddConfigurationDialog.cs
private void ConfigurationNameDialog_Load(object sender, System.EventArgs e)
		{
			configurationComboBox.Items.Add( "<none>" );
			configurationComboBox.SelectedIndex = 0;

			foreach( ProjectConfig config in project.Configs )
			{
				int index = configurationComboBox.Items.Add( config.Name );
				if ( config.Name == project.ActiveConfigName )
					configurationComboBox.SelectedIndex = index;
			}
		}

134. Example

Project: AutoTest.Net
Source File: AddConfigurationDialog.cs
private void ConfigurationNameDialog_Load(object sender, System.EventArgs e)
		{
			configurationComboBox.Items.Add( "<none>" );
			configurationComboBox.SelectedIndex = 0;

			foreach( ProjectConfig config in project.Configs )
			{
				int index = configurationComboBox.Items.Add( config.Name );
				if ( config.Name == project.ActiveConfigName )
					configurationComboBox.SelectedIndex = index;
			}
		}

135. Example

Project: AutoTest.Net
Source File: AddConfigurationDialog.cs
private void ConfigurationNameDialog_Load(object sender, System.EventArgs e)
		{
			configurationComboBox.Items.Add( "<none>" );
			configurationComboBox.SelectedIndex = 0;

			foreach( ProjectConfig config in project.Configs )
			{
				int index = configurationComboBox.Items.Add( config.Name );
				if ( config.Name == project.ActiveConfigName )
					configurationComboBox.SelectedIndex = index;
			}
		}

136. Example

Project: ContinuousTests
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...>" );
		}

137. Example

Project: ContinuousTests
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;
		}

138. Example

Project: ContinuousTests
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;
        }

139. Example

Project: ContinuousTests
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...>" );
		}

140. Example

Project: ContinuousTests
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;
        }

141. Example

Project: ContinuousTests
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...>" );
		}

142. Example

Project: ContinuousTests
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;
		}

143. Example

Project: ContinuousTests
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;
        }

144. Example

Project: naps2
Source File: FormBase.cs
protected void AddEnumItems<T>(ComboBox combo, ListControlConvertEventHandler format)
        {
            foreach (object item in Enum.GetValues(typeof(T)))
            {
                combo.Items.Add(item);
            }
            combo.Format += format;
        }

145. Example

Project: MiniMVP
Source File: Tests.cs
[Fact]
      public void ComboBoxExtensions_WithPoco_ReturnsValidVAlue()
      {
        Fixture fixture = new Fixture();
        var objs = fixture.CreateMany<SimpleBinding>().ToList();

        ComboBox cbo = new ComboBox();
        cbo.DisplayMember = "Display";
        cbo.ValueMember = "Value";
        objs.ForEach(obj => cbo.Items.Add(obj));
        cbo.SelectedIndex = 0;

        Assert.Equal(objs[0].Value, cbo.GetSelectedValue<int>());        
      }

146. Example

Project: MapleShark
Source File: FindReplace.cs
private void btnReplaceAll_Click(object sender, EventArgs e)
        {
            string text = cboFind.Text;
            if (text == "")
                return;

            bool found = false;
            foreach (string s in cboFind.Items)
            {
                if (s == text)
                {
                    found = true;
                    break;
                }
            }
            if (!found)
                cboFind.Items.Add(text);

            int x = mOwner.Caret.Position.X;
            int y = mOwner.Caret.Position.Y;
            mOwner.Caret.Position.X = 0;
            mOwner.Caret.Position.Y = 0;
            while (mOwner.SelectNext(cboFind.Text, chkMatchCase.Checked,
                                     chkWholeWord.Checked, chkRegEx.Checked))
            {
                mOwner.ReplaceSelection(cboReplace.Text);
            }

            mOwner.Selection.ClearSelection();
            //	mOwner.Caret.Position.X=x;
            //	mOwner.Caret.Position.Y=y;
            //	mOwner.ScrollIntoView ();

            cboFind.Focus();
        }

147. Example

Project: MapleShark
Source File: FindReplace.cs
private void btnMarkAll_Click(object sender, EventArgs e)
        {
            string text = cboFind.Text;
            if (text == "")
                return;

            bool found = false;
            foreach (string s in cboFind.Items)
            {
                if (s == text)
                {
                    found = true;
                    break;
                }
            }
            if (!found)
                cboFind.Items.Add(text);

            int x = mOwner.Caret.Position.X;
            int y = mOwner.Caret.Position.Y;
            mOwner.Caret.Position.X = 0;
            mOwner.Caret.Position.Y = 0;
            while (mOwner.SelectNext(cboFind.Text, chkMatchCase.Checked,
                                     chkWholeWord.Checked, chkRegEx.Checked))
            {
                mOwner.Caret.CurrentRow.Bookmarked = true;
            }

            mOwner.Selection.ClearSelection();
            //	mOwner.Caret.Position.X=x;
            //	mOwner.Caret.Position.Y=y;
            //	mOwner.ScrollIntoView ();

            cboFind.Focus();
        }

148. Example

Project: dp2
Source File: GuiState.cs
static void SetComboBoxTextState(ComboBoxText container,
            string strText,
            obj/n ..... /n //View Source file for more details /n }

149. Example

Project: dp2
Source File: PersonAddressControl.cs
private void comboBox_payStyle_DropDown(object sender, EventArgs e)
        {
            // ???? 20/n ..... /n //View Source file for more details /n }

150. Example

Project: dp2
Source File: SpecialSourceSeriesDialog.cs
private void comboBox_DropDown(object sender, EventArgs e)
        {
            // ???? 2009/7/19
 /n ..... /n //View Source file for more details /n }