public static DialogResult Show(out string strText) { string strTemp = string.Empty; InputForm inputDialog = new InputForm(); inputDialog.TextHandler = (str) => { strTemp = str; }; DialogResult result = inputDialog.ShowDialog(); strText = strTemp; return(result); }
public static DialogResult Show(out string strText, string tips, string caption) { string strTemp = string.Empty; InputForm inputDialog = new InputForm(); inputDialog.setTips(tips); inputDialog.setTitle(caption); inputDialog.TextHandler = (str) => { strTemp = str; }; DialogResult result = inputDialog.ShowDialog(); strText = strTemp; return(result); }