summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php
blob: da87ac0f73af26727140c0d99f609a15b29b7f7b (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 CallbackTimerTest 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;
	}
}

?>