Inheritance: System.Windows.Forms.Form
Exemple #1
0
        /// <summary>
        /// A popup calendar date chooser - double click a date or press return to select a date.
        /// </summary>
        /// <param name="start">The initial date in the control, may be "" for today.</param>
        /// <returns>The selected date.</returns>
        public static Primitive Calendar(Primitive start)
        {
            DateTime Start = DateTime.Today;

            try
            {
                if (start != "")
                {
                    Start = DateTime.Parse(start);
                }
            }
            catch (Exception ex)
            {
                Utilities.OnError(Utilities.GetCurrentMethod(), ex);
            }
            FormCalendar _FormCalendar = new FormCalendar(Start);

            _FormCalendar.TopMost = true;
            StartPosition(_FormCalendar, null);
            _FormCalendar.ShowDialog(Utilities.ForegroundHandle());
            return(_FormCalendar.result);
        }
Exemple #2
0
 /// <summary>
 /// A popup calendar date chooser - double click a date or press return to select a date.
 /// </summary>
 /// <param name="start">The initial date in the control, may be "" for today.</param>
 /// <returns>The selected date.</returns>
 public static Primitive Calendar(Primitive start)
 {
     DateTime Start = DateTime.Today;
     try
     {
         if (start != "") Start = DateTime.Parse(start);
     }
     catch (Exception ex)
     {
         Utilities.OnError(Utilities.GetCurrentMethod(), ex);
     }
     FormCalendar _FormCalendar = new FormCalendar(Start);
     _FormCalendar.TopMost = true;
     StartPosition(_FormCalendar, null);
     _FormCalendar.ShowDialog(Utilities.ForegroundHandle());
     return _FormCalendar.result;
 }