summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.page24
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.php22
2 files changed, 46 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.page
new file mode 100644
index 00000000..822be2b4
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.page
@@ -0,0 +1,24 @@
+<com:TContent ID="body">
+
+<h1>TTimeTriggeredCallback Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A timer updating a label with the current time every 5 seconds:
+</td><td class="sampleaction">
+<com:TTimeTriggeredCallback ID="time1" Interval="5" OnCallback="timercallback" />
+<com:TActiveButton
+ Text="start timer"
+ OnClick="startClicked"
+/>
+<com:TActiveButton
+ Text="stop timer"
+ OnClick="stopClicked"
+/>
+<com:TActiveLabel ID="label1" />
+</td></tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.php
new file mode 100644
index 00000000..6c44c8c1
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TTimeTriggeredCallback/Home.php
@@ -0,0 +1,22 @@
+<?php
+
+class Home extends TPage
+{
+ public function startClicked($sender,$param)
+ {
+ $this->time1->startTimer();
+ }
+
+ public function stopClicked($sender,$param)
+ {
+ $this->time1->stopTimer();
+ }
+
+ public function timerCallback($sender,$param)
+ {
+ $this->label1->Text="Current time is ".date('H:i:s');
+ }
+
+}
+
+?> \ No newline at end of file