Exemple #1
0
 public static System.Windows.Forms.DialogResult ShowEditBox(string title, string message, string defaultText, bool multiline, out string text)
 {
     text = String.Empty;
     System.Windows.Forms.DialogResult rc;
     if (multiline)
     {
         EditBoxForm dlg = new EditBoxForm(title, message, defaultText);
         rc = dlg.ShowDialog(RhinoApp.MainWindow());
         if (rc == System.Windows.Forms.DialogResult.OK)
         {
             text = dlg.GetText();
         }
     }
     else
     {
         StringBoxForm dlg = new StringBoxForm(title, message, defaultText);
         rc = dlg.ShowDialog(RhinoApp.MainWindow());
         if (rc == System.Windows.Forms.DialogResult.OK)
         {
             text = dlg.GetText();
         }
     }
     return(rc);
 }
Exemple #2
0
 public static System.Windows.Forms.DialogResult ShowEditBox(string title, string message, string defaultText, bool multiline, out string text)
 {
   text = String.Empty;
   System.Windows.Forms.DialogResult rc;
   if (multiline)
   {
     EditBoxForm dlg = new EditBoxForm(title, message, defaultText);
     rc = dlg.ShowDialog(RhinoApp.MainWindow());
     if (rc == System.Windows.Forms.DialogResult.OK)
       text = dlg.GetText();
   }
   else
   {
     StringBoxForm dlg = new StringBoxForm(title, message, defaultText);
     rc = dlg.ShowDialog(RhinoApp.MainWindow());
     if (rc == System.Windows.Forms.DialogResult.OK)
       text = dlg.GetText();
   }
   return rc;
 }