Exemplo n.º 1
0
        /* Power mode event handler */
        void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)
        {
            // We need to handle sleeping(and other related events)
            // This is so we never lose the lock on the touchpad hardware.
            switch (e.Reason)
            {
            case SessionSwitchReason.SessionLogon:
            case SessionSwitchReason.SessionUnlock:
                SynDevCtrl.Deactivate();
                SynCtrl.Deactivate();
                initTouchpad();
                break;

            default:
                break;
            }
        }