本文整理汇总了C#中ComboBoxEx类的典型用法代码示例。如果您正苦于以下问题:C# ComboBoxEx类的具体用法?C# ComboBoxEx怎么用?C# ComboBoxEx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComboBoxEx类属于命名空间,在下文中一共展示了ComboBoxEx类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HienThiComboBoxMaHS
public void HienThiComboBoxMaHS(String namHoc, String lop, ComboBoxEx comboBox)
{
HocSinhData m_HSData = new HocSinhData();
comboBox.DataSource = m_HSData.LayDsHocSinhTheoLop(namHoc, lop);
comboBox.DisplayMember = "MaHocSinh";
comboBox.ValueMember = "MaHocSinh";
}
开发者ID:pthdnq,项目名称:csharp-project-nduang,代码行数:7,代码来源:HocSinhCtrl.cs
示例2: InitializeComponent
private void InitializeComponent()
{
ComponentResourceManager manager = new ComponentResourceManager(typeof(AutoRefreshOptionControl));
PropertyValue value2 = new PropertyValue();
this.lblSlowVolumeAutoRefresh = new Label();
this.cmbSlowVolumeAutoRefresh = new ComboBoxEx();
this.ValuesWatcher = new PropertyValuesWatcher();
TableLayoutPanel panel = new TableLayoutPanel();
panel.SuspendLayout();
((ISupportInitialize) this.ValuesWatcher).BeginInit();
base.SuspendLayout();
manager.ApplyResources(panel, "tlpBack");
panel.Controls.Add(this.lblSlowVolumeAutoRefresh, 0, 0);
panel.Controls.Add(this.cmbSlowVolumeAutoRefresh, 1, 0);
panel.Name = "tlpBack";
manager.ApplyResources(this.lblSlowVolumeAutoRefresh, "lblSlowVolumeAutoRefresh");
this.lblSlowVolumeAutoRefresh.Name = "lblSlowVolumeAutoRefresh";
manager.ApplyResources(this.cmbSlowVolumeAutoRefresh, "cmbSlowVolumeAutoRefresh");
this.cmbSlowVolumeAutoRefresh.DropDownStyle = ComboBoxStyle.DropDownList;
this.cmbSlowVolumeAutoRefresh.FormattingEnabled = true;
this.cmbSlowVolumeAutoRefresh.MinimumSize = new Size(110, 0);
this.cmbSlowVolumeAutoRefresh.Name = "cmbSlowVolumeAutoRefresh";
value2.DataObject = this.cmbSlowVolumeAutoRefresh;
value2.PropertyName = "SelectedIndex";
this.ValuesWatcher.Items.AddRange(new PropertyValue[] { value2 });
manager.ApplyResources(this, "$this");
base.AutoScaleMode = AutoScaleMode.Font;
base.Controls.Add(panel);
base.Name = "AutoRefreshOptionControl";
panel.ResumeLayout(false);
panel.PerformLayout();
((ISupportInitialize) this.ValuesWatcher).EndInit();
base.ResumeLayout(false);
base.PerformLayout();
}
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:35,代码来源:AutoRefreshOptionControl.cs
示例3: HienThi
public void HienThi(DataGridViewX dGV,
BindingNavigator bN,
TextBoxX txtSTT,
ComboBoxEx cmbNamHoc,
ComboBoxEx cmbLop,
ComboBoxEx cmbMonHoc,
ComboBoxEx cmbGiaoVien)
{
BindingSource bS = new BindingSource();
bS.DataSource = m_PhanCongData.LayDsPhanCong();
txtSTT.DataBindings.Clear();
txtSTT.DataBindings.Add("Text", bS, "STT");
cmbNamHoc.DataBindings.Clear();
cmbNamHoc.DataBindings.Add("SelectedValue", bS, "MaNamHoc");
cmbLop.DataBindings.Clear();
cmbLop.DataBindings.Add("SelectedValue", bS, "MaLop");
cmbMonHoc.DataBindings.Clear();
cmbMonHoc.DataBindings.Add("SelectedValue", bS, "MaMonHoc");
cmbGiaoVien.DataBindings.Clear();
cmbGiaoVien.DataBindings.Add("SelectedValue", bS, "MaGiaoVien");
bN.BindingSource = bS;
dGV.DataSource = bS;
}
开发者ID:pthdnq,项目名称:csharp-project-nduang,代码行数:29,代码来源:PhanCongCtrl.cs
示例4: InitializeContentCombobox
private void InitializeContentCombobox(ComboBoxEx cbo)
{
// Load unit
var defines = _defineRepository.GetContentUnit();
defines.Insert(0, new Define() { Id = 0, Name = "" });
cbo.DataSource = defines;
}
开发者ID:kiemhieu,项目名称:medicine-website,代码行数:7,代码来源:frmMedicinEdit.cs
示例5: HienThiComboBox
public void HienThiComboBox(String namHoc, String lop, ComboBoxEx comboBox)
{
MonHocData m_MHData = new MonHocData();
comboBox.DataSource = m_MHData.LayDsMonHoc(namHoc, lop);
comboBox.DisplayMember = "TenMonHoc";
comboBox.ValueMember = "MaMonHoc";
}
开发者ID:pthdnq,项目名称:csharp-project-nduang,代码行数:7,代码来源:MonHocCtrl.cs
示例6: CrossThreadInvoke
public static void CrossThreadInvoke(ComboBoxEx t, MethodInvoker m)
{
if (t.InvokeRequired)
{
t.Invoke(m);
}
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:7,代码来源:SlienceWorker.cs
示例7: DataGridViewComboBoxExColumn
/// <summary>
/// Constructor
/// </summary>
public DataGridViewComboBoxExColumn()
{
CellTemplate = new DataGridViewComboBoxExCell();
_ComboBoxEx = new ComboBoxEx();
_ComboBoxEx.Col1Width = this.Col1Width;
_ComboBoxEx.Col2Width = this.Col2Width;
_ComboBoxEx.Col3Width = this.Col3Width;
_ComboBoxEx.RenderBorder = false;
_ComboBoxEx.Visible = false;
HookEvents(true);
}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:17,代码来源:DataGridViewComboBoxExColumn.cs
示例8: SetFormData
/// <summary>
/// ComboBox 用
/// </summary>
/// <param name="strValue"></param>
/// <param name="obj"></param>
/// <param name="logObjName"></param>
/// <returns></returns>
public ComboBoxEx SetFormData(string strValue, ComboBoxEx obj, string logObjName)
{
if (string.IsNullOrEmpty(strValue))
{
obj.Text = "";
_prlp.SetBeforeSaveText(logObjName, "");
}
else
{
obj.Text = strValue;
_prlp.SetBeforeSaveText(logObjName, strValue);
}
return obj;
}
开发者ID:ChunTaiChen,项目名称:UpdateRecordModule_SH_D,代码行数:22,代码来源:FormAndLogDataManager.cs
示例9: BindProviceComBox
/// <summary>
/// 创建人:唐春奎
/// 用于三级联动绑定省份数据的方法
/// </summary>
/// <param name="ControlName"></param>
/// <param name="typename"></param>
public static void BindProviceComBox(ComboBoxEx ControlName, string typename)
{
List<ListItem> list = new List<ListItem>();
list.Add(new ListItem("", typename));
string sqlWhere = " AREA_LEVEL=0 ";
DataTable dt_Provice = DBHelper.GetTable("查询区域表省份信息", GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, "sys_area", "AREA_CODE,AREA_NAME", sqlWhere, "", " order by AREA_CODE ");
if (dt_Provice != null && dt_Provice.Rows.Count > 0)
{
foreach (DataRow dr in dt_Provice.Rows)
{
list.Add(new ListItem(dr["AREA_CODE"].ToString(), dr["AREA_NAME"].ToString()));
}
}
ControlName.DisplayMember = "Text";
ControlName.ValueMember = "Value";
ControlName.DataSource = list;
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:24,代码来源:CommonFuncCall.cs
示例10: BindCityComBox
/// <summary>
/// 创建人:唐春奎
/// 用于三级联动绑定城市数据的方法
/// </summary>
/// <param name="ControlName"></param>
/// <param name="ProviceID"></param>
/// <param name="typename"></param>
public static void BindCityComBox(ComboBoxEx ControlName, string ProviceID, string typename)
{
List<ListItem> list = new List<ListItem>();
list.Add(new ListItem("", typename));
if (!string.IsNullOrEmpty(ProviceID))
{
string sqlWhere = " PARENT_CODE=" + ProviceID + "";
DataTable dt_City = DBHelper.GetTable("查询区域表城市信息", GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, "sys_area", "AREA_CODE,AREA_NAME", sqlWhere, "", " order by AREA_CODE ");
if (dt_City != null && dt_City.Rows.Count > 0)
{
foreach (DataRow dr in dt_City.Rows)
{
list.Add(new ListItem(dr["AREA_CODE"].ToString(), dr["AREA_NAME"].ToString()));
}
}
}
ControlName.DisplayMember = "Text";
ControlName.ValueMember = "Value";
ControlName.DataSource = list;
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:27,代码来源:CommonFuncCall.cs
示例11: obtenerIndice
private int obtenerIndice(object item, ComboBoxEx cb)
{
for (int i = 0; i < cb.Items.Count; i++)
if (cb.Items[i].ToString().CompareTo(item.ToString()) == 0)
return i;
return 0;
}
开发者ID:jluisacosta,项目名称:ICS,代码行数:8,代码来源:FProductos.cs
示例12: HienThiComboBox
public void HienThiComboBox(ComboBoxEx comboBox)
{
comboBox.DataSource = m_LoaiDiemData.LayDsLoaiDiem();
comboBox.DisplayMember = "TenLoaiDiem";
comboBox.ValueMember = "MaLoaiDiem";
}
开发者ID:pthdnq,项目名称:csharp-project-nduang,代码行数:6,代码来源:LoaiDiemCtrl.cs
示例13: EnableComboBox
public void EnableComboBox(ComboBoxEx combo)
{
if (combo.InvokeRequired)
{
combo.Invoke(
new MethodInvoker(
delegate { EnableComboBox(combo); }));
}
else
{
combo.Enabled = true;
}
}
开发者ID:civicacid,项目名称:myevo,代码行数:13,代码来源:Main.cs
示例14: UpdateComboBoxEx
private void UpdateComboBoxEx(ComboBoxEx item, bool enabled)
{
if (item.InvokeRequired)
{
item.Invoke(new Action<ComboBoxEx, bool>(UpdateComboBoxEx), item, enabled);
return;
}
item.Enabled = enabled;
}
开发者ID:civicacid,项目名称:myevo,代码行数:9,代码来源:Main.cs
示例15: BindAccount
/// <summary> 创建人:唐春奎 获取结算账户信息 绑定采购开单
/// </summary>
/// <param name="ControlName">控件名称</param>
/// <param name="typename">true:全部, false:请选择</param>
public static void BindAccount(ComboBoxEx ControlName,string whereStr, string typename)
{
string sql_where = " enable_flag=1 ";
List<ListItem> list = new List<ListItem>();
list.Add(new ListItem("", typename));
if (!string.IsNullOrEmpty(whereStr))
{
sql_where += " and cashier_account='" + whereStr + "'";
DataTable dt = DBHelper.GetTable("", "tb_cashier_account", "cashier_account,account_name", sql_where, "", "");
foreach (DataRow dr in dt.Rows)
{
list.Add(new ListItem(dr["cashier_account"], dr["account_name"].ToString()));
}
}
ControlName.DataSource = list;
ControlName.ValueMember = "Value";
ControlName.DisplayMember = "Text";
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:22,代码来源:CommonFuncCall.cs
示例16: LoadScanItems
private void LoadScanItems(ComboBoxEx cb)
{
List<object> list = _GridColumn.ScanItems;
int n = Math.Min(list.Count, _GridColumn.FilterPopupMaxItems);
MyComboItem[] items = new MyComboItem[n];
bool blankSeen = false;
for (int i = 0; i < n; i++)
{
object o = list[i];
MyComboItem bi;
if (o is DateTime)
{
DateTime dt = (DateTime)o;
dt = dt.Date;
string s = dt.ToShortDateString();
bi = new MyComboItem("ScanDateEntry", s, dt);
}
else
{
string s = o.ToString();
bi = new MyComboItem("ScanTextEntry", s, i);
if (blankSeen == false && string.IsNullOrEmpty(bi.Text) == true)
blankSeen = true;
}
items[i] = bi;
}
if (blankSeen == false)
cb.Items.Add("");
cb.Items.AddRange(items);
}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:43,代码来源:FilterPanel.cs
示例17: InitializeComponent
private void InitializeComponent()
{
ComponentResourceManager manager = new ComponentResourceManager(typeof(FileSystemCopyDialog));
this.btnOk = new Button();
this.btnCancel = new Button();
this.btnTree = new Button();
this.tlpBack = new TableLayoutPanel();
this.lblCopyTo = new Label();
this.chkAsyncFileCopy = new CheckBox();
this.chkCopyItemACL = new CheckBox();
this.chkSkipEmptyFolders = new CheckBox();
this.cmbCopyTo = new ComboBox();
this.chkCheckFreeSpace = new CheckBox();
this.chkCopyItemTime = new CheckBox();
this.lblMode = new Label();
this.cmbMode = new ComboBoxEx();
this.lblFilter = new Label();
this.chkDeleteSource = new CheckBox();
this.cmbFilter = new FilterComboBox();
this.bvlButtons = new Bevel();
this.Validator = new ValidatorProvider();
this.AutoComplete = new AutoCompleteProvider();
TableLayoutPanel panel = new TableLayoutPanel();
panel.SuspendLayout();
this.tlpBack.SuspendLayout();
base.SuspendLayout();
manager.ApplyResources(panel, "tlpButtons");
panel.Controls.Add(this.btnOk, 1, 0);
panel.Controls.Add(this.btnCancel, 3, 0);
panel.Controls.Add(this.btnTree, 2, 0);
panel.GrowStyle = TableLayoutPanelGrowStyle.FixedSize;
panel.Name = "tlpButtons";
manager.ApplyResources(this.btnOk, "btnOk");
this.btnOk.Name = "btnOk";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new EventHandler(this.btnOk_Click);
manager.ApplyResources(this.btnCancel, "btnCancel");
this.btnCancel.DialogResult = DialogResult.Cancel;
this.btnCancel.Name = "btnCancel";
this.btnCancel.UseVisualStyleBackColor = true;
manager.ApplyResources(this.btnTree, "btnTree");
this.btnTree.Name = "btnTree";
this.btnTree.UseVisualStyleBackColor = true;
this.btnTree.Click += new EventHandler(this.btnTree_Click);
manager.ApplyResources(this.tlpBack, "tlpBack");
this.tlpBack.Controls.Add(this.lblCopyTo, 0, 0);
this.tlpBack.Controls.Add(this.chkAsyncFileCopy, 1, 6);
this.tlpBack.Controls.Add(this.chkCopyItemACL, 0, 6);
this.tlpBack.Controls.Add(this.chkSkipEmptyFolders, 1, 5);
this.tlpBack.Controls.Add(this.cmbCopyTo, 0, 1);
this.tlpBack.Controls.Add(this.chkCheckFreeSpace, 1, 4);
this.tlpBack.Controls.Add(this.chkCopyItemTime, 0, 5);
this.tlpBack.Controls.Add(this.lblMode, 0, 2);
this.tlpBack.Controls.Add(this.cmbMode, 0, 3);
this.tlpBack.Controls.Add(this.lblFilter, 1, 2);
this.tlpBack.Controls.Add(this.chkDeleteSource, 0, 4);
this.tlpBack.Controls.Add(this.cmbFilter, 1, 3);
this.tlpBack.GrowStyle = TableLayoutPanelGrowStyle.FixedSize;
this.tlpBack.Name = "tlpBack";
this.lblCopyTo.AutoEllipsis = true;
this.tlpBack.SetColumnSpan(this.lblCopyTo, 2);
manager.ApplyResources(this.lblCopyTo, "lblCopyTo");
this.lblCopyTo.Name = "lblCopyTo";
manager.ApplyResources(this.chkAsyncFileCopy, "chkAsyncFileCopy");
this.chkAsyncFileCopy.Checked = true;
this.chkAsyncFileCopy.CheckState = CheckState.Indeterminate;
this.chkAsyncFileCopy.Name = "chkAsyncFileCopy";
this.chkAsyncFileCopy.ThreeState = true;
this.chkAsyncFileCopy.UseVisualStyleBackColor = true;
manager.ApplyResources(this.chkCopyItemACL, "chkCopyItemACL");
this.chkCopyItemACL.Name = "chkCopyItemACL";
this.chkCopyItemACL.UseVisualStyleBackColor = true;
manager.ApplyResources(this.chkSkipEmptyFolders, "chkSkipEmptyFolders");
this.chkSkipEmptyFolders.Name = "chkSkipEmptyFolders";
this.chkSkipEmptyFolders.UseVisualStyleBackColor = true;
this.AutoComplete.SetAutoComplete(this.cmbCopyTo, true);
this.tlpBack.SetColumnSpan(this.cmbCopyTo, 2);
manager.ApplyResources(this.cmbCopyTo, "cmbCopyTo");
this.cmbCopyTo.Name = "cmbCopyTo";
this.Validator.SetValidateOn(this.cmbCopyTo, ValidateOn.TextChangedTimer);
this.cmbCopyTo.Validating += new CancelEventHandler(this.cmbCopyTo_Validating);
this.cmbCopyTo.SelectionChangeCommitted += new EventHandler(this.cmbCopyTo_TextUpdate);
this.cmbCopyTo.TextUpdate += new EventHandler(this.cmbCopyTo_TextUpdate);
manager.ApplyResources(this.chkCheckFreeSpace, "chkCheckFreeSpace");
this.chkCheckFreeSpace.Checked = true;
this.chkCheckFreeSpace.CheckState = CheckState.Checked;
this.chkCheckFreeSpace.Name = "chkCheckFreeSpace";
this.chkCheckFreeSpace.UseVisualStyleBackColor = true;
manager.ApplyResources(this.chkCopyItemTime, "chkCopyItemTime");
this.chkCopyItemTime.Checked = true;
this.chkCopyItemTime.CheckState = CheckState.Checked;
this.chkCopyItemTime.Name = "chkCopyItemTime";
this.chkCopyItemTime.UseVisualStyleBackColor = true;
manager.ApplyResources(this.lblMode, "lblMode");
this.lblMode.Name = "lblMode";
manager.ApplyResources(this.cmbMode, "cmbMode");
this.cmbMode.DropDownStyle = ComboBoxStyle.DropDownList;
this.cmbMode.Items.AddRange(new object[] { manager.GetString("cmbMode.Items"), manager.GetString("cmbMode.Items1"), manager.GetString("cmbMode.Items2"), manager.GetString("cmbMode.Items3"), manager.GetString("cmbMode.Items4") });
this.cmbMode.MinimumSize = new Size(0xca, 0);
this.cmbMode.Name = "cmbMode";
//.........这里部分代码省略.........
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:101,代码来源:FileSystemCopyDialog.cs
示例18: BindOrganizeComBox
/// <summary>
/// 获取公司组织信息并绑定
/// </summary>
/// <param name="cmb"></param>
/// <param name="companyId"></param>
/// <param name="typename"></param>
public static void BindOrganizeComBox(ComboBoxEx cmb, string companyId, string typename)
{
List<ListItem> list = new List<ListItem>();
list.Add(new ListItem("", typename));
string sqlWhere = string.Format(" status='1' and enable_flag='1' and com_id='{0}'", companyId);
DataTable dt_Org = DBHelper.GetTable("查询公司信息", GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, "tb_organization", "org_id,org_name", sqlWhere, "", " order by create_time ");
if (dt_Org != null && dt_Org.Rows.Count > 0)
{
foreach (DataRow dr in dt_Org.Rows)
{
list.Add(new ListItem(dr["org_id"].ToString(), dr["org_name"].ToString()));
}
}
cmb.DisplayMember = "Text";
cmb.ValueMember = "Value";
cmb.DataSource = list;
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:25,代码来源:CommonFuncCall.cs
示例19: BindSaleOrderType
/// <summary> 创建人:唐春奎 绑定销售开单类型
/// </summary>
/// <param name="ControlName">控件名称</param>
/// <param name="typename">true:全部, false:请选择</param>
public static void BindSaleOrderType(ComboBoxEx ControlName, bool isShowFrist, string typename)
{
ControlName.DataSource = DataSources.EnumToListByValueString(typeof(DataSources.EnumSaleOrderType), isShowFrist, typename);
ControlName.ValueMember = "Value";
ControlName.DisplayMember = "Text";
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:10,代码来源:CommonFuncCall.cs
示例20: BindCompanyComBox
/// <summary>
/// 获取公司信息并绑定
/// </summary>
/// <param name="cmb"></param>
/// <param name="typename"></param>
public static void BindCompanyComBox(ComboBoxEx cmb, string typename, string com_id)
{
List<ListItem> list = new List<ListItem>();
list.Add(new ListItem("", typename));
string sqlWhere = " status='1' and enable_flag='1'";
if (!string.IsNullOrEmpty(com_id))
{
sqlWhere += " and com_id!='" + com_id + "'";
}
DataTable dt_com = DBHelper.GetTable("查询公司信息", GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, "tb_company", "com_id,com_name", sqlWhere, "", " order by create_time ");
if (dt_com != null && dt_com.Rows.Count > 0)
{
foreach (DataRow dr in dt_com.Rows)
{
list.Add(new ListItem(dr["com_id"].ToString(), dr["com_name"].ToString()));
}
}
cmb.DisplayMember = "Text";
cmb.ValueMember = "Value";
cmb.DataSource = list;
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:28,代码来源:CommonFuncCall.cs
注:本文中的ComboBoxEx类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论