コード例 #1
0
        public LaunchpadInfo(Launchpad launchpad)
        {
            InitializeComponent();

            _launchpad      = launchpad;
            _launchpad.Info = this;

            this.Get <TextBlock>("Name").Text = _launchpad.Name.Trim();

            Rotation.SelectedIndex            = (int)_launchpad.Rotation;
            InputFormatSelector.SelectedIndex = (int)_launchpad.InputFormat;

            Popout.IsVisible = _launchpad.Window == null;

            if (_launchpad.GetType() != typeof(Launchpad))
            {
                Reconnect.IsVisible       = false;
                Rotation.IsHitTestVisible = InputFormatSelector.IsHitTestVisible = false;
                Rotation.Opacity          = InputFormatSelector.Opacity = 0;
            }

            if (_launchpad is VirtualLaunchpad vlp)
            {
                LockToggle.IsVisible = true;
                LockToggle.SetState(Preferences.VirtualLaunchpads.Contains(vlp.VirtualIndex));
            }

            if (_launchpad is AbletonLaunchpad alp)
            {
                TargetPortSelector.IsVisible = true;
                TargetPortSelector.Update(alp.Target);
            }
        }
コード例 #2
0
        public TrackInfo(Track track)
        {
            InitializeComponent();

            _track = track;

            Deselect();

            Rename = new RenameManager(this);

            Rename.UpdateText();
            _track.ParentIndexChanged += UpdateText;

            PortSelector.Update(_track.Launchpad);

            DragDrop = new DragDropManager(this);

            SetEnabled();
        }