Exemple #1
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            switch (_functionName)
            {
            case "Fun_ts_GroupManage":
                FrmDocGroup FrmAvtion = new FrmDocGroup();
                if (_mdiParent != null)
                {
                    FrmAvtion.MdiParent = _mdiParent;
                }
                FrmAvtion.WindowState = FormWindowState.Maximized;

                FrmAvtion.Show();
                break;

            case "Fun_ts_DocGroupManage":
                FrmDocGroupList FrmAvtion2 = new FrmDocGroupList();
                if (_mdiParent != null)
                {
                    FrmAvtion2.MdiParent = _mdiParent;
                }
                FrmAvtion2.WindowState = FormWindowState.Maximized;
                FrmAvtion2.Show();
                break;

            case "Fun_ts_ZFFSWH":
                FrmZffl FrmAvtion3 = new FrmZffl();

                if (_mdiParent != null)
                {
                    FrmAvtion3.MdiParent = _mdiParent;
                }
                FrmAvtion3.WindowState = FormWindowState.Maximized;
                FrmAvtion3.Show();
                break;

            default:
                throw new Exception("引出函数名错误!");
            }
        }
Exemple #2
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }

            switch (_functionName)
            {
            case "Fun_ts_GroupManage":
                FrmDocGroup FrmAvtion = new FrmDocGroup();

                if (_mdiParent != null)
                {
                    FrmAvtion.MdiParent = _mdiParent;
                }
                return(FrmAvtion);

            case "Fun_ts_DocGroupManage":
                FrmDocGroupList FrmAvtion2 = new FrmDocGroupList();

                if (_mdiParent != null)
                {
                    FrmAvtion2.MdiParent = _mdiParent;
                }
                return(FrmAvtion2);

            case "Fun_ts_ZFFSWH":
                FrmZffl FrmAvtion3 = new FrmZffl();

                if (_mdiParent != null)
                {
                    FrmAvtion3.MdiParent = _mdiParent;
                }
                return(FrmAvtion3);

            default:
                throw new Exception("引出函数名称错误!");
            }
        }