Class EditAppointmentDialog
Represents a dialog for editing scheduler appointments, providing a comprehensive interface for modifying appointment properties such as subject, location, start/end times, resources, recurrence patterns, and reminders. Implements IEditAppointmentDialog and extends RadSchedulerDialog.
Inherited Members
Namespace: Telerik.WinControls.UI.Scheduler.Dialogs
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class EditAppointmentDialog : RadSchedulerDialog, IComponentTreeHandler, ILayoutHandler, ISupportInitializeNotification, ISupportInitialize, INotifyPropertyChanged, IAnalyticsProvider, IEditAppointmentDialog
Constructors
EditAppointmentDialog()
Initializes a new instance of the EditAppointmentDialog class.
Declaration
public EditAppointmentDialog()
EditAppointmentDialog(IEvent, ISchedulerData)
Initializes a new instance of the EditAppointmentDialog class with the specified appointment and scheduler data.
Declaration
public EditAppointmentDialog(IEvent appointment, ISchedulerData schedulerData)
Parameters
IEvent
appointment
The appointment to edit. |
ISchedulerData
schedulerData
The scheduler data containing storage and configuration information. |
EditAppointmentDialog(IOpenRecurringAppointmentDialog)
Initializes a new instance of the EditAppointmentDialog class with the specified recurring appointment dialog.
Declaration
public EditAppointmentDialog(IOpenRecurringAppointmentDialog openRecurringAppointmentDialog)
Parameters
IOpenRecurringAppointmentDialog
openRecurringAppointmentDialog
The dialog used for opening recurring appointments, or null to use the default implementation. |
Fields
buttonCancel
buttonDelete
buttonOK
buttonRecurrence
checkedCmbResource
chkAllDay
cmbBackground
cmbResource
cmbShowTimeAs
dateEnd
dateStart
editOccurrence
Gets or sets a value indicating whether the current editing operation is targeting a single occurrence of a recurring appointment rather than the entire series.
Declaration
protected bool editOccurrence
Field Value
System.Boolean
|
errorProvider
Declaration
protected ErrorProvider errorProvider
Field Value
System.Windows.Forms.ErrorProvider
|
labelBackground
labelEndTime
labelLocation
labelResource
labelStartTime
labelStatus
labelSubject
openRecurringAppointmentDialog
Gets or sets the dialog used for handling recurring appointment operations, providing user interaction for opening recurring events.
Declaration
protected IOpenRecurringAppointmentDialog openRecurringAppointmentDialog
Field Value
IOpenRecurringAppointmentDialog
|
radDropDownListReminder
radLabelReminder
radSeparator1
radSeparator2
radSeparator3
recurringAppointment
Gets or sets the recurring appointment instance used for storing recurrence pattern configuration during the editing process.
Declaration
protected IEvent recurringAppointment
Field Value
IEvent
|
saveRecurringAppointment
Gets or sets a value indicating whether the recurrence settings should be saved to the appointment when the dialog is accepted.
Declaration
protected bool saveRecurringAppointment
Field Value
System.Boolean
|
textBoxDescription
timeEnd
timeStart
txtLocation
txtSubject
Properties
Appointment
Gets the IEvent appointment that is currently being edited in the dialog.
Declaration
public virtual IEvent Appointment { get; }
Property Value
IEvent
|
SchedulerData
Gets the ISchedulerData instance that provides access to scheduler storage and configuration.
Declaration
public virtual ISchedulerData SchedulerData { get; }
Property Value
ISchedulerData
|
Methods
ApplyRecurrenceDialogSettings(IEditRecurrenceDialog)
Applies common settings such as theme and right-to-left layout to the recurrence dialog.
Declaration
protected virtual void ApplyRecurrenceDialogSettings(IEditRecurrenceDialog editRecurrenceDialog)
Parameters
IEditRecurrenceDialog
editRecurrenceDialog
The recurrence dialog to configure. |
ApplySettingsToEvent(IEvent)
Applies the current dialog settings to the specified target appointment.
Declaration
protected virtual void ApplySettingsToEvent(IEvent targetEvent)
Parameters
IEvent
targetEvent
The target appointment to which the settings will be applied. |
CanHaveMultipleResources()
Determines whether the current scheduler configuration supports multiple resources per appointment.
Declaration
protected virtual bool CanHaveMultipleResources()
Returns
System.Boolean
true if multiple resources are supported; otherwise, false. |
ClearErrors()
Clears all validation error messages from the dialog controls.
Declaration
protected virtual void ClearErrors()
CreateNewEvent()
Creates a new appointment instance using the scheduler's appointment factory or a default implementation.
Declaration
protected virtual IEvent CreateNewEvent()
Returns
IEvent
A new IEvent instance ready for editing. |
CreateRecurrenceDialog(IEvent)
Creates and configures a recurrence dialog for the specified recurring appointment.
Declaration
protected virtual IEditRecurrenceDialog CreateRecurrenceDialog(IEvent recurringAppointment)
Parameters
IEvent
recurringAppointment
The recurring appointment to configure. |
Returns
IEditRecurrenceDialog
An IEditRecurrenceDialog instance for editing recurrence settings. |
DeleteEvent()
Deletes the current appointment from the scheduler using the appropriate deletion method.
Declaration
protected virtual void DeleteEvent()
Dispose(Boolean)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
true if managed resources should be disposed; otherwise, false. |
Overrides
EditAppointment(IEvent, ISchedulerData)
Prepares the dialog for editing the specified appointment using the provided scheduler data. Handles both single appointments and recurring appointment occurrences.
Declaration
public virtual bool EditAppointment(IEvent appointment, ISchedulerData schedulerData)
Parameters
IEvent
appointment
The appointment to edit. |
ISchedulerData
schedulerData
The scheduler data containing storage and configuration information. |
Returns
System.Boolean
true if the appointment can be edited; false if the operation was cancelled by the user. |
Implements
GetAppointmentEnd()
Gets the appointment end date and time based on the current dialog settings.
Declaration
protected virtual DateTime GetAppointmentEnd()
Returns
System.DateTime
The calculated end System.DateTime for the appointment. |
GetAppointmentStart()
Gets the appointment start date and time based on the current dialog settings.
Declaration
protected virtual DateTime GetAppointmentStart()
Returns
System.DateTime
The calculated start System.DateTime for the appointment. |
GetReminder(Nullable<TimeSpan>)
Finds a reminder configuration that matches the specified reminder value.
Declaration
protected virtual IAppointmentReminderInfo GetReminder(TimeSpan? reminderValue)
Parameters
System.Nullable<System.TimeSpan>
reminderValue
The reminder time span to search for. |
Returns
IAppointmentReminderInfo
An IAppointmentReminderInfo that matches the value, or null if not found. |
GetSelectedResources()
Gets the collection of currently selected resources from the resource selection controls.
Declaration
protected virtual IList<EventId> GetSelectedResources()
Returns
System.Collections.Generic.IList<EventId>
A collection of EventId representing the selected resources. |
LoadBackgrounds()
Loads the available appointment backgrounds from the scheduler data and populates the background selection control.
Declaration
protected virtual void LoadBackgrounds()
LoadReminders()
Loads the available reminder options from the scheduler data and populates the reminder selection control.
Declaration
protected virtual void LoadReminders()
LoadResources()
Loads the available resources from the scheduler data and populates the resource selection controls.
Declaration
protected virtual void LoadResources()
LoadSettingsFromEvent(IEvent)
Loads the properties from the source appointment into the dialog's controls for editing.
Declaration
protected virtual void LoadSettingsFromEvent(IEvent sourceEvent)
Parameters
IEvent
sourceEvent
The source appointment whose properties will be loaded into the dialog. |
LoadStatuses()
Loads the available appointment statuses from the scheduler data and populates the status selection control.
Declaration
protected virtual void LoadStatuses()
LocalizeDialog(RadSchedulerLocalizationProvider)
Localizes the dialog's user interface elements using the specified localization provider.
Declaration
protected override void LocalizeDialog(RadSchedulerLocalizationProvider localizationProvider)
Parameters
RadSchedulerLocalizationProvider
localizationProvider
The localization provider containing localized strings. |
Overrides
OnDeleteButtonClicked()
Handles the delete button click event and initiates appointment deletion.
Declaration
protected virtual void OnDeleteButtonClicked()
OnLoad(EventArgs)
Handles the form load event, initializing dialog controls and loading data from the appointment.
Declaration
protected override void OnLoad(EventArgs e)
Parameters
System.EventArgs
e
The event arguments. |
Overrides
OnLocationChanged(EventArgs)
Handles the form location changed event and hides any open date/time picker popups.
Declaration
protected override void OnLocationChanged(EventArgs e)
Parameters
System.EventArgs
e
The event arguments. |
OnShown(EventArgs)
Handles the form shown event, setting focus to the subject text box and selecting its content.
Declaration
protected override void OnShown(EventArgs e)
Parameters
System.EventArgs
e
The event arguments. |
Overrides
OnThemeNameChanged(ThemeNameChangedEventArgs)
Handles the theme name changed event and applies the new theme to all child controls.
Declaration
protected override void OnThemeNameChanged(ThemeNameChangedEventArgs e)
Parameters
ThemeNameChangedEventArgs
e
The theme name changed event arguments. |
Overrides
ParseReminderInput(String)
Parses user input text for reminder settings and converts it to a System.TimeSpan value.
Declaration
protected virtual TimeSpan? ParseReminderInput(string text)
Parameters
System.String
text
The text input to parse. |
Returns
System.Nullable<System.TimeSpan>
A System.TimeSpan representing the reminder time, or null if parsing fails. |
ParseTimeSpan(Nullable<TimeSpan>)
Converts a System.TimeSpan value to a human-readable string representation for display purposes.
Declaration
protected virtual string ParseTimeSpan(TimeSpan? time)
Parameters
System.Nullable<System.TimeSpan>
time
The time span to convert. |
Returns
System.String
A localized string representation of the time span. |
RecurrenceSettingsShouldBeSaved()
Determines whether recurrence settings should be saved to the appointment.
Declaration
protected virtual bool RecurrenceSettingsShouldBeSaved()
Returns
System.Boolean
true if recurrence settings should be saved; otherwise, false. |
SetEndDateAndTime(DateTime)
Sets the end date and time values in the respective dialog controls.
Declaration
protected virtual void SetEndDateAndTime(DateTime end)
Parameters
System.DateTime
end
The end date and time to set. |
SetStartDateAndTime(DateTime)
Sets the start date and time values in the respective dialog controls.
Declaration
protected virtual void SetStartDateAndTime(DateTime start)
Parameters
System.DateTime
start
The start date and time to set. |
ShouldUpdateResources(IList<EventId>)
Determines whether the resource assignments have changed compared to the initial resource collection.
Declaration
protected virtual bool ShouldUpdateResources(IList<EventId> initialResources)
Parameters
System.Collections.Generic.IList<EventId>
initialResources
The initial collection of resources assigned to the appointment. |
Returns
System.Boolean
true if resources have been modified; otherwise, false. |
ShowRecurrenceDialog()
Displays the recurrence dialog for configuring recurring appointment patterns and settings.
Declaration
public virtual void ShowRecurrenceDialog()
Implements
ValidateExceptionDates(DateTime, DateTime)
Validates exception appointment dates to ensure they don't conflict with existing occurrences.
Declaration
protected virtual string ValidateExceptionDates(DateTime targetStartDate, DateTime targetEndDate)
Parameters
System.DateTime
targetStartDate
The target start date for the exception appointment. |
System.DateTime
targetEndDate
The target end date for the exception appointment. |
Returns
System.String
An error message if validation fails; otherwise, an empty string. |
ValidateInput()
Validates the user input in the dialog and displays error messages if validation fails.
Declaration
protected virtual bool ValidateInput()
Returns
System.Boolean
true if all input is valid; false if validation errors were found. |
ValidateReminderInput()
Validates and processes user input in the reminder control, ensuring valid reminder values are selected.
Declaration
protected virtual void ValidateReminderInput()
Explicit Interface Implementations
IEditAppointmentDialog.add_Shown(EventHandler)
Declaration
void IEditAppointmentDialog.add_Shown(EventHandler value)
Parameters
System.EventHandler
value
|
Implements
IEditAppointmentDialog.remove_Shown(EventHandler)
Declaration
void IEditAppointmentDialog.remove_Shown(EventHandler value)
Parameters
System.EventHandler
value
|
Implements
IEditAppointmentDialog.ShowDialog()
Declaration
DialogResult IEditAppointmentDialog.ShowDialog()
Returns
System.Windows.Forms.DialogResult
|