summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket925.php
blob: 0284bd66e47ad0f8b30adc92252a3a93c3f0de40 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php

prado::using('System.Web.UI.ActiveControls.*');

class Ticket925 extends TPage
{
	public function getTimer1Value()
	{
		return $this->getViewState('timer1', 0);
	}
	
	public function getTimer2Value()
	{
		return $this->getViewState('timer2', 0);
	}
	
	public function setTimer1Value($value)
	{
		$this->setViewState('timer1', $value, 0);
	}
	
	public function setTimer2Value($value)
	{
		$this->setViewState('timer2', $value, 0);
	}
	
	public function startTimer1($sender, $param)
	{
		$this->timer1->startTimer();
	}
	
	public function stopTimer1($sender, $param)
	{
		$this->timer1->stopTimer();
	}
	
	public function startTimer2($sender, $param)
	{
		$this->timer2->startTimer();
	}
	
	public function stopTimer2($sender, $param)
	{
		$this->timer2->stopTimer();
	}
	
	public function changeIntervalTimer1($sender, $param)
	{
		$this->timer1->setInterval(1);
	}
	
	public function timer1callback ($sender, $param)
	{
		$this->timer1result->Text .= ($this->Timer1Value+=$this->timer1->Interval).'... ';
		if ($this->Timer1Value > 20) 
		{
			$this->timer1Value=0;
			$this->timer1result->Text='';
			$this->timer1->stopTimer();
		}
		
	}
	
	public function timer2callback ($sender, $param)
	{
		$this->timer2result->Text .= ($this->Timer2Value+=$this->timer2->Interval).'... ';
		if ($this->Timer2Value > 20) 
		{
			$this->timer2Value=0;			
			$this->timer2result->Text='';
			$this->timer2->stopTimer();
		}
	}

}
?>