public virtual bool MouseDown(Control c, Point pt, MouseButtons button)
{
// Only interested in left mouse pressing down
if (button == MouseButtons.Left)
{
// Capturing mouse input
_captured = true;
// Ensure the month calendar has the focus
if ((c != null) && (c is KryptonMonthCalendar) && !c.ContainsFocus)
c.Focus();
// Set the selection to be the day clicked
DateTime? clickDay = _months.DayFromPoint(pt, false);
if (clickDay != null)
{
_months.Calendar.SetSelectionRange(clickDay.Value, clickDay.Value);
_months.FocusDay = clickDay.Value;
_months.AnchorDay = clickDay.Value;
_selectionStart = _months.Calendar.SelectionStart;
_needPaint(_months, new NeedLayoutEventArgs(true));
}
else
_selectionStart = DateTime.MinValue;
}
return _captured;
}