private void Schedule_AppointmentEditorOpening(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorOpeningEventArgs e) { if (_dropped) { var avaibleTerms = _viewModel.GetAvailableTerms(null, e.StartTime, _dragData); if (avaibleTerms == -1) { var dialog = new ErrorDialog("Sessions are overlaping.") { Owner = this, HelpState = Constants.ApplicationState.Schedule }; dialog.ShowDialog(); } else if (avaibleTerms < _dragData.Subject.MinimumTermsPerSession) { var dialog = new ErrorDialog($"Minimum session lenght is {_dragData.Subject.MinimumTermsPerSession} terms.") { Owner = this, HelpState = Constants.ApplicationState.Schedule }; dialog.ShowDialog(); } else { new SessionDetails(_viewModel, Schedule.Appointments, avaibleTerms, e.StartTime, _dragData) .ShowDialog(); } _dropped = false; } else { if (e.Appointment != null) { new SessionDetails((e.Appointment as SessionAppointment).Session, _viewModel, Schedule.Appointments) .ShowDialog(); } } e.Cancel = true; }
private void OnAppointmentEditorOpening(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorOpeningEventArgs e) { e.Cancel = true; App.AppClient.ShowVideoEditDialog((Video)e.Appointment, e.StartTime); }