Пример #1
0
        public MpcUIController(SystemBase system, RoomBase defaultRoom)
            : base(system, system.ControlSystem.MPC3x201TouchscreenSlot, defaultRoom)
        {
            var mpc = system.ControlSystem.MPC3x201TouchscreenSlot;

            mpc.Register();

            _sourceButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 5) },
                { 2, new UIButton(this, 6) }
            };

            _chanButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 7) },
                { 2, new UIButton(this, 10) }
            };

            _audioButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 8) },
                { 2, new UIButton(this, 9) }
            };

            _sourceButtons.ButtonEvent += SourceButtonsOnButtonEvent;
            _chanButtons.ButtonEvent   += ChanButtonsOnButtonEvent;
            _audioButtons.ButtonEvent  += AudioButtonsOnButtonEvent;
            _powerBtn              = new UIButton(this, 10);
            _powerBtn.ButtonEvent += PowerBtnOnButtonEvent;
            _level = new MpcVolume(mpc);
            ((ASystem)system).Dsp.HasIntitialized += DspOnHasIntitialized;
        }
Пример #2
0
        public MpcUIController(SystemBase system, BasicTriList comms, RoomBase defaultRoom)
            : base(system, comms, defaultRoom)
        {
            _sourceButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 1) },
                { 2, new UIButton(this, 2) },
                { 3, new UIButton(this, 4) },
            };

            _chanButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 3) },
                { 2, new UIButton(this, 6) }
            };

            _sourceButtons.ButtonEvent += SourceButtonsOnButtonEvent;
            _chanButtons.ButtonEvent   += ChanButtonsOnButtonEvent;
            _powerBtn              = new UIButton(this, 10);
            _powerBtn.ButtonEvent += PowerBtnOnButtonEvent;
            _level = new MpcVolume(this);
            ((ASystem)system).Dsp.HasIntitialized += DspOnHasIntitialized;
        }