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