当前位置: 首页>>代码示例>>C#>>正文


C# ComboBoxEx类代码示例

本文整理汇总了C#中ComboBoxEx的典型用法代码示例。如果您正苦于以下问题:C# ComboBoxEx类的具体用法?C# ComboBoxEx怎么用?C# ComboBoxEx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ComboBoxEx类属于命名空间,在下文中一共展示了ComboBoxEx类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的ComboBoxEx类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。