Esempio n. 1
0
        private void Stop()
        {
            if (helper != null)
            {
                helper.UserDetected -= OnUserDetected;
                helper.Finish();
                helper = null;
            }

            timer.Stop();
        }
Esempio n. 2
0
        protected override void OnResumeSuspend()
        {
            TerminalServer wts = Component <TerminalServer>();

            if (wts.ConsoleActive && !wts.ConsoleLocked)
            {
                //= keine Kennworteingabe nach dem Aufwachen

                try
                {
                    helper = new SessionHelperInvocation(Component <SessionHelper>());
                    helper.UserDetected += OnUserDetected;
                }
                catch (Exception e)
                {
                    EventLog.WriteEntry(e.ToString(), EventLogEntryType.Error, 2);

                    return;
                }
            }

            timer.Start();
        }