Exemplo n.º 1
0
 private void ShowDT(object sender, bool reset)
 {
     if (reset)
     {
         calender         = Calendar.GetInstance(Java.Util.TimeZone.Default);
         baseModel.Year   = calender.Get(CalendarField.Year);
         baseModel.Month  = calender.Get(CalendarField.Month) + 1;
         baseModel.Day    = calender.Get(CalendarField.DayOfMonth);
         baseModel.Hour   = calender.Get(CalendarField.HourOfDay);
         baseModel.Minute = calender.Get(CalendarField.Minute);
     }
     baseModel.CurrentView = false;
     if (sender == datePick)
     {
         datePickerDialog = new DatePickerDialog(this, OnDateShow, baseModel.Year, baseModel.Month - 1, baseModel.Day);
         datePickerDialog.Show();
     }
     else if (sender == timePick)
     {
         timePickerDialog = new TimePickerDialog(this, OnTimeShow, baseModel.Hour, baseModel.Minute, true);
         if (baseModel.TimePickerBundler != null)
         {
             timePickerDialog.OnRestoreInstanceState(baseModel.TimePickerBundler);
         }
         timePickerDialog.Show();
     }
 }