コード例 #1
0
ファイル: Plaster.cs プロジェクト: jonrgroverlib/InfoLib
 public static void Dates(Form form, TextBox txtDateTime, TimeDate_old date, string format)
 {
     if (Scrape.Active(form, txtDateTime))
     {
         txtDateTime.Text = date.ToString(format);
     }
 }
コード例 #2
0
ファイル: Plaster.cs プロジェクト: jonrgroverlib/InfoLib
        // ----------------------------------------------------------------------------------------
        /// <!-- Dates -->
        /// <summary>
        ///      Sets the date field of a control
        /// </summary>
        /// <param name="form">allows no-op if the control is not on the form</param>
        /// <param name="control"></param>
        /// <param name="date"></param>
        public static void Dates(Form form, Control control, TimeDate_old date, TimeDate_old defaultDate, Label nullImage)
        {
            if (Scrape.Active(form, control))
            {
                Type type = control.GetType();
                switch (type.Name.ToString())
                {
                case "DateTimePicker": Dates(form, ((DateTimePicker)control), date, defaultDate, nullImage); break;

                default: control.Text = date.ToString(); break;
                }
            }
        }
コード例 #3
0
ファイル: Plaster.cs プロジェクト: jonrgroverlib/InfoLib
        // ----------------------------------------------------------------------------------------
        /// <!-- Dates -->
        /// <summary>
        ///      Sets the date field of a control
        /// </summary>
        /// <param name="form">allows no-op if the control is not on the form</param>
        /// <param name="control"></param>
        /// <param name="date"></param>
        public static void Dates(Form form, Control control, TimeDate_old date)
        {
            if (Scrape.Active(form, control))
            {
                DateTime clrDate = TimeDate_old.ClrDate(date);
                Type     type    = control.GetType();
                switch (type.Name.ToString())
                {
                case "DateTimePicker": Dates(form, ((DateTimePicker)control), clrDate, new Label()); break;

                default: control.Text = date.ToString(); break;
                }
            }
        }