summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.php
blob: 788857f8940f78a5a7d52368167241ebcbed0054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

class TimeTriggeredCallbackTest extends TPage
{
	function start_timer($sender, $param)
	{
		$this->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;
	}
}

?>