private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (this.comboBox1.SelectedItem != null) { DCM_INFO item = (DCM_INFO)this.comboBox1.SelectedItem; // Create ListViewItems and add them to ListView } }
private void button1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); DialogResult ret = ofd.ShowDialog(); if (ret == System.Windows.Forms.DialogResult.OK) { DCM_INFO tmp = new DCM_INFO(); // read file and fill struct this.comboBox1.Items.Add(tmp); } }