예제 #1
0
 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;
     }
 }
예제 #2
0
        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);
            }
        }