From 1180e6486139a9c9662984367c4f624394e06f35 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 12 Aug 2006 12:54:27 +0000 Subject: Add Triggered Callbacks --- .../protected/pages/CallbackTimerTest.page | 21 --------------- .../protected/pages/CallbackTimerTest.php | 27 ------------------- .../protected/pages/EventTriggeredCallback.page | 31 ++++++++++++++++++++++ .../protected/pages/EventTriggeredCallback.php | 21 +++++++++++++++ .../protected/pages/PeriodicCallbackTest.page | 21 +++++++++++++++ .../protected/pages/PeriodicCallbackTest.php | 27 +++++++++++++++++++ .../protected/pages/ValueTriggerCallbackTest.page | 14 ++++++++++ .../protected/pages/ValueTriggerCallbackTest.php | 12 +++++++++ 8 files changed, 126 insertions(+), 48 deletions(-) delete mode 100644 tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page delete mode 100644 tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php (limited to 'tests/FunctionalTests/active-controls/protected/pages') diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page deleted file mode 100644 index 8e99e528..00000000 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.page +++ /dev/null @@ -1,21 +0,0 @@ - -

TCallbackTimer + ViewState Tests

- - -
- -
- - - - - -
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php deleted file mode 100644 index da87ac0f..00000000 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php +++ /dev/null @@ -1,27 +0,0 @@ -timer1->startTimer(); - $this->setViewState('count', 0); - } - - function stop_timer($sender, $param) - { - $this->timer1->stopTimer(); - } - - function tick($sender, $param) - { - $count = intval($this->getViewState('count')); - $this->setViewState('count', ++$count); - if($count > 10) - $this->timer1->stopTimer(); - else - $this->label1->Text .= " ".$count; - } -} - -?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page new file mode 100644 index 00000000..889636f3 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.page @@ -0,0 +1,31 @@ + + +

Event Triggered Callback Test

+ + + + + Mouse over this panel + + + + + + + + + + +
+ +
+ +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php new file mode 100644 index 00000000..dc47d867 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/EventTriggeredCallback.php @@ -0,0 +1,21 @@ +label1->Text = 'text 1 focused'; + } + + function panel1_onmouseover($sender, $param) + { + $this->label1->Text = 'panel 1 on mouse over '.time(); + } + + function button1_clicked($sender, $param) + { + $this->label1->Text = 'button 1 clicked'; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.page new file mode 100644 index 00000000..bbc12862 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.page @@ -0,0 +1,21 @@ + +

TPeriodicCallback + ViewState Tests

+ + +
+ +
+ + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.php b/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.php new file mode 100644 index 00000000..13633a00 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.php @@ -0,0 +1,27 @@ +timer1->startTimer(); + $this->setViewState('count', 0); + } + + function stop_timer($sender, $param) + { + $this->timer1->stopTimer(); + } + + function tick($sender, $param) + { + $count = intval($this->getViewState('count')); + $this->setViewState('count', ++$count); + if($count > 10) + $this->timer1->stopTimer(); + else + $this->label1->Text .= " ".$count; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page new file mode 100644 index 00000000..1281cc5c --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.page @@ -0,0 +1,14 @@ + +

Value Trigger Callback Test

+ + + + + + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php new file mode 100644 index 00000000..c3c44252 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ValueTriggerCallbackTest.php @@ -0,0 +1,12 @@ +getParameter(); + $this->label1->Text = "Old = ".$values->OldValue." : New Value = ".$values->NewValue; + } +} + +?> \ No newline at end of file -- cgit v1.2.3