Exemplo n.º 1
0
 public static bool CommandDialogOneStringOneParam(
     string Prompt,
     string FirstBoxName,
     ref string FirstDataInOut,
     string SecondBoxName,
     ref double SecondDataInOut)
 {
     using (CmdDlgTwoParams dialog = new CmdDlgTwoParams(
                Prompt,
                FirstBoxName,
                FirstDataInOut,
                Options.Wide,
                SecondBoxName,
                SecondDataInOut.ToString("G12"),
                Options.None))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             FirstDataInOut = dialog.Value1;
             double v;
             if (Double.TryParse(dialog.Value2, out v))
             {
                 SecondDataInOut = v;
             }
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 public static bool CommandDialogTwoStrings(
     string Prompt,
     string FirstBoxName,
     ref string FirstDataInOut,
     string SecondBoxName,
     ref string SecondDataInOut)
 {
     using (CmdDlgTwoParams dialog = new CmdDlgTwoParams(
                Prompt,
                FirstBoxName,
                FirstDataInOut,
                Options.Wide,
                SecondBoxName,
                SecondDataInOut,
                Options.Wide))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             FirstDataInOut  = dialog.Value1;
             SecondDataInOut = dialog.Value2;
             return(true);
         }
     }
     return(false);
 }