2using System.Text.RegularExpressions;
3using System.Threading.Tasks;
33 [
Page(2,
"Script", 100)]
34 [Header(29,
"Default value:")]
35 [ToolTip(30,
"Default value presented to user.")]
42 [
Page(2,
"Script", 100)]
43 [Header(44,
"Minimum Value:")]
44 [ToolTip(45,
"The smallest value allowed.")]
46 public DateTime?
Min {
get;
set; }
51 [
Page(2,
"Script", 100)]
52 [Header(46,
"Maximum Value:")]
53 [ToolTip(47,
"The largest value allowed.")]
55 public DateTime?
Max {
get;
set; }
78 if (this.
Min.HasValue ||
this.Max.HasValue)
81 this.
Min.HasValue ?
XML.
Encode(
this.Min.Value,
true) :
null,
82 this.Max.HasValue ?
XML.
Encode(
this.Max.Value,
true) :
null);
90 new string[] { this.DefaultValue.HasValue ?
XML.
Encode(this.
DefaultValue.Value,
true) :
string.Empty },
96 new string[] { this.DefaultValue.HasValue ?
XML.
Encode(this.
DefaultValue.Value,
true) :
string.Empty },
130 if (
string.IsNullOrEmpty(s))
141 if (Parsed.TimeOfDay != TimeSpan.Zero)
Helps with common XML-related tasks.
static string Encode(string s)
Encodes a string for use in XML.
static bool TryParse(string s, out DateTime Value)
Tries to decode a string encoded DateTime.
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 Date-valued script parameter.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
ScriptDateParameterNode()
Represents a Date-valued script parameter.
DateTime? Min
Optional minimum value allowed.
DateTime? DefaultValue
Default parameter value.
override async Task PopulateForm(DataForm Parameters, Language Language, object Value)
Populates a data form with parameters for the object.
DateTime? Max
Optional maximum value allowed.
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.
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.
string Label
Parameter label.
bool Required
If parameter is required.
string Description
Parameter description.
string ParameterName
Parameter name.
string Page
Parameter name.