Darren
27 Sep 05, 04:15 PM
This post describes how to implement a "screen saver" in the Colour C-Touch to display a series of photos when the unit hasn't been used for a while.
The steps are :
1. Create a series of "photo pages", each with a photo placed on it with a link back to the time-out page. Ideally the photos should be 640 x 480.
2. Add the following logic code
3. Update the logic to :
- use different timer numbers if needed
- change the time-out periods if desired
- add or remove pages as required
- change the name of the "Main Page" if needed
{ constants section }
{ These are the two timers used by the Screen Saver }
ssTimeOutTimer = 1;
ssPageTimer = 2;
{ module }
{ This module implements a "Screen Saver".
A timer is started when the page changes to the main page.
When the timer gets to 1 minute, the "photo" pages
are displayed in sequence. }
{ Main page has been selected.
Start timer. }
once ShowingPage("Main Page") then
begin
TimerStart(ssTimeOutTimer);
TimerStop(ssPageTimer);
end;
{ Main page has been de-selected.
Stop timer. }
once not ShowingPage("Main Page") then
TimerStop(ssTimeOutTimer);
{ Main page timer has expired.
Show first photo page. }
if TimerTime(ssTimeOutTimer) = "00:01:00" then
begin
ShowPage("Photo Page 1");
TimerStart(ssPageTimer);
end;
{ Photo page timer has expired.
Show next photo page. }
if TimerTime(ssPageTimer) = "00:00:10" then
begin
TimerStart(ssPageTimer);
if ShowingPage("Photo Page 1") then
ShowPage("Photo Page 2")
else if ShowingPage("Photo Page 2") then
ShowPage("Photo Page 3")
else if ShowingPage("Photo Page 3") then
ShowPage("Photo Page 4")
else if ShowingPage("Photo Page 4") then
ShowPage("Photo Page 5")
else if ShowingPage("Photo Page 5") then
ShowPage("Photo Page 6")
else if ShowingPage("Photo Page 6") then
ShowPage("Photo Page 1");
end;
The steps are :
1. Create a series of "photo pages", each with a photo placed on it with a link back to the time-out page. Ideally the photos should be 640 x 480.
2. Add the following logic code
3. Update the logic to :
- use different timer numbers if needed
- change the time-out periods if desired
- add or remove pages as required
- change the name of the "Main Page" if needed
{ constants section }
{ These are the two timers used by the Screen Saver }
ssTimeOutTimer = 1;
ssPageTimer = 2;
{ module }
{ This module implements a "Screen Saver".
A timer is started when the page changes to the main page.
When the timer gets to 1 minute, the "photo" pages
are displayed in sequence. }
{ Main page has been selected.
Start timer. }
once ShowingPage("Main Page") then
begin
TimerStart(ssTimeOutTimer);
TimerStop(ssPageTimer);
end;
{ Main page has been de-selected.
Stop timer. }
once not ShowingPage("Main Page") then
TimerStop(ssTimeOutTimer);
{ Main page timer has expired.
Show first photo page. }
if TimerTime(ssTimeOutTimer) = "00:01:00" then
begin
ShowPage("Photo Page 1");
TimerStart(ssPageTimer);
end;
{ Photo page timer has expired.
Show next photo page. }
if TimerTime(ssPageTimer) = "00:00:10" then
begin
TimerStart(ssPageTimer);
if ShowingPage("Photo Page 1") then
ShowPage("Photo Page 2")
else if ShowingPage("Photo Page 2") then
ShowPage("Photo Page 3")
else if ShowingPage("Photo Page 3") then
ShowPage("Photo Page 4")
else if ShowingPage("Photo Page 4") then
ShowPage("Photo Page 5")
else if ShowingPage("Photo Page 5") then
ShowPage("Photo Page 6")
else if ShowingPage("Photo Page 6") then
ShowPage("Photo Page 1");
end;