Exemple #1
0
        void StateChangeEvent(DisplayStateObjects arg1, IBasicVideoDisplay arg2, byte arg3)
        {
            switch (arg1)
            {
            case DisplayStateObjects.Audio:
                CrestronConsole.PrintLine("Audio RX Event.");
                break;

            case DisplayStateObjects.Connection:
                CrestronConsole.PrintLine("Connection RX Event.");
                break;

            case DisplayStateObjects.Input:
                CrestronConsole.PrintLine("input RX Event.");
                break;

            case DisplayStateObjects.LampHours:
                CrestronConsole.PrintLine("lamp hour RX Event.");
                break;

            case DisplayStateObjects.Power:
                CrestronConsole.PrintLine("power RX Event.");
                break;

            default:
                CrestronConsole.PrintLine("unknown RX Event.");
                break;
            }
        }
        private void DisplayStateChange(DisplayStateObjects state, IBasicVideoDisplay device, byte arg3)
        {
            switch (state)
            {
            case DisplayStateObjects.Audio:
                _panel.UShortInput[(uint)PanelAnalogSignals.VolumeValue].UShortValue  = (ushort)device.VolumePercent;
                _panel.StringInput[(uint)PanelSerialSignals.MuteFeedback].StringValue = device.Muted ? "On" : "Off";
                break;

            case DisplayStateObjects.Connection:
                _panel.StringInput[(uint)PanelSerialSignals.ConnectionFeedback].StringValue = device.Connected ? "Connected" : "Disconnected";
                break;

            case DisplayStateObjects.Input:
                _panel.StringInput[(uint)PanelSerialSignals.InputFeedback].StringValue = device.InputSource.Description;
                break;

            case DisplayStateObjects.Power:
                _panel.StringInput[(uint)PanelSerialSignals.PowerFeedback].StringValue = device.PowerIsOn ? "On" : "Off";
                break;
            }
        }