Mono.UIAutomation.Winforms.ComboBoxProvider.ComboBoxListBoxProvider.SelectItem C# (CSharp) Method

SelectItem() public method

public SelectItem ( ListItemProvider item ) : void
item ListItemProvider
return void
			public override void SelectItem (ListItemProvider item)
			{
				if (ContainsItem (item) == true) {
					comboboxControl.SelectedIndex = item.Index;

					// Raise SelectionChangeCommitted event
					// on the ComboBox. Since we are simulating
					// a user interacting with the control,
					// this event is expected.
					//
					// NOTE: This is a protected method that
					//       is a part of the documented
					//       API for SWF.ComboBox.
					MethodInfo onSelectionChangeCommitted =
						comboboxControl.GetType ().GetMethod ("OnSelectionChangeCommitted",
						                                      BindingFlags.NonPublic | BindingFlags.Instance);
					if (onSelectionChangeCommitted != null) {
						onSelectionChangeCommitted.Invoke (comboboxControl,
							                                   new object [] {EventArgs.Empty});
					}
				}
			}