Difference between revisions of "QuestionnaireLayout class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=QuestionnaireLayout |Description=A layout for a questionnaire |Constructors= {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Te...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{CGscriptClass_Template
 
{{CGscriptClass_Template
|Name=QuestionnaireLayout
+
|Name=<nowiki>QuestionnaireLayout</nowiki>
|Description=A layout for a questionnaire
+
|Description=<nowiki>A layout for a questionnaire.</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=number|Name=resourceId|Description=ResourceId of existing QuestionnaireLayout}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>resourceId</nowiki>|Description=<nowiki>ResourceId of existing QuestionnaireLayout.</nowiki>}}
|Description=Fetch existing QuestionnaireLayout}}
+
|Description=<nowiki>Fetch existing QuestionnaireLayout.</nowiki>}}
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=string|Name=name|Description=Resource name}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Resource name.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>parentResourceId</nowiki>|Description=<nowiki>Parent resource.</nowiki>}}
{{CGscriptParameters_Template|Type=number|Name=parentResourceId|Description=Parent resource}}
+
|Description=<nowiki>Create new QuestionnaireLayout.</nowiki>}}
|Description=Create new QuestionnaireLayout}}
+
|Methods=
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the QuestionnaireLayout</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=number|Name=ResourceId|HasGetter=1|Description=The Id of the Resource}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Css</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>The Css of the QuestionnaireLayout</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ResourceName|HasGetter=1|Description=The name of the Resource}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Description</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Description of the QuestionnaireLayout</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=Description|HasGetter=1|HasSetter=1|Description=Description of the QuestionnaireLayout}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Html</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>The Html of the QuestionnaireLayout</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=Html|HasGetter=1|HasSetter=1|Description=The Html of the QuestionnaireLayout}}
+
{{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=Css|HasGetter=1|HasSetter=1|Description=The Css of the QuestionnaireLayout}}
+
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceId</nowiki>|HasGetter=1|Description=<nowiki>The Id of the Resource</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ResourceName</nowiki>|HasGetter=1|Description=<nowiki>The name of the Resource</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
|Methods=
 
{{CGscriptMethods_Template|ReturnType=Empty|Name=Save|Description=Save the QuestionnaireLayout}}
 
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object}}
 
 
}}
 
}}
  
Line 28: Line 27:
 
number parentId = 1234;
 
number parentId = 1234;
 
QuestionnaireLayout l = new QuestionnaireLayout("Test layout", parentID);
 
QuestionnaireLayout l = new QuestionnaireLayout("Test layout", parentID);
l.Html = "<meta content='width=device-width'name=viewport><div id=body-in><div id=wrapper><div id=header><div id=logo></div></div><div id=questioncontent>[[QUESTION]]<div>[[COUNTDOWN]]</div><div>[[SPINNER]]</div></div><div id=footer><div id=navigationbar>[[NAVIGATION]]</div><div id=progressbar>[[PROGRESS]]</div></div></div></div>";
+
l.Html = "<div id='questioncontent'>[[QUESTION]]</div><div id='navigationbar'>[[NAVIGATION]]</div>";
 
l.Css = ".cg-ui-question > .cg-ui-text {font-weight: bold;}";
 
l.Css = ".cg-ui-question > .cg-ui-text {font-weight: bold;}";
 
l.Save();
 
l.Save();
 
l.ResourceId;
 
l.ResourceId;
 
</source>
 
</source>

Latest revision as of 06:10, 2 July 2020

QuestionnaireLayout



A layout for a questionnaire.

Parent class

Inherits from object

Constructors

  • (int resourceId "ResourceId of existing QuestionnaireLayout.") - Fetch existing QuestionnaireLayout.
  • (string name "Resource name.", int parentResourceId "Parent resource.") - Create new QuestionnaireLayout.

Methods

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

Properties

  • string Css { get; set; } - The Css of the QuestionnaireLayout
  • string Description { get; set; } - Description of the QuestionnaireLayout
  • string Html { get; set; } - The Html of the QuestionnaireLayout
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ResourceId { get; } - The Id of the Resource
  • string ResourceName { get; } - The name of the Resource
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.


Examples

number parentId = 1234;
QuestionnaireLayout l = new QuestionnaireLayout("Test layout", parentID);
l.Html = "<div id='questioncontent'>[[QUESTION]]</div><div id='navigationbar'>[[NAVIGATION]]</div>";
l.Css = ".cg-ui-question > .cg-ui-text {font-weight: bold;}";
l.Save();
l.ResourceId;