Class MaskTimeSpanProvider
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class MaskTimeSpanProvider : IMaskProvider
Constructors
MaskTimeSpanProvider(String, CultureInfo, RadMaskedEditBoxElement)
Initializes a new instance of the Mask
Declaration
public MaskTimeSpanProvider(string mask, CultureInfo culture, RadMaskedEditBoxElement owner)
Parameters
System. The mask. |
System. The culture. |
Rad The owner. |
Fields
keyCounter
Declaration
protected int keyCounter
Field Value
System.
|
oldSelectedIndex
Declaration
protected int oldSelectedIndex
Field Value
System.
|
Properties
AutoSelectNextPart
Gets or sets a value indicating whether to automatically select the next part during the editing.
Declaration
public bool AutoSelectNextPart { get; set; }
Property Value
System.
|
Culture
Gets the culture that determines the value of the localizable separators and placeholders in the input mask.
Declaration
public CultureInfo Culture { get; }
Property Value
System. A System.Globalization.CultureInfo containing the culture information associated with the input mask. |
Implements
DaysStep
Gets or sets the days step used when modifying the value.
Declaration
public int DaysStep { get; set; }
Property Value
System.
|
EnableKeyNavigation
HoursStep
Gets or sets the hours step used when modifying the value.
Declaration
public int HoursStep { get; set; }
Property Value
System.
|
IncludePrompt
This provider should not implement this property and should thrown an exception.
Declaration
public bool IncludePrompt { get; set; }
Property Value
System.
|
Implements
Mask
Gets the input mask.
Declaration
public string Mask { get; }
Property Value
System. A System. |
Implements
MaskFromFormat
Gets or sets the mask based on the format string.
Declaration
public string MaskFromFormat { get; set; }
Property Value
System.
|
MaskParts
A list with Time
Declaration
public List<TimeSpanMaskPart> MaskParts { get; set; }
Property Value
System.
|
Maximum
Gets or sets the maximum value.
Declaration
public TimeSpan Maximum { get; set; }
Property Value
System.
|
MillisecondsStep
Gets or sets the milliseconds step used when modifying the value.
Declaration
public int MillisecondsStep { get; set; }
Property Value
System.
|
Minimum
Gets or sets the minimum value.
Declaration
public TimeSpan Minimum { get; set; }
Property Value
System.
|
MinutesStep
Gets or sets the minutes step used when modifying the value.
Declaration
public int MinutesStep { get; set; }
Property Value
System.
|
Owner
Gets the owner Rad
Declaration
public RadMaskedEditBoxElement Owner { get; }
Property Value
PromptChar
This provider should not implement this property and should thrown an exception.
Declaration
public char PromptChar { get; set; }
Property Value
System.
|
Implements
SecondsStep
Gets or sets the seconds step used when modifying the value.
Declaration
public int SecondsStep { get; set; }
Property Value
System.
|
SelectedItemIndex
Gets or sets the index of the selected item of the Mask
Declaration
public int SelectedItemIndex { get; set; }
Property Value
System.
|
TextBoxItem
Gets the text box item.
Declaration
public RadTextBoxItem TextBoxItem { get; }
Property Value
Implements
Value
Gets or sets the value.
Declaration
public virtual object Value { get; set; }
Property Value
System.
|
Implements
Methods
AdjustItemsOffset(IList<TimeSpanMaskPart>, TimeSpan)
Adjusts the offset of the items in the list.
Declaration
protected static void AdjustItemsOffset(IList<TimeSpanMaskPart> collection, TimeSpan value)
Parameters
System.
|
System.
|
AdjustMaskPartsMinMaxValues()
Sets the min and max values to each Time
Declaration
protected virtual void AdjustMaskPartsMinMaxValues()
CallOwnerValueChanged()
Invokes the ValueChanged event of the owner.
Declaration
protected virtual void CallOwnerValueChanged()
CallOwnerValueChanging(ValueChangingEventArgs)
Invokes the ValueChanging event of the owner.
Declaration
protected virtual void CallOwnerValueChanging(ValueChangingEventArgs args)
Parameters
Value The event arguments. |
Click()
Occurs when the user clicks with the mouse.
Declaration
public virtual bool Click()
Returns
System. Not used |
Implements
Clone()
Clones this instance.
Declaration
public IMaskProvider Clone()
Returns
IMask The cloned instance. |
Implements
Delete()
Raises the delete operation for currently selected mask part.
Declaration
public bool Delete()
Returns
System. Not used. |
Implements
Down(TimeSpanMaskPart, TimeSpan, TimeSpan)
Decreases the value of the given Time
Declaration
public virtual void Down(TimeSpanMaskPart part, TimeSpan minTimeSpan, TimeSpan maxTimeSpan)
Parameters
Time The Time |
System. The min time span. |
System. The max time span. |
FillCollection(String)
Returns a list used to validate the value and user input.
Declaration
public static List<TimeSpanMaskPart> FillCollection(string mask)
Parameters
System. The mask. |
Returns
System. A list with Mask |
FillCollectionInternal(String)
Fills the Mask
Declaration
protected virtual List<TimeSpanMaskPart> FillCollectionInternal(string mask)
Parameters
System. The mask. |
Returns
System.
|
FillMaskPartCollectionValuesInternal(IList<TimeSpanMaskPart>, TimeSpan)
Fills the collection with values based on the given value.
Declaration
protected virtual void FillMaskPartCollectionValuesInternal(IList<TimeSpanMaskPart> collection, TimeSpan timeSpan)
Parameters
System. The list. |
System. The time span value. |
FillMaskPartsCollectionValues(IList<TimeSpanMaskPart>, TimeSpan)
Fills the collection with values based on the given value.
Declaration
public static void FillMaskPartsCollectionValues(IList<TimeSpanMaskPart> collection, TimeSpan timeSpan)
Parameters
System. The list. |
System. The time span value. |
GetGroupLengthByMask(String)
Gets the group length of the mask.
Declaration
protected static int GetGroupLengthByMask(string mask)
Parameters
System.
|
Returns
System. The group length of the mask. |
GetSpecificFormat(String)
Gets the format string from the mask using the culture specific format info.
Declaration
public static string GetSpecificFormat(string mask)
Parameters
System. The mask. |
Returns
System. The format string. |
GetSpecificFormatInternal(String)
Gets the format string from the mask using the culture specific format info.
Declaration
protected virtual string GetSpecificFormatInternal(string mask)
Parameters
System. The mask. |
Returns
System. The format string. |
HandleKeyPress(TimeSpanMaskPart, KeyPressEventArgs)
Handles a key press operation over a specific Time
Declaration
protected virtual bool HandleKeyPress(TimeSpanMaskPart part, KeyPressEventArgs e)
Parameters
Time The selected Time |
System. The key event arguments. |
Returns
System. Not used. |
HandleKeyPressDay(TimeSpanMaskPart, KeyPressEventArgs)
Handles a key press operation over a day Time
Declaration
protected virtual void HandleKeyPressDay(TimeSpanMaskPart part, KeyPressEventArgs e)
Parameters
Time The day Time |
System. The key event arguments. |
HandleKeyPressHour(TimeSpanMaskPart, KeyPressEventArgs)
Handles a key press operation over an hour Time
Declaration
protected virtual void HandleKeyPressHour(TimeSpanMaskPart part, KeyPressEventArgs e)
Parameters
Time The hour Time |
System. The key event arguments. |
HandleKeyPressWithCharacters(TimeSpanMaskPart, KeyPressEventArgs, String[])
Handles a key press operation with a character. Tries to match the value by the given names collection.
Declaration
protected virtual void HandleKeyPressWithCharacters(TimeSpanMaskPart part, KeyPressEventArgs e, string[] names)
Parameters
Time The Time |
System. The key event arguments. |
System. The names collection to match. |
HandleSpinDown(TimeSpan, TimeSpan)
Handles a spin down operation, usually when the keyboard down arrow key was pressed.
Declaration
public virtual void HandleSpinDown(TimeSpan minTimeSpan, TimeSpan maxTimeSpan)
Parameters
System. The min time span. |
System. The max time span. |
HandleSpinUp(TimeSpan, TimeSpan)
Handles a spin up operation, usually when the keyboard up arrow key was pressed.
Declaration
public virtual void HandleSpinUp(TimeSpan minTimeSpan, TimeSpan maxTimeSpan)
Parameters
System. The min time span. |
System. The max time span. |
KeyDown(Object, KeyEventArgs)
Occurs when a key is pressed.
Declaration
public virtual void KeyDown(object sender, KeyEventArgs e)
Parameters
System. The sender. |
System. Key event arguments. |
Implements
KeyPress(Object, KeyPressEventArgs)
Occurs when a key is pressed.
Declaration
public virtual void KeyPress(object sender, KeyPressEventArgs e)
Parameters
System. The sender. |
System. Key event arguments. |
Implements
ResetCurrentPartValue(Object, KeyEventArgs)
Resets the value of the currently selected part of the mask.
Declaration
public virtual void ResetCurrentPartValue(object sender, KeyEventArgs e)
Parameters
System. The sender. |
System. Key event arguments. |
ResetOnDelPartValue(TimeSpanMaskPart, Int32)
Resets the given part value if the key char is delete or backspace.
Declaration
protected virtual bool ResetOnDelPartValue(TimeSpanMaskPart part, int keyChar)
Parameters
Time The Time |
System. The key char. |
Returns
System. A value indicating whether the value of the part was reset. |
ResetToMinTimeSpan()
RestoreSelectedItem()
Restores the selected item from the Mask
Declaration
protected virtual void RestoreSelectedItem()
SelectCurrentItemFromCurrentCaret()
Selects the current Time
Declaration
public virtual bool SelectCurrentItemFromCurrentCaret()
Returns
System. A value indicating whether a part was selected. |
SelectCurrentItemWithSelectedItem()
Selects the text in the Text
Declaration
public virtual void SelectCurrentItemWithSelectedItem()
SelectFirstEditableItem()
Selects the first editable Time
Declaration
public virtual void SelectFirstEditableItem()
SelectFirstItem()
Selects the first Time
Declaration
public virtual void SelectFirstItem()
SelectLastEditableItem()
Selects the last editable Time
Declaration
public virtual void SelectLastEditableItem()
SelectLastItem()
Selects the last Time
Declaration
public virtual void SelectLastItem()
SelectNextEditableItem()
Selects the previous editable Time
Declaration
public virtual void SelectNextEditableItem()
SelectNextEditableItemFromCurrentCaret()
Selects the next editable Time
Declaration
public virtual bool SelectNextEditableItemFromCurrentCaret()
Returns
System. A value indicating whether a part was selected. |
SelectNextItem()
Selects the next Time
Declaration
public virtual void SelectNextItem()
SelectNextItemFromCurrentCaret()
Selects the next Time
Declaration
public virtual void SelectNextItemFromCurrentCaret()
SelectPrevEditableItem()
Selects the previous editable Time
Declaration
public virtual void SelectPrevEditableItem()
SelectPrevItem()
Selects the previous Time
Declaration
public virtual void SelectPrevItem()
SelectPrevItemFromCurrentCaret()
Selects the previous Time
Declaration
public virtual void SelectPrevItemFromCurrentCaret()
ToString()
Returns a formatted TimeSpan string.
Declaration
public override string ToString()
Returns
System.
|
Overrides
ToString(Boolean, Boolean)
Gets the string interpretation of the value based on the Mask
Declaration
public string ToString(bool includePrompt, bool includeLiterals)
Parameters
System. Not used. |
System. not used. |
Returns
System. The string interpretation of the value based on the mask. |
Implements
ToString(TimeSpan, IList<TimeSpanMaskPart>, CultureInfo)
Returns a formatted TimeSpan string based on the list of Time
Declaration
public static string ToString(TimeSpan value, IList<TimeSpanMaskPart> maskParts, CultureInfo culture)
Parameters
System. TimeSpan value. |
System. List of TimeSpanMaskPart structs, who define the format of TimeSpan value. |
System. The culture used to format the string when value is negative. If it is passed as null, the method will use the CultureInfo.CurrentCulture. |
Returns
System.
|
ToString(TimeSpan, String, CultureInfo)
Returns a formatted TimeSpan string based on the given format string.
Declaration
public static string ToString(TimeSpan value, string format, CultureInfo culture)
Parameters
System. TimeSpan value. |
System. Format string. |
System. The culture used to format the string when value is negative. |
Returns
System.
|
ToStringInternal(TimeSpan, String)
Returns a formatted TimeSpan string based on the given format string.
Declaration
protected virtual string ToStringInternal(TimeSpan value, string format)
Parameters
System. TimeSpan value. |
System. Format string. |
Returns
System.
|
Up(TimeSpanMaskPart, TimeSpan, TimeSpan)
Increases the value of the given Time
Declaration
public virtual void Up(TimeSpanMaskPart part, TimeSpan minTimeSpan, TimeSpan maxTimeSpan)
Parameters
Time The Time |
System. The min time span. |
System. The max time span. |
Validate(String)
Validates the given string value and sets it as Value if the value is valid. If the value cannot be parsed to the underlying data type of the Value, it is reset to its default value.
Declaration
public virtual bool Validate(string stringValue)
Parameters
System. The string value that is about to be set to the Value. |
Returns
System. A value indicating whether the string value is valid. |
Implements
Events
SelectedItemChanged
Occurs when the selected item is changed.
Declaration
public event EventHandler SelectedItemChanged
Event Type
System.
|