예제 #1
0
파일: BaseForm.cs 프로젝트: viticm/pap2
        public static BaseDialog ShowModelInDialog_Static(string modelName)
        {
            if (staticDialogs[modelName] == null)
            {
                staticDialogs[modelName] = new BaseDialog(modelName);
                (staticDialogs[modelName] as BaseDialog).useHideMode = true;
            }

            DialogResult result = (staticDialogs[modelName] as BaseDialog).ShowDialog();
            if (result == DialogResult.OK)
            {
                return staticDialogs[modelName] as BaseDialog;
            }
            else
            {
                return null;
            }
        }
예제 #2
0
파일: BaseForm.cs 프로젝트: viticm/pap2
 /// <summary>
 /// 获取BaseForm对话框
 /// </summary>
 /// <param name="modelName">模块名称</param>
 /// <returns>BaseForm对话框</returns>
 public BaseDialog ShowModelInDialog(string modelName)
 {
     m_Dialog = new BaseDialog(modelName);
     DialogResult result = m_Dialog.ShowDialog();
     if(result == DialogResult.OK)
     {
         return m_Dialog;
     }
     else
     {
         return null;
     }
 }