Exemplo n.º 1
0
 public static int ShowInputDialog(Form parent, string title, string message)
 {
     if (dialog == null)
     {
         dialog = new NumericInputDialog();
     }
     dialog.Text           = (title.Length > 0)? title : dialog.Text;
     dialog.lbMessage.Text = message;
     if (dialog.ShowDialog(parent) == DialogResult.OK)
     {
         return((int)dialog.time.Value);
     }
     throw new DialogCancelResultException("The user cancelled the operation");
 }