Difference between revisions of "QuestionCondition class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=<nowiki>QuestionCondition</nowiki> |Description=<nowiki>The question condition.</nowiki> |InheritsFrom=object|Methods= {{CGscriptMethods_Templat...")
 
Line 2: Line 2:
 
|Name=<nowiki>QuestionCondition</nowiki>
 
|Name=<nowiki>QuestionCondition</nowiki>
 
|Description=<nowiki>The question condition.</nowiki>
 
|Description=<nowiki>The question condition.</nowiki>
|InheritsFrom=object|Methods=
+
|InheritsFrom=object|Constructors=
 +
{{CGscriptConstructors_Template|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>id</nowiki>|Description=<nowiki>Question condition id</nowiki>}}
 +
|Description=<nowiki>Fetch exists question condition</nowiki>}}
 +
{{CGscriptConstructors_Template|Parameters=
 +
{{CGscriptParameters_Template|Type=ConditionType constant|Name=<nowiki>type</nowiki>|Description=<nowiki>Condition type, use constant Condition_Type_xxx</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=QuestionTemplate|Name=<nowiki>question</nowiki>|Description=<nowiki>Question contains this condition</nowiki>}}
 +
|Description=<nowiki>Create new condition and add it to question template</nowiki>}}
 +
|Methods=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ConditionType</nowiki>|HasGetter=1|Description=<nowiki>Get ConditionType of the question condition</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=ConditionType constant|Name=<nowiki>ConditionType</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set ConditionType of the question condition, use constant Condition_Type_xxx</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ConditionTypeAsString</nowiki>|HasGetter=1|Description=<nowiki>Get ConditionType as string of the question condition</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ConditionTypeAsString</nowiki>|HasGetter=1|Description=<nowiki>Get ConditionType as string of the question condition</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Expression</nowiki>|HasGetter=1|Description=<nowiki>Get Expression of the question condition</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Expression</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Expression of the question condition</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Id</nowiki>|HasGetter=1|Description=<nowiki>Get Id of the question condition</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Id</nowiki>|HasGetter=1|Description=<nowiki>Get Id of the question condition</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Label</nowiki>|HasGetter=1|Description=<nowiki>Get Label of the question condition</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Label</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Label of the question condition</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>QuestionID</nowiki>|HasGetter=1|Description=<nowiki>Get QuestionID of the question condition</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>QuestionID</nowiki>|HasGetter=1|Description=<nowiki>Get QuestionID of the question condition</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Range</nowiki>|HasGetter=1|Description=<nowiki>Get Range of the question condition</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Range</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Range of the question condition</nowiki>}}
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>Replacements</nowiki>|HasGetter=1|Description=<nowiki>Get Replacements of the question condition. Only valid for ReplaceIf</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>Replacements</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set Replacements of the question condition (only valid for ReplaceIf). Its value is a Dictionary with key is label to replace and value is LocalizedString</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}

Revision as of 10:44, 25 April 2022

QuestionCondition



The question condition.

Parent class

Inherits from object

Constructors

  • (int id "Question condition id") - Fetch exists question condition
  • (ConditionType constant type "Condition type, use constant Condition_Type_xxx", QuestionTemplate question "Question contains this condition") - Create new condition and add it to question template

Methods

  • (From object) string ToString() - The string representation of the object.

Properties

  • ConditionType constant ConditionType { get; set; } - Get/Set ConditionType of the question condition, use constant Condition_Type_xxx
  • string ConditionTypeAsString { get; } - Get ConditionType as string of the question condition
  • string Expression { get; set; } - Get/Set Expression of the question condition
  • int Id { get; } - Get Id of the question condition
  • string Label { get; set; } - Get/Set Label of the question condition
  • string ObjectTypeName { get; } - The name of the type of object.
  • int QuestionID { get; } - Get QuestionID of the question condition
  • string Range { get; set; } - Get/Set Range of the question condition
  • Dictionary Replacements { get; set; } - Get/Set Replacements of the question condition (only valid for ReplaceIf). Its value is a Dictionary with key is label to replace and value is LocalizedString
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.