This defines a Date property for Calendar
Note that the setter causes CalendarChange events to be fired public DateTime Date svn path=/trunk/gtk-sharp/; revision=26417
This commit is contained in:
parent
de74ba0bc8
commit
7f1f0ce385
1 changed files with 18 additions and 0 deletions
|
@ -14,3 +14,21 @@ public DateTime GetDate ()
|
|||
return new DateTime ((int) year, (int) month + 1, (int) day);
|
||||
}
|
||||
|
||||
|
||||
// This defines a Date property for Calendar
|
||||
// Note that the setter causes CalendarChange events to be fired
|
||||
public DateTime Date
|
||||
|
||||
{
|
||||
get {
|
||||
return this.GetDate();
|
||||
}
|
||||
set {
|
||||
uint month= (uint) value.Month-1;
|
||||
uint year= (uint) value.Year;
|
||||
uint day = (uint) value.Day;
|
||||
|
||||
SelectMonth(month,year);
|
||||
SelectDay(day);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue