コード例 #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;
     }
 }