mainViewModel.LaunchHelp();\r
}\r
\r
+ // Tabs\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D1)\r
+ {\r
+ mainViewModel.SwitchTab(0);\r
+ }\r
+\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D2)\r
+ {\r
+ mainViewModel.SwitchTab(1);\r
+ }\r
+\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D3)\r
+ {\r
+ mainViewModel.SwitchTab(2);\r
+ }\r
+\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D4)\r
+ {\r
+ mainViewModel.SwitchTab(3);\r
+ }\r
+\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D5)\r
+ {\r
+ mainViewModel.SwitchTab(4);\r
+ }\r
+\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D6)\r
+ {\r
+ mainViewModel.SwitchTab(5);\r
+ }\r
+\r
+ if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.D7)\r
+ {\r
+ mainViewModel.SwitchTab(6);\r
+ }\r
+\r
if (gesture.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && gesture.Key == Key.G)\r
{\r
GC.Collect();\r
/// The e.\r
/// </param>\r
void FilesDroppedOnWindow(DragEventArgs e);\r
+\r
+ /// <summary>\r
+ /// Handle Tab Switching\r
+ /// </summary>\r
+ /// <param name="i">The Tab Number</param>\r
+ void SwitchTab(int i);\r
}\r
}
\ No newline at end of file
\r
public ISummaryViewModel SummaryViewModel { get; set; }\r
\r
+ /// <summary>\r
+ /// Active Tab.\r
+ /// </summary>\r
+ /// <remarks>\r
+ /// Should move this to the view when refactoring the keyboard shotcut handling.\r
+ /// </remarks>\r
+ public int SelectedTab { get; set; }\r
+\r
#endregion\r
\r
#region Properties\r
e.Handled = true;\r
}\r
\r
+ public void SwitchTab(int i)\r
+ {\r
+ this.SelectedTab = i;\r
+ this.NotifyOfPropertyChange(() => this.SelectedTab);\r
+ }\r
+\r
/// <summary>\r
/// The Destination Path\r
/// </summary>\r
\r
<!-- Tab Control -->\r
<TabControl Name="tabControl" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}"\r
- Grid.Row="2"\r
- Margin="15,10,10,6"\r
- HorizontalAlignment="Stretch"\r
+ Grid.Row="2" Margin="15,10,10,6"\r
+ SelectedIndex="{Binding SelectedTab}"\r
+ HorizontalAlignment="Stretch" \r
VerticalAlignment="Stretch"\r
SelectionChanged="TabControl_OnSelectionChanged"\r
Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">\r
{\r
((MainViewModel)this.DataContext).SummaryViewModel.UpdateDisplayedInfo();\r
}\r
+\r
+ this.tabControl.Focus();\r
}\r
}\r
\r
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift))); // Garbage Colleciton\r
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F1, ModifierKeys.None)), new KeyGesture(Key.F1, ModifierKeys.None))); // Help\r
\r
+\r
+ // Tabs Switching\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D1, ModifierKeys.Control)), new KeyGesture(Key.D1, ModifierKeys.Control))); \r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D2, ModifierKeys.Control)), new KeyGesture(Key.D2, ModifierKeys.Control))); \r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D3, ModifierKeys.Control)), new KeyGesture(Key.D3, ModifierKeys.Control))); \r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D4, ModifierKeys.Control)), new KeyGesture(Key.D4, ModifierKeys.Control))); \r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D5, ModifierKeys.Control)), new KeyGesture(Key.D5, ModifierKeys.Control)));\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D6, ModifierKeys.Control)), new KeyGesture(Key.D6, ModifierKeys.Control)));\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.D7, ModifierKeys.Control)), new KeyGesture(Key.D7, ModifierKeys.Control)));\r
+\r
+\r
// Enable Windows 7 Taskbar progress indication.\r
if (this.TaskbarItemInfo == null)\r
{\r