diff options
author | sr55 <[email protected]> | 2013-01-20 14:21:58 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-01-20 14:21:58 +0000 |
commit | 98749c2316335055e1742b205cb627255ca3d71a (patch) | |
tree | 7058caef3226fa8d03ed455ab69f7e47a8cea225 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | |
parent | fc81b3961c7ff05d7378527428e674ea233f38cd (diff) |
WinGui: Just some prototype code for safe keeping. Not currently used.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5185 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 2db2c66c7..1d4d0e7ed 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1034,6 +1034,38 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// The add selection to queue.
+ /// </summary>
+ public void AddSelectionToQueue()
+ {
+ if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)
+ {
+ this.errorService.ShowMessageBox("You must first scan a source and setup your job before adding to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ if (!AutoNameHelper.IsAutonamingEnabled())
+ {
+ this.errorService.ShowMessageBox("You must turn on automatic file naming in preferences before you can add to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(QueueSelectionViewModel));
+ IQueueSelectionViewModel viewModel = IoC.Get<IQueueSelectionViewModel>();
+
+ viewModel.Setup(this.ScannedSource, this.SourceName);
+
+ if (window != null)
+ {
+ window.Activate();
+ }
+ else
+ {
+ this.WindowManager.ShowWindow(viewModel);
+ }
+ }
+
+ /// <summary>
/// Folder Scan
/// </summary>
public void FolderScan()
|