Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: custom Screensaver
PostPosted: Tue Jul 15, 2014 8:25 am 

Joined: Thu Oct 31, 2013 9:58 am
Posts: 1

Offline
Hello;
i have QTERM-A7 and i want to make a custom screensaver. activated if there is no one touches the screen. let say a timer of 5 min. :geek: Thank you


 Profile  
 
 Post subject: Re: custom Screensaver
PostPosted: Mon Apr 02, 2018 4:10 pm 

Joined: Mon Nov 20, 2017 5:29 pm
Posts: 43

Offline
Hey alialrikabi,

The best way to do this would be to create a custom screen that you launch, after the inactivity timer reaches some number. You could create an inactivity script that opens the page after x time. Here is an inactivity script example:

namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;


public partial class Inactivity_Script
{
private static System.Windows.Forms.Timer _timer;
private int _mouseX = -1;
private int _mouseY = -1;
private int _mouseMoved;

private void TimerTick(Object sender, EventArgs e)
{
var x = System.Windows.Forms.Control.MousePosition.X;
var y = System.Windows.Forms.Control.MousePosition.Y;

if( ( Math.Abs(_mouseX-x) > 5 ) || ( Math.Abs(_mouseY-y) > 5 ) )
{
_mouseMoved=0;
try
{
Globals.NetControl.EnableEthernet(1);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error!! Could not Resume Communications");
}
}
else
{
_mouseMoved++;

var inactivityTimeout = Globals.Tags.System_InactivityTimeBeforeLogout.Value;

if((inactivityTimeout>0) && (_mouseMoved > inactivityTimeout))
{
try
{
Globals.NetControl.DisableEthernet(1);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error!! Could not Halt Communications");
}
}
}
_mouseX = x;
_mouseY = y;
}

void Scriptmodule_Created(System.Object sender, System.EventArgs e)
{
// Set up timer that monitors if the mouse has moved
_timer = new System.Windows.Forms.Timer {Interval = 1000};
_timer.Tick += TimerTick;
_timer.Enabled = true;
}
}
}

_________________
Thanks,

Chris
Beijer Support
(801)708-6690


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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: