Пример #1
0
        private void _webAccessHost_WebCommandEvent(object sender, CommandFromWebEventArgs e)
        {
            switch (e.WebCommand)
            {
            case WebCommandEnum.VOLCHANGE:
            {
                _deviceController.VolumeSet(e.EncoderNumber, e.Volume);
            }
            break;

            case WebCommandEnum.MUTED:
            {
                _deviceController.Mute(e.EncoderNumber);
            }
            break;

            case WebCommandEnum.UNMUTED:
            {
                _deviceController.UnMute(e.EncoderNumber);
            }
            break;

            case WebCommandEnum.REBINDENCODER:
            {
                if (e.SessionProcessID <= 0)
                {
                    _deviceController.BindEncoderToDevice(e.EncoderNumber, e.DeviceBindingID);
                }
                else
                {
                    _deviceController.BindEncoderToSession(e.EncoderNumber, e.DeviceBindingID, e.SessionProcessID);
                }
            }
            break;

            default:
                break;
            }
        }