本文整理汇总了C#中ComboBox.Select方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBox.Select方法的具体用法?C# ComboBox.Select怎么用?C# ComboBox.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ComboBox
的用法示例。
在下文中一共展示了ComboBox.Select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateControlPanel
private Panel CreateControlPanel()
{
Panel panel = new Panel(this);
BoxSizer sizer = new BoxSizer(Orientation.Horizontal);
_port = new ComboBox(panel, "", WxDefaultPosition, WxDefaultSize, new string[0],
WindowStyles.ComboBoxDropDown | WindowStyles.ComboBoxReadonly);
UpdatePorts();
sizer.Add(_port, 0, SizerFlag.Expand | SizerFlag.All, 5);
Bitmap refreshBitmap = GetType().Assembly.GetManifestResourceWxBitmap("DummyLoadController.Images.refresh.png");
_refreshPorts = new BitmapButton(panel, ID_RefreshPorts, refreshBitmap);
EvtButton(ID_RefreshPorts, (s, e) => UpdatePorts());
sizer.Add(_refreshPorts, 0, SizerFlag.Expand | SizerFlag.All, 0);
string[] baudRates = new[] { "300", "600", "1200", "2400", "4800", "9600", "14,400", "19,200", "28,800", "38,400", "57,600", "76,800", "115,200", "230,400" };
_baudRate = new ComboBox(panel, "", WxDefaultPosition, WxDefaultSize, baudRates, WindowStyles.ComboBoxDropDown | WindowStyles.ComboBoxReadonly);
_baudRate.Select(5);
sizer.Add(_baudRate, 0, SizerFlag.Expand | SizerFlag.All, 5);
_connect = new Button(panel, ID_Connect, "Connect");
EvtButton(ID_Connect, (s, e) => Connect());
sizer.Add(_connect, 0, SizerFlag.Expand | SizerFlag.All, 5);
_disconnect = new Button(panel, ID_Disconnect, "Disconnect");
EvtButton(ID_Disconnect, (s, e) => _comService.Disconnect());
sizer.Add(_disconnect, 0, SizerFlag.Expand | SizerFlag.All, 5);
panel.SetSizer(sizer);
sizer.SetSizeHints(panel);
return panel;
}
示例2: OnInitializeComponent
public override void OnInitializeComponent()
{
expDT = this.UIAPIRawForm.DataSources.DataTables.Item("Grid");
expType = (ComboBox)GetItem("expType").Specific;
expGrid = (Grid)GetItem("expGrid").Specific;
exportBT = (Button)GetItem("ExportBT").Specific;
exportBT.ClickAfter += new _IButtonEvents_ClickAfterEventHandler(exportBT_ClickAfter);
expType.ComboSelectAfter += new _IComboBoxEvents_ComboSelectAfterEventHandler(expType_ComboSelectAfter);
expType.Select("UDO");
}
示例3: iPhoneDiskApplication
public iPhoneDiskApplication()
{
#region GUI preparation
Text = "jPhone";
MaximizeBox = false;
Size = new Size(nDefaultWidth, nHeightWithoutDebugLog);
FormBorderStyle = FormBorderStyle.FixedSingle;
ShowIcon = true;
iApplication = new Icon(GetType(), "jphone.icons.icon.ico");
Icon = iApplication;
FormClosing += new FormClosingEventHandler(iPhoneDiskApplication_FormClosing);
SizeChanged += new EventHandler(iPhoneDiskApplication_SizeChanged);
Show();
niTrayIcon = new NotifyIcon();
niTrayIcon.Text = "jPhone";
niTrayIcon.Icon = Icon;
niTrayIcon.Click += new EventHandler(niTrayIcon_Click);
lbText = new Label();
lbText.AutoSize = true;
lbText.Location = new Point(10, 10);
lbText.Text = "Select the iPhone, iPod Touch or iPad to mount:";
cbDeviceList = new ComboBox();
cbDeviceList.Location = new Point(lbText.Left + 5, lbText.Bottom);
cbDeviceList.Width = 320;
cbDeviceList.DropDownStyle = ComboBoxStyle.DropDownList;
buMount = new Button();
buMount.Location = new Point(cbDeviceList.Right + 15, cbDeviceList.Top - 3);
buMount.Size = new Size(80, 25);
buMount.Click += new EventHandler(buMount_Click);
buMount.Enabled = false;
cmOptions = new ContextMenuStrip();
cmOptions.RenderMode = ToolStripRenderMode.System;
cmOptions.ShowImageMargin = false;
cmOptions.ShowCheckMargin = true;
tsmiAutomount = new ToolStripMenuItem("Automount", null, (s, e) => { tsmiAutomount.Checked = !tsmiAutomount.Checked; });
tsmiMinimizeToTray = new ToolStripMenuItem("Minimize to tray", null, (s, e) => { tsmiMinimizeToTray.Checked = !tsmiMinimizeToTray.Checked; });
tsmiShowDebugLog = new ToolStripMenuItem("Show debug log", null, (s, e) =>
{
tsmiShowDebugLog.Checked = !tsmiShowDebugLog.Checked;
if (bShowDebugLog) Height = nHeightWithDebugLog;
else Height = nHeightWithoutDebugLog;
});
tsmiReapplyLibUSBFilters = new ToolStripMenuItem("Re-apply libusb filters", null, ReapplyLibUSBFilters_Click);
cmOptions.Items.Add(tsmiAutomount);
cmOptions.Items.Add(tsmiShowDebugLog);
cmOptions.Items.Add(tsmiMinimizeToTray);
cmOptions.Items.Add("-");
cmOptions.Items.Add(tsmiReapplyLibUSBFilters);
buOptions = new Button();
buOptions.Location = new Point(buMount.Right + 5, buMount.Top);
buOptions.Size = new Size(80, 25);
buOptions.Text = "Options";
buOptions.Click += (s, e) => { cmOptions.Show(PointToScreen(new Point(buOptions.Left, buOptions.Bottom))); };
bool[] bOptions = GetRegistryOptions();
tsmiAutomount.Checked = bOptions[0];
tsmiShowDebugLog.Checked = bOptions[1];
tsmiMinimizeToTray.Checked = bOptions[2];
if (bShowDebugLog) Height = nHeightWithDebugLog;
tbDebugLog = new TextBox();
tbDebugLog.ReadOnly = true;
tbDebugLog.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
tbDebugLog.Location = new Point(10, 75);
tbDebugLog.Size = new Size(ClientSize.Width - 20, nHeightWithDebugLog - 145);
tbDebugLog.Multiline = true;
tbDebugLog.BorderStyle = BorderStyle.FixedSingle;
tbDebugLog.ScrollBars = ScrollBars.Vertical;
sbStatus = new StatusBar();
sbStatus.Dock = DockStyle.Bottom;
sbStatus.SizingGrip = false;
sbStatus.ShowPanels = true;
sbpDeviceCount = new StatusBarPanel();
sbpDeviceCount.Width = 150;
sbpDeviceCount.Alignment = HorizontalAlignment.Center;
sbpMountStatus = new StatusBarPanel();
sbpMountStatus.AutoSize = StatusBarPanelAutoSize.Spring;
sbpMountStatus.Alignment = HorizontalAlignment.Center;
sbStatus.Panels.Add(sbpDeviceCount);
sbStatus.Panels.Add(sbpMountStatus);
Controls.AddRange(new Control[] { lbText, cbDeviceList, buMount, buOptions, sbStatus, tbDebugLog });
cbDeviceList.Select();
#endregion
Global.LogUpdated += new Global.LogEventHandler(Global_LogUpdated);
USBNotifier.OnDeviceNotify += new EventHandler<DeviceNotifyEventArgs>(USBNotifier_OnDeviceNotify);
Global.Log("jPhone 1.0: iPhone mounting utility. Copyright 2010 Jonathan Bergknoff.\n");
Global.Log("Shift-click the mount button to mount a jailbroken device as root.\n");
Global.Log("http://www.getjpod.com/jphone\n");
//.........这里部分代码省略.........