PromptPlus API:IControlMaskEdit
IControlMaskEdit
Namespace: PPlus.Controls
Represents the interface with all Methods of the MaskEdit control
public interface IControlMaskEdit : IPromptControls<ResultMasked>
Implements IPromptControls<ResultMasked>
Methods
AcceptEmptyValue(Boolean)
Accept empty value
Valid only for type not equal MaskedType.Generic, otherwise this set will be ignored.
IControlMaskEdit AcceptEmptyValue(bool value)
Parameters
value
Boolean
Accept empty value
Returns
AddValidators(params Func<Object, ValidationResult>[])
Add a validator to accept sucessfull finish of control.
Tip: see to validators embedding
IControlMaskEdit AddValidators(params Func<Object, ValidationResult>[] validators)
Parameters
validators
Func<Object, ValidationResult>[]
the function validator.
Returns
AmmoutPositions(Int32, Int32, Boolean)
Defines integer length, decimal length and accept signl.
Valid only for type MaskedType.Number or Currency, otherwise this set will be ignored.
This set is Requeried for these types.
IControlMaskEdit AmmoutPositions(int intvalue, int decimalvalue, bool acceptSignal)
Parameters
intvalue
Int32
integer length
decimalvalue
Int32
decimal length
acceptSignal
Boolean
True accept signal; otherwise, no.
Returns
ChangeDescription(Func<String, String>)
Dynamically change the description using a user role
IControlMaskEdit ChangeDescription(Func<String, String> value)
Parameters
value
Func<String, String>
function to apply change
Returns
Config(Action<IPromptConfig>)
Custom config the control.
IControlMaskEdit Config(Action<IPromptConfig> context)
Parameters
context
Action<IPromptConfig>
action to apply changes. IPromptConfig
Returns
Culture(CultureInfo)
CultureInfo to validate input when the type is not generic.
Default value is global Promptplus Cultureinfo
IControlMaskEdit Culture(CultureInfo value)
Parameters
value
CultureInfo
CultureInfo to use on validate
Returns
Culture(String)
CultureInfo to validate input when the type is not generic.
Default value is global Promptplus Cultureinfo
IControlMaskEdit Culture(string value)
Parameters
value
String
Name of CultureInfo to use on validate
Returns
Default(String)
Default value (with mask!) when stated.
IControlMaskEdit Default(string value)
Parameters
value
String
Value default
Returns
DefaultIfEmpty(String, Boolean)
Default value (with mask!) when finished value is empty.
IControlMaskEdit DefaultIfEmpty(string value, bool zeroIsEmpty)
Parameters
value
String
Finished value default
zeroIsEmpty
Boolean
Valid only for type MaskedType.Number or MaskedType.Currency, otherwise this set will be ignored.
Returns
FillZeros(Boolean)
Fill zeros mask.Default false.
Not valid for type MaskedType.Generic (this set will be ignored).
When used this feature the AcceptEmptyValue feature will be ignored.
When MaskedType.Number or MaskedType.Currency this feature is always on.
IControlMaskEdit FillZeros(bool value)
Parameters
value
Boolean
Fill zeros mask
Returns
FormatTime(FormatTime)
Defines time parts input.
Valid only for type MaskedType.TimeOnly or DateTime, otherwise this set will be ignored.
IControlMaskEdit FormatTime(FormatTime value)
Parameters
value
FormatTime
FormatTime
Returns
FormatYear(FormatYear)
Defines if year is long or short.
Valid only for type MaskedType.DateOnly or DateTime, otherwise this set will be ignored.
IControlMaskEdit FormatYear(FormatYear value)
Parameters
value
FormatYear
FormatYear
Returns
HistoryEnabled(String)
Enabled saved history inputs.
The history file is saved in in the ‘PromptPlus.History’ folder.
IControlMaskEdit HistoryEnabled(string value)
Parameters
value
String
name of file to saved history
Returns
HistoryMaxItems(Byte)
Set maximum items saved on history.After maximum the items are rotates.
IControlMaskEdit HistoryMaxItems(byte value)
Parameters
value
Byte
maximum items saved
Returns
HistoryMinimumPrefixLength(Int32)
Minimum chars to enabled history feature. Default value is 0.
History items are filtered by the starts with entry.
When command FilterType set to Disabled History items the value must be zero
IControlMaskEdit HistoryMinimumPrefixLength(int value)
Parameters
value
Int32
Minimum chars number
Returns
HistoryPageSize(Int32)
Set max.item view per page on history.Default value for this control is 10.
IControlMaskEdit HistoryPageSize(int value)
Parameters
value
Int32
Number of Max.items
Returns
HistoryTimeout(TimeSpan)
Set timeout to valid items saved on history. Default value is 365 days.
IControlMaskEdit HistoryTimeout(TimeSpan value)
Parameters
value
TimeSpan
timeout value
Returns
InputToCase(CaseOptions)
Transform char input using CaseOptions.
IControlMaskEdit InputToCase(CaseOptions value)
Parameters
value
CaseOptions
Transform option
Returns
Mask(String, Nullable<Char>)
Defines mask input. Rules for Generic type:
9 - Only a numeric character
L - Only a letter
C - OnlyCustom character
A - Any character
N - OnlyCustom character + Only a numeric character
X - OnlyCustom character + Only a letter
\ - Escape character
{ - Initial delimiter for repetition of masks
} - Final delimiter for repetition of masks
[-Initial delimiter for list of Custom character
] - Final delimiter for list of Custom character
IControlMaskEdit Mask(string value, Nullable<Char> promptmask)
Parameters
value
String
text of masked.
promptmask
Nullable<Char>
Prompt mask overwriter. Default value is ‘■’/’_’
Returns
Mask(MaskedType, Nullable<Char>)
Defines type of mask control.
IControlMaskEdit Mask(MaskedType maskedType, Nullable<Char> promptmask)
Parameters
maskedType
MaskedType
MaskedType
promptmask
Nullable<Char>
Prompt mask overwriter. Default value is ‘■’/’_’
Returns
OverwriteDefaultFrom(String, Nullable<TimeSpan>)
Overwrite default start value with last result saved on history.
IControlMaskEdit 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
ShowTipInputType(FormatWeek)
Show the tip of type input.
IControlMaskEdit ShowTipInputType(FormatWeek week)
Parameters
week
FormatWeek
show name of week for type date. FormatWeek
Returns
Styles(MaskEditStyles, Style)
Overwrite Styles
IControlMaskEdit Styles(MaskEditStyles content, Style value)
Parameters
content
MaskEditStyles
The MaskEditStyles content
value
Style
The Style to apply
Returns
SuggestionHandler(Func<SuggestionInput, SuggestionOutput>)
Add Suggestion (with mask!) Handler feature
IControlMaskEdit SuggestionHandler(Func<SuggestionInput, SuggestionOutput> value)
Parameters
value
Func<SuggestionInput, SuggestionOutput>
function to apply suggestions. SuggestionInput and SuggestionOutput
Returns
ValidateOnDemand(Boolean)
Execute validators foreach input
IControlMaskEdit ValidateOnDemand(bool value)
Parameters
value
Boolean
true execute validators foreach input; otherwise, only at finish.