通过双击listview中的项目来打开新窗体,有点像组策略中的双击一条策略,然后弹出相应的窗体,修改策略
2008-04-29 15:38 Virus-BeautyCode 阅读(1103) 评论(0) 编辑 收藏 举报private void listView1_DoubleClick(object sender, EventArgs e)
{
//MessageBox.Show(listView1.SelectedItems[0].SubItems[2].Text);
//Type type = Type.GetType("ManagedCenterSystem." + "frmPolicyItems1");
Type type = Type.GetType("ManagedCenterSystem." + listView1.SelectedItems[0].SubItems[2].Text);
object obj = Activator.CreateInstance(type);
Form form = (Form)obj;
form.ShowDialog();
}