Пример #1
0
        void Device_ValueChange(ISoundstructureItem item, SoundstructureValueChangeEventArgs args)
        {
            if (item == this)
            {
                switch (args.CommandType)
                {
                case SoundstructureCommandType.MUTE:
                    _mute         = Convert.ToBoolean(args.Value);
                    muteValueInit = true;
                    OnMuteChange();
                    break;

                case SoundstructureCommandType.FADER:
                    if (args.CommandModifier == "min")
                    {
                        FaderMin = args.Value;
                    }
                    else if (args.CommandModifier == "max")
                    {
                        FaderMax = args.Value;
                    }
                    else
                    {
                        _Fader         = args.Value;
                        faderValueInit = true;
                    }
                    OnFaderChange();
                    break;
                }
            }
        }
Пример #2
0
 void Device_ValueChange(ISoundstructureItem item, SoundstructureValueChangeEventArgs args)
 {
     try
     {
         if (item == this)
         {
             OnFeedbackReceived(args.CommandType, args.CommandModifier, args.Value);
         }
     }
     catch (Exception e)
     {
         ErrorLog.Error("{0} Error in Device_ValueChange(): {1}", this.GetType().ToString().Split('.').Last(), e.Message);
     }
 }