Exemple #1
0
        /// <summary>
        /// AuthenticatedSubPageManager constructor
        /// </summary>
        /// <param name="authenticateCallback">Callback function to authenticateCallback</param>
        /// <param name="panel">The panel Auth manager has to link</param>
        /// <param name="lockPage">Instance of the PinLockSubPage class to collect auth info</param>
        /// <param name="inactivityTime">Amount of time of inactivity to automaticaly lock the panel, in milliseconds</param>
        /// <param name="subPages">List of other subpages this SubPage manager shall manage</param>
        public AuthenticatedSubPageManager(AuthenticateCallback authenticateCallback, BasicTriListWithSmartObject panel, PinLockSubPage lockPage, long inactivityTime, List <SubPage> subPages)
            : base(panel, subPages)
        {
            _authenticateCallback  = authenticateCallback;
            _lockPage              = lockPage;
            _lockPage.Panel        = panel;
            _lockPage.Authenticate = new Func <ushort, bool>(pageAuthenticateCallback);

            _inactivityTime  = inactivityTime;
            _inactivityTimer = new CTimer(inactivityTimerCallback, Timeout.Infinite);

            AuthenticatedLevel = AuthenticatedLevel.None;

            panel.SigChange += new SigEventHandler(activityDetectionHandler);
            foreach (var kv in panel.SmartObjects)
            {
                kv.Value.SigChange += new SmartObjectSigChangeEventHandler(activityDetectionHandler);
            }
        }
Exemple #2
0
 /// <summary>
 /// AuthenticatedSubPageManager constructor
 /// </summary>
 /// <param name="authenticateCallback">Callback function to authenticateCallback</param>
 /// <param name="panel">The panel Auth manager has to link</param>
 /// <param name="lockPage">Instance of the PinLockSubPage class to collect auth info</param>
 /// <param name="inactivityTime">Amount of time of inactivity to automaticaly lock the panel, in milliseconds</param>
 public AuthenticatedSubPageManager(AuthenticateCallback authenticateCallback, BasicTriListWithSmartObject panel, PinLockSubPage lockPage, long inactivityTime)
     : this(authenticateCallback, panel, lockPage, inactivityTime, new List <SubPage>())
 {
 }