Пример #1
0
 //Event handlers
 void _xpanel_SigChange(BasicTriList currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
 {
     if (args.Event == eSigEvent.BoolChange && args.Sig.BoolValue)
     {
         if (args.Sig.Number == 42)
         {
             _tcc.DeviceHandler.CustomLedActive = !_tcc.DeviceHandler.CustomLedActive;
         }
         else if (args.Sig.Number >= 43 && args.Sig.Number <= 50)
         {
             _tcc.DeviceHandler.CustomLedColor = (Tcc2DeviceHandler.eLedColor)((args.Sig.Number - 43) + 1);
         }
         else if (args.Sig.Number >= 51 && args.Sig.Number <= 58)
         {
             _tcc.DeviceHandler.MicMuteLedColor = (Tcc2DeviceHandler.eLedColor)((args.Sig.Number - 51) + 1);
         }
         else if (args.Sig.Number >= 59 && args.Sig.Number <= 66)
         {
             _tcc.DeviceHandler.MicOnLedColor = (Tcc2DeviceHandler.eLedColor)((args.Sig.Number - 59) + 1);
         }
         else if (args.Sig.Number == 67)
         {
             _tcc.DeviceHandler.Identify = !_tcc.DeviceHandler.Identify;
         }
         else if (args.Sig.Number == 68)
         {
             _tcc.AudioHandler.Mute = !_tcc.AudioHandler.Mute;
         }
         else if (args.Sig.Number == 69)
         {
             _tcc.AudioHandler.ExclusionZoneActive = !_tcc.AudioHandler.ExclusionZoneActive;
         }
         else if (args.Sig.Number >= 70 && args.Sig.Number <= 72)
         {
             _tcc.AudioHandler.SpeakerDetectionThreshold = (Tcc2AudioHandler.eSpeakerDetectionThreshold)((args.Sig.Number - 70) + 1);
         }
     }
     else if (args.Event == eSigEvent.UShortChange)
     {
         if (args.Sig.Number == 41)
         {
             _tcc.DeviceHandler.LedBrightness = (int)((args.Sig.UShortValue / 65535.0) * 5);
         }
         if (args.Sig.Number == 45)
         {
             _tcc.AudioHandler.DanteOutputGain = args.Sig.UShortValue;
         }
     }
 }
Пример #2
0
        void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
        {
            if (Debug.Level >= 1)
            {
                Debug.Console(2, "DDVC EISC change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
            }
            var uo = args.Sig.UserObject;

            if (uo is Action <bool> )
            {
                (uo as Action <bool>)(args.Sig.BoolValue);
            }
            else if (uo is Action <ushort> )
            {
                (uo as Action <ushort>)(args.Sig.UShortValue);
            }
            else if (uo is Action <string> )
            {
                (uo as Action <string>)(args.Sig.StringValue);
            }
        }
 protected virtual void panel_SigChange(BasicTriList currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
 {
 }