コード例 #1
0
        private static void OnSaveAppointmentCommand(object sender, ExecutedRoutedEventArgs e)
        {
            var window          = (AppointmentDialogWindow)sender;
            var savingEventArgs = new AppointmentSavingEventArgs(AppointmentSavingEvent, window, window.EditedAppointment);

            window.RaiseEvent(savingEventArgs);
            if (!savingEventArgs.Cancel)
            {
                window.OnAppointmentSaved();
            }
        }
コード例 #2
0
 /// <summary>
 /// Raises the <see cref="AppointmentSaving"/> event.
 /// </summary>
 /// <param name="args">The <see cref="AppointmentSavingEventArgs"/> instance containing the event data.</param>
 protected virtual void OnAppointmentSaving(AppointmentSavingEventArgs args)
 {
     this.RaiseEvent(args);
 }