Exemplo n.º 1
0
        public override bool CanEnable()
        {
            CmSdk.SetControlDevice(DEVICE_INDEX.DEV_MKeys_L);

            // Doesn't seem reliable but better than nothing I suppose
            return(CmSdk.IsDevicePlug());
        }
Exemplo n.º 2
0
        public override bool TryEnable()
        {
            CmSdk.SetControlDevice(DEVICE_INDEX.DEV_MMouse_L);

            // Doesn't seem reliable but better than nothing I suppose
            try
            {
                CanUse = CmSdk.IsDevicePlug();
                if (CanUse)
                {
                    CmSdk.EnableLedControl(true);
                }
            }
            catch (Exception)
            {
                CanUse = false;
            }

            Logger.Debug("Attempted to enable Mastermouse Pro L. CanUse: {0}", CanUse);
            return(CanUse);
        }