mainViewModel.AddToQueue();\r
}\r
\r
- // Scan a File (Ctrl+F)\r
- if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.F)\r
+ // Scan a File (Alt+O)\r
+ if (gesture.Modifiers == ModifierKeys.Alt && gesture.Key == Key.O)\r
{\r
- mainViewModel.FileScan();\r
- MessageBox.Show("Please use Ctrl-O in future. Ctrl-F is being deprecated in favour of something more standard. :)");\r
+ mainViewModel.SelectSourceWindow();\r
}\r
\r
+ // Scan a File (Ctrl+O)\r
if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.O)\r
{\r
mainViewModel.FileScan();\r
}\r
\r
- // Scan a Folder (Ctrl+R)\r
- if (gesture.Modifiers == ModifierKeys.Control && gesture.Key == Key.R)\r
+ // Scan a Folder (Ctrl+Shift+O)\r
+ if (gesture.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && gesture.Key == Key.O)\r
{\r
mainViewModel.FolderScan();\r
}\r
\r
private string alertWindowText;\r
\r
+ private bool hasSource;\r
+\r
#endregion\r
\r
/// <summary>\r
this.CurrentTask = new EncodeTask();\r
this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;\r
this.ScannedSource = new Source();\r
+ this.HasSource = false;\r
\r
// Setup Events\r
this.scanService.ScanStared += this.ScanStared;\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Gets or sets a value indicating whether has source.\r
+ /// </summary>\r
+ public bool HasSource\r
+ {\r
+ get\r
+ {\r
+ return this.hasSource;\r
+ }\r
+ set\r
+ {\r
+ if (value.Equals(this.hasSource))\r
+ {\r
+ return;\r
+ }\r
+ this.hasSource = value;\r
+ this.NotifyOfPropertyChange(() => this.HasSource);\r
+ }\r
+ }\r
+\r
#endregion\r
\r
#region Load and Shutdown Handling\r
{\r
this.NotifyOfPropertyChange(() => this.ScannedSource);\r
this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);\r
+ this.HasSource = true;\r
this.SelectedTitle = this.ScannedSource.Titles.FirstOrDefault(t => t.MainTitle) ?? this.ScannedSource.Titles.FirstOrDefault();\r
}\r
else\r
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"\r
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"\r
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"\r
- xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"\r
AllowDrop="True"\r
FontSize="11"\r
Micro:Message.Attach="[Event Loaded] = [Action Load]"\r
</StackPanel>\r
\r
<!-- Main Body -->\r
- <Grid Grid.Row="1" IsEnabled="{Binding ShowSourceSelection, Converter={StaticResource booleanConverter}, ConverterParameter=true}">\r
+ <Grid Grid.Row="1" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}">\r
<Grid.ColumnDefinitions>\r
<ColumnDefinition Width="*" MinWidth="700"/>\r
<ColumnDefinition Width="Auto" />\r
this.StateChanged += this.ShellViewStateChanged;\r
}\r
\r
- // Start Encode (Ctrl+S)\r
- // Stop Encode (Ctrl+K)\r
- // Open Log Window (Ctrl+L)\r
- // Open Queue Window (Ctrl+Q)\r
- // Add to Queue (Ctrl+A)\r
- // Scan a File (Ctrl+F)\r
- // Scan a Folder (Ctrl+R)\r
-\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.L, ModifierKeys.Control)), new KeyGesture(Key.L, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F, ModifierKeys.Control)), new KeyGesture(Key.F, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.R, ModifierKeys.Control)), new KeyGesture(Key.R, ModifierKeys.Control)));\r
- this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)));\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.S, ModifierKeys.Control)), new KeyGesture(Key.S, ModifierKeys.Control))); // Start Encode\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.K, ModifierKeys.Control)), new KeyGesture(Key.K, ModifierKeys.Control))); // Stop Encode\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.L, ModifierKeys.Control)), new KeyGesture(Key.L, ModifierKeys.Control))); // Open Log Window\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.Q, ModifierKeys.Control)), new KeyGesture(Key.Q, ModifierKeys.Control))); // Open Queue Window\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.A, ModifierKeys.Control)), new KeyGesture(Key.A, ModifierKeys.Control))); // Add to Queue\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control)), new KeyGesture(Key.O, ModifierKeys.Control))); // File Scan\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Alt)), new KeyGesture(Key.O, ModifierKeys.Alt))); // Scan Window\r
+ this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.O, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.O, ModifierKeys.Control | ModifierKeys.Shift))); // Scan a Folder\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
\r
// Enable Windows 7 Taskbar progress indication.\r
if (this.TaskbarItemInfo == null)\r