コード例 #1
0
        /// <summary>
        /// Create a new database and prompt the user for a name.
        /// </summary>
        public void CreateDatabase()
        {
            var dialog = new InputDialogBox()
            {
                Title       = "New Database",
                Description = "Enter a name for the new database."
            };
            var result = dialog.ShowDialog();

            if (result.HasValue == false || result.Value == false)
            {
                return;
            }

            CreateDatabase(dialog.Value);
        }
コード例 #2
0
        public static InputDialogBox Show(string title, string description, string default_value, Action <string> success)
        {
            var dialog = new InputDialogBox()
            {
                Title       = title,
                Description = description,
                Value       = default_value
            };

            dialog._TxtValue.SelectAll();
            var result = dialog.ShowDialog();

            if (result.HasValue == true && result.Value != false)
            {
                success(dialog.Value);
            }

            return(dialog);
        }