Inheritance: System.Windows.Forms.Form
        /// <summary>
        /// Show input dialog box
        /// </summary>
        /// <param name="title">Title</param>
        /// <param name="message">Message</param>
        /// <returns></returns>
        public static DialogResult ShowDiaLog(string title, string message)
        {
            frmDialogBox f = new frmDialogBox(title, message);
            f.Title = title;
            f.IsNumberOnly = false;
            f.ShowDialog();

            //Lưu nội dung vừa nhập
            InputBox.Message = f.Content;

            return f.DialogResult;
        }
Example #2
0
        /// <summary>
        /// Show input dialog box
        /// </summary>
        /// <param name="title">Title</param>
        /// <param name="message">Message</param>
        /// <returns></returns>
        public static DialogResult ShowDiaLog(string title, string message)
        {
            frmDialogBox f = new frmDialogBox(title, message);

            f.Title        = title;
            f.IsNumberOnly = false;
            f.ShowDialog();

            //Lưu nội dung vừa nhập
            InputBox.Message = f.Content;

            return(f.DialogResult);
        }
Example #3
0
        /// <summary>
        /// Show input dialog box
        /// </summary>
        /// <param name="title">Title</param>
        /// <param name="message">Message</param>
        /// <param name="defaultValue">Default value</param>
        /// <param name="isNumberOnly">Number input</param>
        /// <returns></returns>
        public static DialogResult ShowDiaLog(string title, string message, string defaultValue, bool isNumberOnly)
        {
            frmDialogBox f = new frmDialogBox(title, message);
            f.Title = title;
            f.IsNumberOnly = isNumberOnly;
            f.Content = defaultValue;

            if (f.ShowDialog() == DialogResult.OK)
            {
                //Save input data
                InputBox.Message = f.Content;
            }

            return f.DialogResult;
        }
Example #4
0
        /// <summary>
        /// Show input dialog box
        /// </summary>
        /// <param name="title">Title</param>
        /// <param name="message">Message</param>
        /// <param name="defaultValue">Default value</param>
        /// <param name="isNumberOnly">Number input</param>
        /// <returns></returns>
        public static DialogResult ShowDiaLog(string title, string message, string defaultValue, bool isNumberOnly)
        {
            frmDialogBox f = new frmDialogBox(title, message);

            f.Title        = title;
            f.IsNumberOnly = isNumberOnly;
            f.Content      = defaultValue;

            if (f.ShowDialog() == DialogResult.OK)
            {
                //Save input data
                InputBox.Message = f.Content;
            }

            return(f.DialogResult);
        }