예제 #1
0
            /// <summary>
            ///   Raises the <see cref="E:System.Windows.Forms.MonthCalendar.DateSelected" /> event.
            /// </summary>
            /// <param name="drevent"> A <see cref="T:System.Windows.Forms.DateRangeEventArgs" /> that contains the event data. </param>
            protected override void OnDateSelected(DateRangeEventArgs drevent)
            {
                base.OnDateSelected(drevent);
                var eventArgs = new CustomCalendarEventArgs(drevent.Start);

                CustomCalendarEvent(this, eventArgs);
                Dispose();
            }
예제 #2
0
 private void OnCustomCalendarEvent(object sender, CustomCalendarEventArgs eventArgs)
 {
     _maskedTextBox.Text = eventArgs.SelectedDate;
     Controls.Remove(_customCalendar);
     _customCalendar = null;
 }
예제 #3
0
 /// <summary>
 ///   Raises the <see cref="E:System.Windows.Forms.MonthCalendar.DateSelected" /> event.
 /// </summary>
 /// <param name="drevent"> A <see cref="T:System.Windows.Forms.DateRangeEventArgs" /> that contains the event data. </param>
 protected override void OnDateSelected(DateRangeEventArgs drevent)
 {
     base.OnDateSelected(drevent);
     var eventArgs = new CustomCalendarEventArgs(drevent.Start);
     CustomCalendarEvent(this, eventArgs);
     Dispose();
 }
예제 #4
0
 private void OnCustomCalendarEvent(object sender, CustomCalendarEventArgs eventArgs)
 {
     _maskedTextBox.Text = eventArgs.SelectedDate;
     Controls.Remove(_customCalendar);
     _customCalendar = null;
 }