/// <summary> /// The prompt. /// </summary> /// <param name="question"> /// The question. /// </param> /// <param name="title"> /// The title. /// </param> /// <param name="defaultValue"> /// The default value. /// </param> /// <param name="inputType"> /// The input type. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> public static string Prompt(string question, string title, string defaultValue = "", InputType inputType = InputType.TEXT) { var inst = new PromptUserData(question, title, defaultValue, inputType); inst.ShowDialog(); if (inst.DialogResult == true) { return(inst.ResponseText); } return(null); }
/// <summary> /// The prompt. /// </summary> /// <param name="question"> /// The question. /// </param> /// <param name="title"> /// The title. /// </param> /// <param name="defaultValue"> /// The default value. /// </param> /// <param name="inputType"> /// The input type. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> public static string Prompt(string question, string title, string defaultValue = "", InputType inputType = InputType.TEXT) { var inst = new PromptUserData(question, title, defaultValue, inputType); inst.ShowDialog(); if (inst.DialogResult == true) { return inst.ResponseText; } return null; }