예제 #1
0
        public MessageBox Alert(string title, string msg, MessageBoxButtonsConfig buttonsConfig)
        {
            MessageBoxConfig config = new MessageBoxConfig();

            config.Title   = title;
            config.Message = msg;
            config.Buttons = Button.OK;
            config.MessageBoxButtonsConfig = buttonsConfig;

            return(this.Configure(config));
        }
        /// <summary>
        /// Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).
        /// </summary>
        /// <param name="title">The title bar text</param>
        /// <param name="msg">The message box body text</param>
        /// <param name="buttonsConfig">A MessageBoxButtonsConfig object for configuring the Text value and JavaScript Handler for each MessageBox Button.</param>
        public MessageBox Confirm(string title, string msg, MessageBoxButtonsConfig buttonsConfig)
        {
            MessageBoxConfig config = new MessageBoxConfig();

            config.Title   = title;
            config.Message = msg;
            config.Buttons = Button.YESNO;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.Icon = Icon.QUESTION;

            return(this.Configure(config));
        }
예제 #3
0
        /// <summary>
        /// Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
        /// </summary>
        /// <param name="title">The title bar text</param>
        /// <param name="msg">The message box body text</param>
        /// <param name="buttonsConfig">A MessageBoxButtonsConfig object for configuring the Text value and JavaScript Handler for each MessageBox Button.</param>
        public MessageBox Prompt(string title, string msg, MessageBoxButtonsConfig buttonsConfig)
        {
            MessageBoxConfig config = new MessageBoxConfig();

            config.Title   = title;
            config.Message = msg;
            config.Buttons = Button.OKCANCEL;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.MinWidth = Unit.Pixel(250);
            config.Prompt   = true;

            return(this.Configure(config));
        }
예제 #4
0
        /// <summary>
        /// Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
        /// </summary>
        /// <param name="title">The title bar text</param>
        /// <param name="msg">The message box body text</param>
        /// <param name="buttonsConfig">A MessageBoxButtonsConfig object for configuring the Text value and JavaScript Handler for each MessageBox Button.</param>
        /// <param name="scope">(optional) The scope of the callback function</param>
        /// <param name="multiline">(optional) True to create a multiline textbox using the defaultTextHeight property, or the height in pixels to create the textbox (defaults to false / single-line)</param>
        /// <param name="value">(optional) Default value of the text input element (defaults to '')</param>
        public MessageBox Prompt(string title, string msg, MessageBoxButtonsConfig buttonsConfig, string scope, Unit multiline, string value)
        {
            MessageBoxConfig config = new MessageBoxConfig();

            config.Title   = title;
            config.Message = msg;
            config.Buttons = Button.OKCANCEL;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.MinWidth        = Unit.Pixel(250);
            config.Scope           = scope;
            config.Prompt          = true;
            config.MultilineHeight = multiline;
            config.Value           = value;

            return(this.Configure(config));
        }
예제 #5
0
        /// <summary>
        /// Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).
        /// </summary>
        /// <param name="title">The title bar text</param>
        /// <param name="msg">The message box body text</param>
        /// <param name="buttonsConfig">A MessageBoxButtonsConfig object for configuring the Text value and JavaScript Handler for each MessageBox Button.</param>
        /// <param name="scope">(optional) The scope of the callback function</param>
        public MessageBox Confirm(string title, string msg, MessageBoxButtonsConfig buttonsConfig, string scope)
        {
            MessageBoxConfig config = new MessageBoxConfig();
            config.Title = title;
            config.Message = msg;
            config.Buttons = Button.YESNO;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.Scope = scope;
            config.Icon = Icon.QUESTION;

            return this.Configure(config);
        }
        /// <summary>
        /// Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
        /// </summary>
        /// <param name="title">The title bar text</param>
        /// <param name="msg">The message box body text</param>
        /// <param name="buttonsConfig">A MessageBoxButtonsConfig object for configuring the Text value and JavaScript Handler for each MessageBox Button.</param>
        /// <param name="scope">(optional) The scope of the callback function</param>
        /// <param name="multiline">(optional) True to create a multiline textbox using the defaultTextHeight property, or the height in pixels to create the textbox (defaults to false / single-line)</param>
        /// <param name="value">(optional) Default value of the text input element (defaults to '')</param>
        public MessageBox Prompt(string title, string msg, MessageBoxButtonsConfig buttonsConfig, string scope, Unit multiline, string value)
        {
            MessageBoxConfig config = new MessageBoxConfig();
            config.Title = title;
            config.Message = msg;
            config.Buttons = Button.OKCANCEL;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.MinWidth = Unit.Pixel(250);
            config.Scope = scope;
            config.Prompt = true;
            config.MultilineHeight = multiline;
            config.Value = value;

            return this.Configure(config);
        }
        /// <summary>
        /// Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
        /// </summary>
        /// <param name="title">The title bar text</param>
        /// <param name="msg">The message box body text</param>
        /// <param name="buttonsConfig">A MessageBoxButtonsConfig object for configuring the Text value and JavaScript Handler for each MessageBox Button.</param>
        public MessageBox Prompt(string title, string msg, MessageBoxButtonsConfig buttonsConfig)
        {
            MessageBoxConfig config = new MessageBoxConfig();
            config.Title = title;
            config.Message = msg;
            config.Buttons = Button.OKCANCEL;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.MinWidth = Unit.Pixel(250);
            config.Prompt = true;

            return this.Configure(config);
        }
예제 #8
0
        public MessageBox Alert(string title, string msg, MessageBoxButtonsConfig buttonsConfig, string scope)
        {
            MessageBoxConfig config = new MessageBoxConfig();
            config.Title = title;
            config.Message = msg;
            config.Buttons = Button.OK;
            config.MessageBoxButtonsConfig = buttonsConfig;
            config.Scope = scope;

            return this.Configure(config);
        }