Пример #1
0
        private void FTestPartAsynWait_Load(object sender, EventArgs e)
        {
            items.Add(new CobITemInfo("yf", 23));
            items.Add(new CobITemInfo("zhn", 31));
            items.Add(new CobITemInfo("tq", 18));
            DropdownBoxHelper.BindingIEnumerableGenericToComboBox <CobITemInfo>(comboBox1, items);
            //DropdownBoxHelper.BindingIEnumerableGenericToComboBox<CobITemInfo>(comboBox1, items, string.Empty);
            //DropdownBoxHelper.BindingIEnumerableGenericToComboBox<CobITemInfo>(comboBox1, t => { return t.Name; }, items);

            //DropdownBoxHelper.BindingIEnumerableGenericToToolStripComboBox<CobITemInfo>(toolStripComboBox1, items, nameof(CobITemInfo.Name));
            //DropdownBoxHelper.BindingIEnumerableGenericToToolStripComboBox<CobITemInfo>(toolStripComboBox1, items);
            DropdownBoxHelper.BindingIEnumerableGenericToToolStripComboBox <CobITemInfo>(toolStripComboBox1, t => { return(t.Name); }, items);
        }