summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-07-08 15:57:58 +0000
committersr55 <[email protected]>2012-07-08 15:57:58 +0000
commitaea2c5f0a32428671182a5e9d680ab4c016fce2c (patch)
tree39ae475bc274cb2ecf5099c6ddb98bc44e7d0e66 /win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
parentda44aa82136fb9423f041b200b3e40632b8287e7 (diff)
WinGui: Initial work to restore queue editing functionality. (Note, it's not complete yet)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4821 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index abcf289e5..badb64e17 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -331,6 +331,33 @@ namespace HandBrakeWPF.ViewModels
this.queueProcessor.QueueManager.RestoreQueue(dialog.FileName);
}
+ /// <summary>
+ /// Edit this Job
+ /// </summary>
+ /// <param name="task">
+ /// The task.
+ /// </param>
+ public void EditJob(QueueTask task)
+ {
+ MessageBoxResult result = this.errorService.ShowMessageBox(
+ "Are you sure you wish to edit this job?\nWARNING!!! This feature is not finished YET! Only part of the job will be copied back!!!",
+ "Modify Job?",
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+
+ if (result != MessageBoxResult.Yes)
+ {
+ return;
+ }
+
+ // Remove the job if it is not already encoding. Let the user decide if they want to cancel or not.
+ this.RemoveJob(task);
+
+ // Pass a copy of the job back to the Main Screen
+ IMainViewModel mvm = IoC.Get<IMainViewModel>();
+ mvm.EditQueueJob(new EncodeTask(task.Task));
+ }
+
#endregion
#region Methods