ComboBox String []&图片框

时间:2014-07-15 10:38:48

标签: c# combobox

我是C#语言的新手程序员,我正试图从我的动态库中读取文件

 string[] columns;



ComboBoxItemCollection coll = comboBoxEdit2.Properties.Items;
            coll.BeginUpdate();
            try
            {
                Assembly assembly = Assembly.LoadFile(Application.StartupPath + "/MyLists.dll");
                System.Resources.ResourceManager resourcemanager = new System.Resources.ResourceManager("ClassLibrary1.Properties.Resources", assembly);

                string[] strArrays15 = resourcemanager.GetString("JobList").Split('\n');

                for (int row = 0; row < strArrays15.Length; row++)
                {
                    columns = strArrays15[row].Split('\t');
                    //  comboBoxEdit2.Items.Add(columns[1]);
                    coll.Add(columns[1]);

                }
                return;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

ComboBox将仅显示Empoyee单元格 我希望在更改员工图片更改

时制作
 pictureEdit3.Image = new Bitmap(Application.StartupPath + "/jpg/" + columns[2].ToString() + ".jpg");

不工作......只为所有人展示一张照片..不知道为什么

文件的结构如下(仅举例):

500 Employee1 picture1
501 Employee2 picture2
502 Employee3 picture3
503 Employee4 picture4
504 Employee5 picture5

0 个答案:

没有答案