PromptPlus API:IControlCalendar
IControlCalendar
Namespace: PPlus.Controls
Represents the interface with all Methods of the Calendar control
public interface IControlCalendar : IPromptControls<DateTime>
Implements IPromptControls<DateTime>
Methods
AddItems(CalendarScope, params ItemCalendar[])
Add scope(Note/Highlight/Disabled) items to calendar.
IControlCalendar AddItems(CalendarScope scope, params ItemCalendar[] values)
Parameters
scope
CalendarScope
The CalendarScope of item
values
ItemCalendar[]
The ItemCalendar
Returns
AddValidators(params Func<Object, ValidationResult>[])
Add a validator to accept sucessfull finish of control.
Tip: see to validators embedding
IControlCalendar AddValidators(params Func<Object, ValidationResult>[] validators)
Parameters
validators
Func<Object, ValidationResult>[]
the function validator.
Returns
ChangeDescription(Func<DateTime, String>)
Dynamically change the description using a user role
IControlCalendar ChangeDescription(Func<DateTime, String> value)
Parameters
value
Func<DateTime, String>
function to apply change
Returns
Config(Action<IPromptConfig>)
Custom config the control.
IControlCalendar Config(Action<IPromptConfig> context)
Parameters
context
Action<IPromptConfig>
Action to apply changes. IPromptConfig
Returns
Culture(CultureInfo)
CultureInfo to on show value format.
IControlCalendar Culture(CultureInfo value)
Parameters
value
CultureInfo
CultureInfo to use
Returns
Culture(String)
CultureInfo to show value format.
Default value is global Promptplus Cultureinfo
IControlCalendar Culture(string value)
Parameters
value
String
Name of CultureInfo to use
Returns
Default(DateTime, PolicyInvalidDate)
Initial date.Default value is current date.
IControlCalendar Default(DateTime value, PolicyInvalidDate policy)
Parameters
policy
PolicyInvalidDate
Policy to next/previous valid date if selected date is invalid
Returns
DisabledWeekends(Boolean)
Disabled Weekends.Default false;
IControlCalendar DisabledWeekends(bool value)
Parameters
value
Boolean
Disabled weekends
Returns
HotKeySwitchNotes(HotKey)
Overwrite a HotKey to show/hide notes of day. Default value is ‘F2’
IControlCalendar HotKeySwitchNotes(HotKey value)
Parameters
value
HotKey
The HotKey to show/hide notes of day
Returns
Interaction<T1>(IEnumerable<T1>, Action<IControlCalendar, T1>)
Execute a action foreach item of colletion passed as a parameter
IControlCalendar Interaction<T1>(IEnumerable<T1> values, Action<IControlCalendar, T1> action)
Type Parameters
T1
Layout external colletion
Parameters
values
IEnumerable<T1>
Colletion for interaction
action
Action<IControlCalendar, T1>
Action to execute
Returns
Layout(CalendarLayout)
The layout canlendar. Default value is ‘CalendarLayout.SingleBorde’
IControlCalendar Layout(CalendarLayout value)
Parameters
value
CalendarLayout
The CalendarLayout
Returns
OverwriteDefaultFrom(String, Nullable<TimeSpan>)
Overwrite default start value with last result saved on history.
IControlCalendar OverwriteDefaultFrom(string value, Nullable<TimeSpan> timeout)
Parameters
value
String
name of file to save history
timeout
Nullable<TimeSpan>
The timeout for valid items saved. Default value is 365 days
Returns
PageSize(Int32)
Set max.item notes view per page.
Default value : 5.The value must be greater than or equal to 1
IControlCalendar PageSize(int value)
Parameters
value
Int32
Number of Max.items
Returns
Range(DateTime, DateTime)
Defines a minimum and maximum range date
IControlCalendar Range(DateTime minvalue, DateTime maxvalue)
Parameters
minvalue
DateTime
Minimum date
maxvalue
DateTime
Maximum date
Returns
Styles(CalendarStyles, Style)
Overwrite Styles
IControlCalendar Styles(CalendarStyles styletype, Style value)
Parameters
styletype
CalendarStyles
CalendarStyles of content