Welcome Guest ( Login | Register )

All times are UTC - 7 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to receive BacklightTurnedOff event
PostPosted: Thu Feb 04, 2016 5:06 pm 

Joined: Fri Dec 30, 2011 11:03 am
Posts: 8

I am using a Qterm A12 panel in an outdoor environment.

When the internal temperature rises above a threshold, I want to programmatically enable the screensaver, so that the backlight will turn off after 3 minutes of non-activity. This code does that, so far, so good:

// Set backlight timeout to 180 seconds

// Set backlight to automatically turn off Core.Api.Service.ServiceContainerCF.GetService<Neo.ApplicationFramework.Interfaces.IBacklightService>().SetAutomaticallyTurnOfBacklight(true);

Then, when the internal temperature drops below another threshold, I want to programmatically turn the backlight back on and disable the screen saver. This code does that, so far, so good:

// Turn on backilight.

// Turn off screen saver

The problem I have is that when the screen is dark and the user touches it, if the user presses an area of the screen that has a button, the button action will be performed. Which was not intended, or a good thing.

To me, the soultion would be to subscribe to the public BacklightTurnedOff event, and handle accordingly, but my event handler never fires:

// Subscribe to event
Core.Api.Service.ServiceContainerCF.GetService<Neo.ApplicationFramework.Interfaces.IBacklightService>().BacklightTurnedOff += new EventHandler(BacklightOffEvent);

// Event handler.... this never fires
void BacklightOffEvent (object sender, EventArgs myEventArgs)
// Go to a blank or buttonless screen, that when pressed, returns to the
// previous screen (which was the active screen when the backlight turned off).

How can I receive the BacklightTurnedOff event? Or how, in some other way, achieve my goal that no accidental button actions be performed?


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: