summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.page61
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.php25
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.page85
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.php11
4 files changed, 182 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.page b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.page
new file mode 100644
index 00000000..bb0a251c
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.page
@@ -0,0 +1,61 @@
+<com:TContent ID="body">
+
+<h2>Nonlinear Wizard Navigation Sample</h2>
+
+<p>
+In the following survey, if you are a college student, you will be asked which major you are in. Otherwise, the question is skipped to your favorite sport. This demo also shows unidrectional navigation.
+</p>
+
+<com:TWizard ID="Wizard3"
+ BackColor="#FFFBD6"
+ Width="300px"
+ HeaderText="A Mini Survey"
+ DisplaySideBar="false"
+ HeaderStyle.BackColor="PaleGoldenrod"
+ HeaderStyle.HorizontalAlign="Center"
+ NavigationStyle.HorizontalAlign="Center"
+ OnNextButtonClick="wizard3NextStep"
+ OnCompleteButtonClick="wizard3Completed" >
+
+ <com:TWizardStep Title="Background" AllowReturn="false">
+ <b><%= $this->Parent->Title %></b>
+ <br/><br/>
+ <com:TCheckBox ID="StudentCheckBox" Text="I am a college student." />
+ <br/><br/>
+ </com:TWizardStep>
+
+ <com:TWizardStep Title="Major" AllowReturn="false">
+ <b><%= $this->Parent->Title %></b>
+ <br/><br/>
+ My major is
+ <com:TDropDownList ID="DropDownList11">
+ <com:TListItem Value="Computer Science" />
+ <com:TListItem Value="Chemistry" />
+ <com:TListItem Value="Mathematics" />
+ <com:TListItem Value="Others" />
+ </com:TDropDownList>
+ <br/><br/>
+ </com:TWizardStep>
+
+ <com:TWizardStep Title="Hobbies" AllowReturn="false">
+ <b><%= $this->Parent->Title %></b>
+ <br/><br/>
+ My favorite Sport is
+ <com:TDropDownList ID="DropDownList22">
+ <com:TListItem Value="Baseball" />
+ <com:TListItem Value="Football" />
+ <com:TListItem Value="Tennis" />
+ </com:TDropDownList>
+ <br/><br/>
+ </com:TWizardStep>
+
+ <com:TWizardStep Title="Summary" StepType="Complete">
+ <h3>Thank you for taking this survey!</h3>
+ <p>
+ <com:TLabel ID="Wizard3Result" />
+ </p>
+ </com:TWizardStep>
+
+</com:TWizard>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.php b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.php
new file mode 100644
index 00000000..d85d041a
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample3.php
@@ -0,0 +1,25 @@
+<?php
+
+class Sample3 extends TPage
+{
+ public function wizard3Completed($sender,$param)
+ {
+ if($this->StudentCheckBox->Checked)
+ {
+ $str="You are a college student.<br/>";
+ $str.="You are in major: ".$this->DropDownList11->SelectedValue."<br/>";
+ $str.="Your favorite sport is: ".$this->DropDownList22->SelectedValue;
+ }
+ else
+ $str="Your favorite sport is: ".$this->DropDownList22->SelectedValue;
+ $this->Wizard3Result->Text=$str;
+ }
+
+ public function wizard3NextStep($sender,$param)
+ {
+ if($param->CurrentStepIndex===0 && !$this->StudentCheckBox->Checked)
+ $this->Wizard3->ActiveStepIndex=2;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.page b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.page
new file mode 100644
index 00000000..8687d842
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.page
@@ -0,0 +1,85 @@
+<com:TContent ID="body">
+
+<h2>Customized Wizard Template Sample</h2>
+
+<com:TWizard ID="Wizard1"
+ BackColor="OldLace"
+ Width="400px"
+ SideBarStyle.Width="120px"
+ StepStyle.BackColor="#FFFBD6"
+ HeaderStyle.BackColor="Moccasin"
+ NavigationStyle.BackColor="PaleGoldenrod"
+ OnActiveStepChanged="wizardCompleted" >
+
+ <prop:HeaderTemplate>
+ <i>Header Template</i>
+ <br/>
+ <b>Step <%= $this->Parent->Parent->ActiveStepIndex+1 %> of 3</b>
+ </prop:HeaderTemplate>
+
+ <prop:SideBarTemplate>
+ <i>SideBar Template</i>
+ <br/>
+ <com:TDataList ID="SideBarList">
+ <prop:ItemTemplate>
+ <com:TButton ID="SideBarButton" />
+ </prop:ItemTemplate>
+ <prop:SelectedItemTemplate>
+ <com:TButton ID="SideBarButton" Font.Bold="true" />
+ </prop:SelectedItemTemplate>
+ </com:TDataList>
+ </prop:SideBarTemplate>
+
+ <prop:StartNavigationTemplate>
+ <com:TLinkButton CommandName="NextStep" Text="Next &gt;" />
+ <br/>
+ <i>Start Navigation Template</i>
+ </prop:StartNavigationTemplate>
+
+ <prop:StepNavigationTemplate>
+ <com:TLinkButton CausesValidation="False" CommandName="PreviousStep" Text="&lt; Previous" />
+ <com:TLinkButton CommandName="NextStep" Text="Next &gt;" />
+ <br/>
+ <i>Step Navigation Template</i>
+ </prop:StepNavigationTemplate>
+
+ <prop:FinishNavigationTemplate>
+ All navigation buttons are removed.
+ <br/>
+ <i>Step Navigation Template</i>
+ </prop:FinishNavigationTemplate>
+
+ <com:TWizardStep ID="WizardStep1" Title="Step 1">
+ <i>Wizard Step Content</i>
+ <br/><br/>
+ Your favorite color:
+ <com:TDropDownList ID="DropDownList1">
+ <com:TListItem Value="Red" />
+ <com:TListItem Value="Blue" />
+ <com:TListItem Value="Green" />
+ <com:TListItem Value="Purple" />
+ <com:TListItem Value="Black" />
+ <com:TListItem Value="Yellow" />
+ <com:TListItem Value="Orange" />
+ <com:TListItem Value="Pink" />
+ <com:TListItem Value="Cyan" />
+ </com:TDropDownList>
+ <br/><br/>
+ </com:TWizardStep>
+
+ <com:TWizardStep ID="WizardStep2" Title="Step 2">
+ <i>Wizard Step Content</i>
+ <br/><br/>
+ <com:TLabel ID="Result" />
+ <br/><br/>
+ </com:TWizardStep>
+
+ <com:TWizardStep ID="WizardStep3" Title="Step 3">
+ <i>Wizard Step Content</i>
+ <br/><br/>
+ Thank you for completing this survey.<br />
+ <br/><br/>
+ </com:TWizardStep>
+</com:TWizard>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.php b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.php
new file mode 100644
index 00000000..6b79698d
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TWizard/Sample4.php
@@ -0,0 +1,11 @@
+<?php
+
+class Sample4 extends TPage
+{
+ public function wizardCompleted($sender,$param)
+ {
+ $this->Result->Text="Your favorite color is: " . $this->DropDownList1->SelectedValue;
+ }
+}
+
+?> \ No newline at end of file