示例#1
0
 public Form ShowDialogForm(string typeName, string title, int menuid)
 {
     try
     {
         Type t = Type.GetType(typeName);
         form        = t.Assembly.CreateInstance(t.FullName) as BasicForm;
         form.MenuId = menuid;
         form.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     return(form);
 }
示例#2
0
        public Form Run(string typeName, string title, int menuid)
        {
            //C1form d = null;
            try
            {
                Control.ControlCollection items = basePanel.Controls;
                Type t = Type.GetType(typeName);

                form        = t.Assembly.CreateInstance(t.FullName) as BasicForm;
                form.MenuId = menuid;
                form.DisplayIn(items);
                if (!form.Visible)
                {
                    this.Visible = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            return(form);
        }