コード例 #1
0
        /// <summary>
        /// Adds range of tracks to selection, from anchor to given target.
        /// Handles selecting a track, taking into account selecting ranges of tracks.</summary>
        /// <param name="target">Track as TimelinePath</param>
        protected virtual void SelectTracks(TimelinePath target)
        {
            // add range of tracks, from anchor to target?
            if ((Control.ModifierKeys & Keys.Shift) != Keys.None)
            {
                if (Anchor != null && Anchor.Last is ITrack && SelectionContext != null)
                {
                    SelectionContext.SetRange(GetRangeOfTracks(Anchor, target));
                    return;
                }
            }

            // simply add this target track, using the current modifier keys to determine how
            Owner.Select <ITrack>(target);
        }
コード例 #2
0
        /// <summary>
        /// Adds range of groups to selection, from anchor to given target.
        /// Handles selecting a group, taking into account selecting ranges of groups.
        /// If no anchor, just selects target.</summary>
        /// <param name="target">Timeline path</param>
        protected virtual void SelectGroups(TimelinePath target)
        {
            // Add range of groups, from anchor to target? Holding down Ctrl or Alt simultaneously
            //  still does a range selection in Visual Studio's Solution Explorer.
            if ((Control.ModifierKeys & Keys.Shift) != Keys.None)
            {
                if (Anchor != null && Anchor.Last is IGroup && SelectionContext != null)
                {
                    SelectionContext.SetRange(GetRangeOfGroups(Anchor, target));
                    return;
                }
            }

            // simply add this target group, using the current modifier keys to determine how
            Owner.Select <IGroup>(target);
        }