89 |
this.ResumeLayout(); |
this.ResumeLayout(); |
90 |
} |
} |
91 |
|
|
92 |
|
[TODO] |
93 |
public void SetCalendarDimensions(int x, int y) |
public void SetCalendarDimensions(int x, int y) |
94 |
{ |
{ |
95 |
// TODO: try to maintain x:y ratio |
// Fix: try to maintain x:y ratio |
96 |
if(x*y > 12) |
if(x*y > 12) |
97 |
{ |
{ |
98 |
x=3; |
x=3; |
108 |
SetSelectionInternal(date, date, -1, false); |
SetSelectionInternal(date, date, -1, false); |
109 |
} |
} |
110 |
|
|
111 |
|
[TODO] |
112 |
internal void SetSelectionInternal(DateTime start, DateTime end, int index, bool all) |
internal void SetSelectionInternal(DateTime start, DateTime end, int index, bool all) |
113 |
{ |
{ |
114 |
bool changed = (selectionStart != start || selectionEnd != end); |
bool changed = (selectionStart != start || selectionEnd != end); |
116 |
selectionStart=start; |
selectionStart=start; |
117 |
selectionEnd=end; |
selectionEnd=end; |
118 |
|
|
119 |
//TODO: implement proper invalidate for modified cals only |
// Fix: implement proper invalidate for modified cals only |
120 |
if(changed && (all || index==-1)) |
if(changed && (all || index==-1)) |
121 |
{ |
{ |
122 |
foreach(Control c in Controls) |
foreach(Control c in Controls) |
401 |
return false; |
return false; |
402 |
} |
} |
403 |
|
|
404 |
//TODO: move this into theming API |
[TODO] |
405 |
|
// Fix: move this into theming API |
406 |
private void DrawMonth(Graphics g, DateTime monthDate, CalendarFlags flags) |
private void DrawMonth(Graphics g, DateTime monthDate, CalendarFlags flags) |
407 |
{ |
{ |
408 |
UpdateRects(new Point(0,0), monthDate); |
UpdateRects(new Point(0,0), monthDate); |
625 |
return result; |
return result; |
626 |
} |
} |
627 |
|
|
628 |
|
[TODO] |
629 |
protected override void OnMouseDown(MouseEventArgs e) |
protected override void OnMouseDown(MouseEventArgs e) |
630 |
{ |
{ |
631 |
Point p = new Point(e.X, e.Y); |
Point p = new Point(e.X, e.Y); |
633 |
Size parentDims = parent.calendarDims; |
Size parentDims = parent.calendarDims; |
634 |
int nextPage = parentDims.Width*parentDims.Height; |
int nextPage = parentDims.Width*parentDims.Height; |
635 |
|
|
636 |
// TODO : Handle long clicks with a timer like ScrollBar does |
// Fix: Handle long clicks with a timer like ScrollBar does |
637 |
if(prevBtnRect.Contains(p)) |
if(prevBtnRect.Contains(p)) |
638 |
{ |
{ |
639 |
parent.SetDate(GetNewMonthView(parent.selectionStart,-nextPage)); |
parent.SetDate(GetNewMonthView(parent.selectionStart,-nextPage)); |