1using System.Text.RegularExpressions;
2using System.Threading.Tasks;
20 private string pattern =
string.Empty;
21 private Regex parsed =
null;
34 [
Page(2,
"Script", 100)]
35 [Header(29,
"Default value:")]
36 [ToolTip(30,
"Default value presented to user.")]
42 [
Page(2,
"Script", 100)]
43 [Header(31,
"Pattern:")]
44 [ToolTip(32,
"Regular expression used for validating user input.")]
50 if (
string.IsNullOrEmpty(value))
57 this.parsed =
new Regex(value);
84 if (
string.IsNullOrEmpty(this.
Pattern))
93 Validation,
string.Empty,
false,
false,
false);
99 Validation,
string.Empty,
false,
false,
false);
132 if (
string.IsNullOrEmpty(s))
143 if (!(this.parsed is
null))
145 Match M = this.parsed.Match(s);
147 if (!M.Success || M.Index > 0 || M.Length != s.Length)
Static class managing editable parameters in objects. Editable parameters are defined by using the at...
Class managing a page in a data form layout.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Represents a parameter with possible options on a command.
bool RestrictToOptions
Optional minimum value allowed.
async Task< KeyValuePair< string, string >[]> GetOptions()
Gets available options, if any are defined.
Represents a string-valued script parameter.
string DefaultValue
Default parameter value.
override async Task SetParameter(DataForm Parameters, Language Language, bool OnlySetChanged, Variables Values, SetEditableFormResult Result)
Sets the parameters of the object, based on contents in the data form.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
override async Task PopulateForm(DataForm Parameters, Language Language, object Value)
Populates a data form with parameters for the object.
string Pattern
Optional regular expression used for validating user input.
ScriptStringParameterNode()
Represents a string-valued script parameter.
string Label
Parameter label.
bool Required
If parameter is required.
string Description
Parameter description.
string ParameterName
Parameter name.
string Page
Parameter name.