Beispiel #1
0
        public DateTime SelectDate(DateTime date, object widget)
        {
            CalendarDialog dialog = new CalendarDialog(date);

            dialog.TransientFor = (widget as Widget).Toplevel as Gtk.Window;
            dialog.Run();
            date = dialog.Date;
            dialog.Destroy();
            return(date);
        }
Beispiel #2
0
        public Task <DateTime> SelectDate(DateTime date, object widget)
        {
            CalendarDialog dialog = new CalendarDialog(date);

            dialog.TransientFor = (widget as Widget).Toplevel as Gtk.Window;
            dialog.Run();
            date = dialog.Date;
            dialog.Destroy();
            var task = AsyncHelpers.Return(date);

            return(task);
        }