Beispiel #1
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            //★需要调用的窗口类
            switch (_functionName)
            {
            case "Fun_ts_yp_pdlr":                                                              //★自定义调用函数名,定义的函数名必须与GetFunctionsInfo方法内的ObjectInfo.Name一致
            case "Fun_ts_yp_pdlr_yf":
                Frmtitle Frmtitle = new Frmtitle(_menuTag, _chineseName, _mdiParent);
                if (_mdiParent != null)
                {
                    Frmtitle.MdiParent = _mdiParent;
                }
                Frmtitle.Show();
                break;

            case "Fun_ts_yp_pdlr_sczcb":                                                //★自定义调用函数名,定义的函数名必须与GetFunctionsInfo方法内的ObjectInfo.Name一致
            case "Fun_ts_yp_pdlr_sczcb_yf":
                Frmxd Frmxd = new Frmxd(_menuTag, _chineseName, _mdiParent);
                //if (_mdiParent != null)
                //{
                //    Frmxd.MdiParent = _mdiParent;
                //}
                Frmxd.Show();
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
        }
Beispiel #2
0
 private void butnew_Click(object sender, System.EventArgs e)
 {
     try
     {
         this.Cursor = TrasenClasses.GeneralClasses.PubStaticFun.WaitCursor();
         Frmxd f = new Frmxd(_menuTag, _chineseName, _mdiParent);
         f.ShowDialog(this);
         //f.bpcgl = bpcgl;
     }
     catch (System.Exception err)
     {
         MessageBox.Show(err.Message);
     }
     finally
     {
         this.Cursor = Cursors.Arrow;
     }
 }