public static bool QueryText(object owner, string caption, string prompt, ref string value) { bool result = false; using (var inputBox = new GKInputBox(caption, prompt, value, NumbersMode.nmNone)) { if (inputBox.ShowDialog() == DialogResult.OK) { value = inputBox.Value.Trim(); result = true; } } return(result); }
public static bool QueryInt(string caption, string prompt, out int value) { bool result = false; value = 0; using (var inputBox = new GKInputBox(caption, prompt, value.ToString(), NumbersMode.nmInt)) { if (inputBox.ShowDialog() == DialogResult.OK) { result = int.TryParse(inputBox.Value, out value); } } return(result); }