コード例 #1
0
 public static string ShowDialog(string message, string formCaption, string text)
 {
     var dlg = new EditBoxWindow();
     dlg.Title = formCaption;
     dlg.lblMessage.Text = message;
     dlg.txtText.Text = text;
     dlg.txtText.Focus();
     dlg.txtText.SelectAll();
     dlg.ShowDialog();
     if (dlg.isOKPressed)
         return dlg.txtText.Text;
     else
         return null;
 }
コード例 #2
0
        public static string ShowDialog(string message, string formCaption, string text)
        {
            var dlg = new EditBoxWindow();

            dlg.Title           = formCaption;
            dlg.lblMessage.Text = message;
            dlg.txtText.Text    = text;
            dlg.txtText.Focus();
            dlg.txtText.SelectAll();
            dlg.ShowDialog();
            if (dlg.isOKPressed)
            {
                return(dlg.txtText.Text);
            }
            else
            {
                return(null);
            }
        }