Esempio n. 1
0
        /// <summary>
        /// 虚方法获得窗体
        /// </summary>
        /// <param name="p_ClassName">类名</param>
        /// <returns>返回窗体</returns>
        private frmAPBaseUISinEdit GetOpenForm(string p_ClassName)
        {
            frmAPBaseUISinEdit formToShow = new frmAPBaseUISinEdit();

            if (!FrameCommon.UseNewOpenType)
            {
                string namespstr      = System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Namespace;
                string p_ClassNameAll = string.Empty;
                if (p_ClassName.IndexOf(".") != -1)
                {
                    p_ClassNameAll = p_ClassName;
                }
                else
                {
                    p_ClassNameAll = namespstr + "." + p_ClassName;
                }
                Type   TypeToLoad = Type.GetType(p_ClassNameAll);
                object obj        = Activator.CreateInstance(TypeToLoad);
                formToShow = obj as frmAPBaseUISinEdit;
            }
            else
            {
                formToShow = FrameCommon.NavItemClickGetForm(p_ClassName) as frmAPBaseUISinEdit;
            }

            //string namespstr = System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Namespace;
            //Type TypeToLoad = Type.GetType(namespstr + "." + p_ClassName);
            //object obj = Activator.CreateInstance(TypeToLoad);
            //frmAPBaseUISinEdit formToShow = (frmAPBaseUISinEdit)obj;
            return(formToShow);
        }
Esempio n. 2
0
        /// <summary>
        /// 转向目标页
        /// </summary>
        public void NavigateWin(string p_FormClassName, string p_ParentID, FormStatus p_MFormStatus)
        {
            //调用方法一MDIForm.ContextMenuOpenForm(p_FormClassName, this.FormListAID, this.FormListBID, p_ParentID, p_MFormStatus);

            frmAPBaseUISinEdit frm = GetOpenForm(p_FormClassName);

            frm.FormListAID  = this.FormListAID;
            frm.FormListBID  = this.FormListBID;
            frm.RightFormID  = this.FormID;
            frm.HTDataID     = HTDataID;
            frm.HTFormStatus = p_MFormStatus;
            frm.HTParentForm = this;
            //frmBaseHotKey_Leave(this,new EventArgs());
            frm.ShowDialog();
        }