Exemple #1
0
        //显示InputBox
        public static string ShowInputBox(string Title, string keyInfo)
        {
            InputQuery inputbox = new InputQuery();

            inputbox.Text = Title;
            if (keyInfo.Trim() != string.Empty)
            {
                inputbox.lblInfo.Text = keyInfo;
            }
            inputbox.ShowDialog();

            return(inputbox.txtData.Text);
        }
Exemple #2
0
        //密文显示
        public static string ShowInputBox(string Title, string keyInfo, char passwordchar)
        {
            InputQuery inputbox = new InputQuery();

            inputbox.Text = Title;
            if (keyInfo.Trim() != string.Empty)
            {
                inputbox.lblInfo.Text = keyInfo;
            }
            if (!string.IsNullOrEmpty(passwordchar.ToString()))
            {
                inputbox.txtData.PasswordChar = passwordchar;
            }
            inputbox.ShowDialog();

            return(inputbox.txtData.Text);
        }