void OnShortcutCommandExecuted(object sender, ExecutedRoutedEventArgs e) { var tabData = e.Parameter as OpenTabItemData; if (tabData != null) { this.SelectedItem = tabData; if (tabData.SubMode != null) { var manager = ShortcutManager.GetInstance(this); if (manager != null) { manager.PushUISubMode(tabData.SubMode); } } } }
void OnTabShortcutExecuted(object sender, ExecutedRoutedEventArgs e) { var data = e.Parameter as LayoutInstance; if (data != null) { this.SelectedItem = data; var shortcutManager = ShortcutManager.GetInstance(this); if (shortcutManager != null) { shortcutManager.PushUISubMode("ViewSelect"); shortcutManager.AreShortcutAdornmentsVisible = true; } e.Handled = true; } }
void OnShortcutCommandExecuted(object sender, ExecutedRoutedEventArgs e) { var tabData = e.Parameter as FileTabDefinition; bool leaveShortcutMode = false; if (tabData != null) { if (tabData.Command != null) { tabData.Command.Execute(tabData.CommandParameter); leaveShortcutMode = true; } else { this.SelectedItem = tabData; if (tabData.SubMode != null) { var manager = ShortcutManager.GetInstance(this); if (manager != null) { manager.PushUISubMode(tabData.SubMode); } } else { leaveShortcutMode = true; } } if (leaveShortcutMode) { var toolsWindow = this.FindParent <ToolsUIWindow>(); if (toolsWindow != null) { toolsWindow.LeaveShortcutMode(); } } } }