/[dotgnu-pnet]/pnetlib/System.Windows.Forms/MonthCalendar.cs
ViewVC logotype

Diff of /pnetlib/System.Windows.Forms/MonthCalendar.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by neilcawse, Sun Jan 18 23:03:16 2004 UTC revision 1.4 by drobosson, Sun Aug 7 11:52:55 2005 UTC
# Line 89  public class MonthCalendar : Control Line 89  public class MonthCalendar : Control
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;
# Line 107  public class MonthCalendar : Control Line 108  public class MonthCalendar : Control
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);
# Line 114  public class MonthCalendar : Control Line 116  public class MonthCalendar : Control
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)
# Line 399  public class MonthCalendar : Control Line 401  public class MonthCalendar : Control
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);
# Line 622  public class MonthCalendar : Control Line 625  public class MonthCalendar : Control
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);
# Line 629  public class MonthCalendar : Control Line 633  public class MonthCalendar : Control
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));

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26