protected override bool ExecuteCommand(Event evt, WindowState state) { if (state.IsCurrentEditingASequencerTextField()) { return(false); } var tracks = SelectionManager.SelectedTracks().ToList(); var itemGUIs = SelectionManager.SelectedClipGUI(); foreach (var itemGUI in itemGUIs) { var trackGUI = itemGUI.parent == null ? null : itemGUI.parent as TimelineTrackBaseGUI; if (trackGUI == null) { continue; } if (!tracks.Contains(trackGUI.track)) { tracks.Add(trackGUI.track); } } return(TrackAction.HandleShortcut(state, evt, tracks.ToArray())); }
public override void Init(IControl parent) { parent.KeyDown += delegate(object target, Event evt, TimelineWindow.TimelineState state) { bool result; if (state.IsEditingASubItem()) { result = base.IgnoreEvent(); } else { TimelineTrackBaseGUI trackGUI = target as TimelineTrackBaseGUI; if (trackGUI == null || trackGUI.track == null) { result = base.IgnoreEvent(); } else { bool arg_AC_0; if (!SelectionManager.SelectedTracks().Contains(trackGUI.track)) { arg_AC_0 = (from x in SelectionManager.SelectedItemGUI() select x).Any((TimelineItemGUI x) => x.parentTrackGUI == trackGUI); } else { arg_AC_0 = true; } bool flag = arg_AC_0; if (flag) { result = TrackAction.HandleShortcut(state, evt, trackGUI.track); } else { result = base.IgnoreEvent(); } } } return(result); }; }