private void CellTapped(CellTappedEventArgs args) { if (args.Appointment != null) { _ = ShowPopup(args.Appointment); } }
private void SfSchedule_ScheduleTappedEvent(object sender, CellTappedEventArgs e) { viewOptionLayout.OptionLayout.Visibility = ViewStates.Invisible; var schedule = (sender as SfSchedule); if ((e.ScheduleAppointment as ScheduleAppointment) != null) { SelectedAppointment = (e.ScheduleAppointment as ScheduleAppointment); indexOfAppointment = schedule.Appointments.IndexOf((e.ScheduleAppointment as ScheduleAppointment)); } else { SelectedAppointment = null; indexOfAppointment = -1; } if (schedule.ScheduleView == ScheduleView.MonthView) { schedule.ScheduleView = ScheduleView.DayView; schedule.MoveToDate = e.Calendar; } else { linearLayout.Visibility = ViewStates.Invisible; editor.EditorLayout.Visibility = ViewStates.Visible; editor.UpdateEditor((e.ScheduleAppointment as ScheduleAppointment), (e.Calendar as Calendar)); } }
private void sfSchedule_ScheduleTapped(object sender, CellTappedEventArgs e) { if (currentSelectedView != null) { currentSelectedView.SetBackgroundColor(Color.ParseColor("#A237B3E6")); } }
void CellTappedEventHandler(object sender, CellTappedEventArgs e) { schedule.IsVisible = false; editorLayout.IsVisible = true; if (schedule.ScheduleView == ScheduleView.MonthView) { //create Apppointment editorLayout.OpenEditor(null, e.Datetime); isNewAppointment = true; } else { if (e.Appointment != null) { ObservableCollection <Meeting> appointment = new ObservableCollection <Meeting>(); appointment = (ObservableCollection <Meeting>)schedule.DataSource; indexOfAppointment = appointment.IndexOf((Meeting)e.Appointment); editorLayout.OpenEditor((Meeting)e.Appointment, e.Datetime); isNewAppointment = false; } else { //create Apppointment editorLayout.OpenEditor(null, e.Datetime); isNewAppointment = true; } } }
void schedule_ScheduleCellTapped(object sender, CellTappedEventArgs args) { var appointment = args.ScheduleAppointment; if (appointment != null) { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.SetTitle("Confirm delete"); alert.SetMessage(appointment.Subject); alert.SetPositiveButton("Delete", async(senderAlert, arg) => { await apiClient.DeleteWorkplaceOrderAsync((int)appointment.RecurrenceId); Toast.MakeText(this, "Deleted!", ToastLength.Short).Show(); Orders.Remove(appointment); schedule.ItemsSource = Orders; SetContentView(schedule); }); alert.SetNegativeButton("Cancel", (senderAlert, arg) => { Toast.MakeText(this, "Cancelled!", ToastLength.Short).Show(); }); Dialog dialog = alert.Create(); dialog.Show(); } }
private void SfSchedule_CellTapped(object sender, CellTappedEventArgs e) { if (sfSchedule.ScheduleView == ScheduleView.MonthView) { sfSchedule.ScheduleView = ScheduleView.DayView; sfSchedule.MoveToDate = e.Calendar; } }
private async void Schedule_CellTapped(object sender, CellTappedEventArgs e) { if (e.Appointments == null || e.Appointments.Count < 1) { return; } await ViewModel.SaveSelectedWorkItemAsync(e.Appointments.First() as WorkScheduleItem); }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { DateTime schedule = e.Datetime; if (schedule != null) { _viewModel.CreateAppointments(schedule); } }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { ScheduleAppointment schedule = e.Appointment as ScheduleAppointment; if (schedule != null) { _viewModel.VisualizeAppointments(schedule.Notes); } }
private async void Schedule_CellDoubleTapped(object sender, CellTappedEventArgs e) { //throw new NotImplementedException(); var workItem = await EditWorkItem(e); int ix = 0; ix++; }
private void Schedule_DoubleTapped(object sender, CellTappedEventArgs e) { //base.didSelectDate (schedule, selectedDate, appointments); ScheduleEditor.Editor.Hidden = false; HeaderView.Hidden = true; Schedule.Hidden = true; IndexOfAppointment = -1; TableView.Hidden = true; if (e.ScheduleAppointment != null) { for (int i = 0; i < (Schedule.ItemsSource as ObservableCollection <ScheduleAppointment>).Count; i++) { if ((Schedule.ItemsSource as ObservableCollection <ScheduleAppointment>)[i] == e.ScheduleAppointment) { IndexOfAppointment = int.Parse(i.ToString()); break; } } SelectedAppointment = e.ScheduleAppointment; ScheduleEditor.LabelSubject.Text = SelectedAppointment.Subject; ScheduleEditor.LabelLocation.Text = SelectedAppointment.Location; String startDate = DateTime.Parse(SelectedAppointment.StartTime.ToString()).ToString(); ScheduleEditor.ButtonStartDate.SetTitle(startDate, UIControlState.Normal); ScheduleEditor.PickerStartDate.SetDate(SelectedAppointment.StartTime, true); String endDate = DateTime.Parse(SelectedAppointment.EndTime.ToString()).ToString(); ScheduleEditor.ButtonEndDate.SetTitle(endDate, UIControlState.Normal); ScheduleEditor.PickerEndDate.SetDate(SelectedAppointment.EndTime, true); ScheduleEditor.AllDaySwitch.On = SelectedAppointment.IsAllDay; if (ScheduleEditor.AllDaySwitch.On) { ScheduleEditor.Disablechild(); } else { ScheduleEditor.EnableChild(); } ScheduleEditor.Editor.EndEditing(true); } else { List <UIColor> colorCollection = new List <UIColor>(); colorCollection.Add(UIColor.FromRGB(0xA2, 0xC1, 0x39)); colorCollection.Add(UIColor.FromRGB(0xD8, 0x00, 0x73)); ScheduleEditor.LabelSubject.Text = "Subject"; ScheduleEditor.LabelLocation.Text = "Location"; String startDate = DateTime.Parse(e.Date.ToString()).ToString(); ScheduleEditor.PickerStartDate.SetDate(e.Date, true); ScheduleEditor.ButtonStartDate.SetTitle(startDate, UIControlState.Normal); String endDate = DateTime.Parse(e.Date.AddSeconds(3600).ToString()).ToString(); ScheduleEditor.PickerEndDate.SetDate(e.Date.AddSeconds(3600), true); ScheduleEditor.ButtonEndDate.SetTitle(endDate, UIControlState.Normal); ScheduleEditor.AllDaySwitch.On = false; this.ScheduleEditor.EnableChild(); } }
private void Schedule_DoubleTapped(object sender, CellTappedEventArgs e) { //base.didSelectDate (schedule, selectedDate, appointments); scheduleEditor.Editor.Hidden = false; headerView.Hidden = true; schedule.Hidden = true; indexOfAppointment = -1; tableView.Hidden = true; if (e.ScheduleAppointment != null) { for (int i = 0; i < (schedule.ItemsSource as ObservableCollection <ScheduleAppointment>).Count; i++) { if ((schedule.ItemsSource as ObservableCollection <ScheduleAppointment>)[i] == e.ScheduleAppointment) { indexOfAppointment = int.Parse(i.ToString()); break; } } selectedAppointment = (e.ScheduleAppointment); scheduleEditor.label_subject.Text = selectedAppointment.Subject; scheduleEditor.label_location.Text = selectedAppointment.Location; String _sDate = DateTime.Parse((selectedAppointment.StartTime.ToString())).ToString(); scheduleEditor.button_startDate.SetTitle(_sDate, UIControlState.Normal); scheduleEditor.picker_startDate.SetDate(selectedAppointment.StartTime, true); String _eDate = DateTime.Parse((selectedAppointment.EndTime.ToString())).ToString(); scheduleEditor.button_endDate.SetTitle(_eDate, UIControlState.Normal); scheduleEditor.picker_endDate.SetDate(selectedAppointment.EndTime, true); scheduleEditor.allDaySwitch.On = selectedAppointment.IsAllDay; if (scheduleEditor.allDaySwitch.On) { scheduleEditor.Disablechild(); } else { scheduleEditor.EnableChild(); } scheduleEditor.Editor.EndEditing(true); } else { List <UIColor> colorCollection = new List <UIColor>(); colorCollection.Add(UIColor.FromRGB(0xA2, 0xC1, 0x39)); colorCollection.Add(UIColor.FromRGB(0xD8, 0x00, 0x73)); scheduleEditor.label_subject.Text = "Subject"; scheduleEditor.label_location.Text = "Location"; String _sDate = DateTime.Parse((e.Date.ToString())).ToString(); scheduleEditor.picker_startDate.SetDate(e.Date, true); scheduleEditor.button_startDate.SetTitle(_sDate, UIControlState.Normal); String _eDate = DateTime.Parse((e.Date.AddSeconds(3600).ToString())).ToString(); scheduleEditor.picker_endDate.SetDate(e.Date.AddSeconds(3600), true); scheduleEditor.button_endDate.SetTitle(_eDate, UIControlState.Normal); scheduleEditor.allDaySwitch.On = false; this.scheduleEditor.EnableChild(); } }
public void ScheduleOnCellTapped(object sender, CellTappedEventArgs e) { if (e.Appointment != null) { var viewModel = new ResourceViewModel(_navigator, $"{NavigationPath}/Resource", _resources.First(r => r.Id == _reservations.First(x => x.Id == ((ScheduleReservation)e.Appointment).ReservationId).ResourceId)); _navigator.NavigateToModal(new UpdateReservationViewModel(_navigator, $"{NavigationPath}/EditReservation", _reservations.FirstOrDefault(r => r.Id == ((ScheduleReservation)e.Appointment).ReservationId), viewModel.Reservations)); } }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { if (schedule.ScheduleView == SFScheduleView.SFScheduleViewMonth) { schedule.ScheduleView = SFScheduleView.SFScheduleViewDay; schedule.MoveToDate(e.Date); schedule.Hidden = false; scheduleEditor.Editor.Hidden = true; headerView.Hidden = false; } }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { var appointment = (e.Appointment as CalendarEvent); if (cal.ScheduleView == ScheduleView.WeekView && appointment != null) { //Push the next page onto the Nav stack, pass it the appointment object CalendarEventDetails newPage = new CalendarEventDetails(appointment, calId); Navigation.PushAsync(newPage); } }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { if (e.Appointment != null) { var appname = (e.Appointment as Meeting).EventName; var City = (e.Appointment as Meeting).City; var District = (e.Appointment as Meeting).District; var noOfStudents = (e.Appointment as Meeting).NumberOfStudents; this.ContentPage.DisplayAlert(appname, "City:" + " " + City + "\n" + "District:" + " " + District + "\n" + "NumberofStudents:" + " " + noOfStudents + "\n", "ok"); } }
private async void CellTappedAsync(object sender, CellTappedEventArgs args) { if (args.Appointment == null) { ViewModel.novoEventoAsync(args.Datetime); } else { //await ViewModel.cancelarEventoAsync(args.Appointment); await ViewModel.cancelarEventoAsync(args.Datetime); } }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { if (schedule.ScheduleView == SFScheduleView.SFScheduleViewMonth) { schedule.ScheduleView = SFScheduleView.SFScheduleViewDay; schedule.MoveToDate(e.Date); schedule.Hidden = false; scheduleEditor.Editor.Hidden = true; headerView.Hidden = false; } // Hiding schedule view picker when it was opened and tapped on schedule tableView.Hidden = true; }
private void CellTapped(CellTappedEventArgs args) { // ShiftPopup popup = new ShiftPopup(); ScheduleAppointment appointment = (ScheduleAppointment)args.Appointment; popup.Show( "role", appointment.StartTime, appointment.EndTime, "some notes" ); // Application.Current.MainPage.Navigation.PushAsync(new ShiftPopup()); }
void Schedule_CellTapped(object sender, CellTappedEventArgs e) { var viewModel = (this.schedule.BindingContext as ViewModel); viewModel.SelectedDate = e.Datetime.Date.ToString("MMMM dd yyyy"); viewModel.SelectedDateMeetings = new ObservableCollection <Meeting>(); if (e.Appointments != null) { foreach (var item in e.Appointments) { viewModel.SelectedDateMeetings.Add(item as Meeting); } } }
private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { isAppointmentDate = false; List <Object> appointments = e.Appointments; if (appointments != null && appointments.Count > 0) { foreach (var appointment in appointments) { var data = appointment as ScheduleAppointment; DateTime start = data.StartTime; string subject = data.Subject; isAppointmentDate = true; string appdate = start.ToString("dd/MM/yyyy"); string appTime = start.ToString("hh:mm"); if (Application.Current.Properties.ContainsKey("APP_DATE")) { Application.Current.Properties["APP_DATE"] = appdate; } else { Application.Current.Properties.Add("APP_DATE", appdate); } if (Application.Current.Properties.ContainsKey("APP_TIME")) { Application.Current.Properties["APP_TIME"] = appTime; } else { Application.Current.Properties.Add("APP_TIME", appTime); } if (Application.Current.Properties.ContainsKey("APP_SUB")) { Application.Current.Properties["APP_SUB"] = subject; } else { Application.Current.Properties.Add("APP_SUB", subject); } return; } } }
private async Task <WorkScheduleItem> EditWorkItem(CellTappedEventArgs e) { NewAppointmentPage page; if (e.Appointments != null && e.Appointments.Count > 0) { page = new NewAppointmentPage(e.Appointments.First() as WorkScheduleItem); } else { page = new NewAppointmentPage(e.Datetime, SelectedColor); page.SelectedText = SelectedText; } await Navigation.PushModalAsync(page); return(page.WorkItem); }
public void ScheduleOnCellTapped(object sender, CellTappedEventArgs e) { if (e.Appointment != null) { if (((ScheduleReservation)e.Appointment).Subject == "Not Available") { _navigator.DisplayAlert("Error", "You cannot create a reservation at this time", "Ok"); } else { _navigator.NavigateToModal(new UpdateReservationViewModel(_navigator, $"{NavigationPath}/EditReservation", Resource.Reservations.FirstOrDefault(r => r.Id == ((ScheduleReservation)e.Appointment).ReservationId), Reservations)); } } else { _navigator.NavigateToModal(new CreateReservationViewModel(_navigator, $"{NavigationPath}/CreateReservation", e.Datetime, Resource.Id, Reservations)); } }
private void Schedule_ScheduleTapped(object sender, CellTappedEventArgs e) { editor.Hidden = false; schedule.Hidden = true; indexOfAppointment = -1; if (e.ScheduleAppointment != null) { for (int i = 0; i < (schedule.ItemsSource as ObservableCollection <ScheduleAppointment>).Count; i++) { if ((schedule.ItemsSource as ObservableCollection <ScheduleAppointment>)[i] == e.ScheduleAppointment) { indexOfAppointment = int.Parse(i.ToString()); break; } } selectedAppointment = e.ScheduleAppointment; labelSubject.Text = selectedAppointment.Subject; labelLocation.Text = selectedAppointment.Location; String startDate = DateTime.Parse(selectedAppointment.StartTime.ToString()).ToString(); buttonStartDate.SetTitle(startDate, UIControlState.Normal); pickerStartDate.SetDate(selectedAppointment.StartTime, true); String endDate = DateTime.Parse(selectedAppointment.EndTime.ToString()).ToString(); buttonEndDate.SetTitle(endDate, UIControlState.Normal); pickerEndDate.SetDate(selectedAppointment.EndTime, true); editor.EndEditing(true); } else { List <UIColor> colorCollection = new List <UIColor>(); colorCollection.Add(UIColor.FromRGB(0xA2, 0xC1, 0x39)); colorCollection.Add(UIColor.FromRGB(0xD8, 0x00, 0x73)); labelSubject.Text = "Subject"; labelLocation.Text = "Location"; String startDate = DateTime.Parse(e.Date.ToString()).ToString(); pickerStartDate.SetDate(e.Date, true); buttonStartDate.SetTitle(startDate, UIControlState.Normal); String endDate = DateTime.Parse(e.Date.AddSeconds(3600).ToString()).ToString(); pickerEndDate.SetDate(e.Date.AddSeconds(3600), true); buttonEndDate.SetTitle(endDate, UIControlState.Normal); } }
private void Schedule_ScheduleTapped(object sender, CellTappedEventArgs e) { editor.Hidden = false; schedule.Hidden = true; indexOfAppointment = -1; if (e.ScheduleAppointment != null) { for (nuint i = 0; i < schedule.Appointments.Count; i++) { if (schedule.Appointments.GetItem <ScheduleAppointment>(i) == e.ScheduleAppointment) { indexOfAppointment = int.Parse(i.ToString()); break; } } selectedAppointment = (e.ScheduleAppointment); label_subject.Text = selectedAppointment.Subject; label_location.Text = selectedAppointment.Location; String _sDate = DateTime.Parse((selectedAppointment.StartTime.ToString())).ToString(); button_startDate.SetTitle(_sDate, UIControlState.Normal); picker_startDate.SetDate(selectedAppointment.StartTime, true); String _eDate = DateTime.Parse((selectedAppointment.EndTime.ToString())).ToString(); button_endDate.SetTitle(_eDate, UIControlState.Normal); picker_endDate.SetDate(selectedAppointment.EndTime, true); editor.EndEditing(true); } else { List <UIColor> colorCollection = new List <UIColor>(); colorCollection.Add(UIColor.FromRGB(0xA2, 0xC1, 0x39)); colorCollection.Add(UIColor.FromRGB(0xD8, 0x00, 0x73)); label_subject.Text = "Subject"; label_location.Text = "Location"; String _sDate = DateTime.Parse((e.Date.ToString())).ToString(); picker_startDate.SetDate(e.Date, true); button_startDate.SetTitle(_sDate, UIControlState.Normal); String _eDate = DateTime.Parse((e.Date.AddSeconds(3600).ToString())).ToString(); picker_endDate.SetDate(e.Date.AddSeconds(3600), true); button_endDate.SetTitle(_eDate, UIControlState.Normal); } }
private void SfSchedule_DoubleTapped(object sender, CellTappedEventArgs e) { viewOptionLayout.OptionLayout.Visibility = ViewStates.Invisible; var schedule = sender as SfSchedule; if ((e.ScheduleAppointment as ScheduleAppointment) != null) { selectedAppointment = e.ScheduleAppointment as ScheduleAppointment; indexOfAppointment = (schedule.ItemsSource as ScheduleAppointmentCollection).IndexOf(e.ScheduleAppointment as ScheduleAppointment); } else { selectedAppointment = null; indexOfAppointment = -1; } linearLayout.Visibility = ViewStates.Invisible; editor.EditorLayout.Visibility = ViewStates.Visible; editor.ScrollView.ScrollTo(0, 0); editor.UpdateEditor(e.ScheduleAppointment as ScheduleAppointment, e.Calendar as Calendar); }
private void CellTappedEventHandler(object sender, CellTappedEventArgs e) { Navigation.PushModalAsync(new AddNewEvent(), true); }
/// <summary> /// Method for schedule cell tapped /// </summary> /// <param name="sender">return the object</param> /// <param name="e">Cell Tapped Event Args</param> private void Schedule_CellTapped(object sender, CellTappedEventArgs e) { this.scheduleViewList.IsVisible = false; }
private void LongPressed(CellTappedEventArgs args) { var selectedDateTime = args.Datetime; }
private void DoubleTapped(CellTappedEventArgs args) { var selectedDateTime = args.Datetime; }