예제 #1
0
 private void labSet_Click(object sender, EventArgs e)
 {
     frmModule frm = new frmModule();
     frm.ShowDialog();
     CreateMenu();
 }
예제 #2
0
        //激活程序
         private void listView1_ItemActivate(object sender, EventArgs e)
        {
            mModule mdule = listView1.FocusedItem.Tag as mModule;
            //显示上部位置名称
            if (secondmenu=="")
            {
                labshow.Text = ">>" + nbctSystem.ActiveGroup.Caption + "->" + mdule.ModuName;
            }
            else
            {
                labshow.Text = ">>" + nbctSystem.ActiveGroup.Caption +"->"+ secondmenu+"->" + mdule.ModuName;
            }
            
            //显示下部说明
            labbuttom.Text = mdule.IsCores;
            if (mdule.ModuName.Contains("模块管理"))
            {
                frmModule frm = new frmModule();
                frm.ShowDialog();
                CreateMenu();
                return;
            }
            if (mdule == null || string.IsNullOrEmpty(mdule.ModuTypes))
                return;

            string exe = mdule.ModuTypes;
            if (mdule.ModuTypes.ToLower().Contains(".exe")  )
            {             
                System.Diagnostics.Process.Start(Application.StartupPath + "\\" + exe);
            }
            else if(mdule.ModuTypes.ToLower().Contains("http"))
	        {
                System.Diagnostics.Process.Start(exe);
	        }
            else
            {
                object instance=null;
                object[] para = new object[1];
                para.SetValue(mdule, 0);
                para = new object[0];
                
                object result = MainHelper.Execute(mdule.AssemblyFileName, mdule.ModuTypes, mdule.MethodName, null,null,ref instance);
                Form form = (Form)instance;
                form.Show();
            }

           
        }