public static TimePickerFragment NewInstance(Action <Time> onDateSelected, DateTime defaultDate) { TimePickerFragment frag = new TimePickerFragment(); frag._dateSelectedHandler = onDateSelected; return(frag); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddTimeFloatingActionButton_Click(object sender, EventArgs e) { if (App.Locator.ModeDailyTrack.TimePickerList == null) { App.Locator.ModeDailyTrack.TimePickerList = new List <Time>(); } //if seekios = freemium : only 1 timer can be added //if seekios = premium : 4 timers can be configured if (App.Locator.ModeDailyTrack.TimePickerList.Count == 0 && MapViewModelBase.Seekios.Subscription_idsubscription == 2 || App.Locator.ModeDailyTrack.TimePickerList.Count < 4 && MapViewModelBase.Seekios.Subscription_idsubscription == 1) { TimePickerFragment frag = TimePickerFragment.NewInstance(delegate(Time time) { //add timers if they do not already exist if (!App.Locator.ModeDailyTrack.TimePickerList.Contains(time)) { App.Locator.ModeDailyTrack.TimePickerList.Add(time); } UpdateUI(); }, DateTime.Now); frag.Show(FragmentManager, TimePickerFragment.TAG); } }