2003-03-25 00:47:13 +00:00
|
|
|
// Gtk.Calendar.Custom - Gtk Calendar class customizations
|
|
|
|
//
|
|
|
|
// Author:
|
|
|
|
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
|
|
|
|
//
|
|
|
|
// (c) 2003 Ximian, Inc. (http://www.ximian.com)
|
|
|
|
//
|
|
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
|
|
|
|
public DateTime GetDate ()
|
|
|
|
{
|
|
|
|
uint year, month, day;
|
|
|
|
GetDate (out year, out month, out day);
|
|
|
|
return new DateTime ((int) year, (int) month + 1, (int) day);
|
|
|
|
}
|
|
|
|
|
2004-04-30 13:27:22 +00:00
|
|
|
|
|
|
|
// 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);
|
|
|
|
}
|
|
|
|
}
|