예제 #1
0
 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;
 }
예제 #2
0
        private void OnAppointmentEditorOpening(object sender, Syncfusion.UI.Xaml.Schedule.AppointmentEditorOpeningEventArgs e)
        {
            e.Cancel = true;

            App.AppClient.ShowVideoEditDialog((Video)e.Appointment, e.StartTime);
        }