summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-02-10 21:22:53 +0000
committersr55 <[email protected]>2018-02-10 21:22:53 +0000
commit6b4325cfd832590c54863c688262e4a923717486 (patch)
tree0accf6bbd23a4e01313a617f8c3f4b7f98058f3f /win/CS/HandBrakeWPF/ViewModels
parent0a9ed4041460e099a714059148a4f844125aa64d (diff)
WinGui: New shortcuts for easier accessibility. Ctrl 1 through 7 activate given tabs and set focus to allow easier tab navigation of the guil
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs14
2 files changed, 20 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
index 19b1c0001..6b02a9a46 100644
--- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
@@ -112,5 +112,11 @@ namespace HandBrakeWPF.ViewModels.Interfaces
/// The e.
/// </param>
void FilesDroppedOnWindow(DragEventArgs e);
+
+ /// <summary>
+ /// Handle Tab Switching
+ /// </summary>
+ /// <param name="i">The Tab Number</param>
+ void SwitchTab(int i);
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 68b59817e..5fa5df576 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -296,6 +296,14 @@ namespace HandBrakeWPF.ViewModels
public ISummaryViewModel SummaryViewModel { get; set; }
+ /// <summary>
+ /// Active Tab.
+ /// </summary>
+ /// <remarks>
+ /// Should move this to the view when refactoring the keyboard shotcut handling.
+ /// </remarks>
+ public int SelectedTab { get; set; }
+
#endregion
#region Properties
@@ -1812,6 +1820,12 @@ namespace HandBrakeWPF.ViewModels
e.Handled = true;
}
+ public void SwitchTab(int i)
+ {
+ this.SelectedTab = i;
+ this.NotifyOfPropertyChange(() => this.SelectedTab);
+ }
+
/// <summary>
/// The Destination Path
/// </summary>