Esempio n. 1
0
        /// <summary>
        /// 显示输入文本对话框
        /// </summary>
        /// <param name="titleMsg">标题</param>
        /// <param name="defaultValue">默认值</param>
        /// <param name="maxLength">文本最大长度</param>
        /// <param name="isPasswordMask">输入文本框是否显示为密码</param>
        /// <returns></returns>
        public static string Show(string titleMsg, string defaultValue, int maxLength, bool isPasswordMask)
        {
            DialogResult retVal;

            MyInputBox myInputBoxDialog = new MyInputBox();

            retVal = myInputBoxDialog.ShowMsg(titleMsg, defaultValue, maxLength, isPasswordMask);
            myInputBoxDialog.Close();

            if (retVal == DialogResult.OK)
            {
                return(myInputBoxDialog.textBoxBase1.Text.Trim());
            }
            else
            {
                return(string.Empty);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 显示输入文本对话框
 /// </summary>
 /// <returns></returns>
 public static new string Show()
 {
     return(MyInputBox.Show("", "", 200, false));
 }
Esempio n. 3
0
 /// <summary>
 /// 显示输入文本对话框
 /// </summary>
 /// <param name="defaultValue">默认值</param>
 /// <returns></returns>
 public static string Show(string defaultValue)
 {
     return(MyInputBox.Show("请输入文本", defaultValue, 200, false));
 }
Esempio n. 4
0
 /// <summary>
 /// 显示输入文本对话框
 /// </summary>
 /// <param name="titleMsg">标题</param>
 /// <param name="defaultValue">默认值</param>
 /// <returns></returns>
 public static string Show(string titleMsg, string defaultValue)
 {
     return(MyInputBox.Show(titleMsg, defaultValue, 200, false));
 }