public static MessageBoxResult ShowInputDialog(string Title, string Message, out string Result, string InitialText="") { InputMessageBox imb = new InputMessageBox(); imb.tbMessage.Text = Message; imb.Title = Title; imb.txtText.Text = InitialText; if (imb.ShowDialog() == true) { Result = imb.txtText.Text; return MessageBoxResult.OK; } else { Result = ""; return MessageBoxResult.Cancel; } }
public static MessageBoxResult ShowInputDialog(string Title, string Message, out string Result, string InitialText = "") { InputMessageBox imb = new InputMessageBox(); imb.tbMessage.Text = Message; imb.Title = Title; imb.txtText.Text = InitialText; if (imb.ShowDialog() == true) { Result = imb.txtText.Text; return(MessageBoxResult.OK); } else { Result = ""; return(MessageBoxResult.Cancel); } }