Пример #1
0
 public bool GetInputDeviceStatus(InputDeviceType type)
 {
     _inputDevice = GetInputDevice <InputDeviceBase>(type);
     if (_inputDevice)
     {
         foreach (var part in _inputDevice.inputDevicePartList)
         {
             if (part.inputDataBase.isVaild == true)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Пример #2
0
        public void SetActiveInputDevice(InputDeviceType type, bool active)
        {
            InputDeviceBase inputDevice = GetInputDevice <InputDeviceBase>(type);

            if (inputDevice == null)
            {
                return;
            }

            SetFlag(type, active);

            if (active)
            {
                inputDevice.ModuleStart();
            }
            else
            {
                inputDevice.ModuleStop();
            }

            InputDeviceChangeCallBack?.Invoke(inputDevice, active);
        }