diff options
author | sr55 <[email protected]> | 2013-05-19 16:49:50 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-05-19 16:49:50 +0000 |
commit | 39d5addd4f0772fe45811be4a3b1e3305785866e (patch) | |
tree | f9a07819ae96f76af0f5bdfc9c3019256b99ada3 /win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs | |
parent | 67a224af55647590e886808285132d5955ed9333 (diff) |
WinGui: Rectored some Encode/Queue service code. This restoes "Quit HandBrake" when done option.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5485 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index 79b348ae4..92f69142c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -12,10 +12,8 @@ namespace HandBrake.ApplicationServices.Services using System;
using System.Collections.Generic;
using System.ComponentModel;
- using System.Diagnostics;
using System.IO;
using System.Linq;
- using System.Windows.Forms;
using System.Xml.Serialization;
using Caliburn.Micro;
@@ -471,12 +469,6 @@ namespace HandBrake.ApplicationServices.Services // Handling Log Data
this.EncodeService.ProcessLogs(this.LastProcessedJob.Task.Destination);
- // Post-Processing
- if (e.Successful)
- {
- this.SendToApplication(this.LastProcessedJob.Task.Destination);
- }
-
// Move onto the next job.
if (this.IsProcessing)
{
@@ -491,35 +483,6 @@ namespace HandBrake.ApplicationServices.Services }
/// <summary>
- /// Perform an action after an encode. e.g a shutdown, standby, restart etc.
- /// </summary>
- private void Finish()
- {
- // Do something whent he encode ends.
- switch (this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction))
- {
- case "Shutdown":
- Process.Start("Shutdown", "-s -t 60");
- break;
- case "Log off":
- Win32.ExitWindowsEx(0, 0);
- break;
- case "Suspend":
- Application.SetSuspendState(PowerState.Suspend, true, true);
- break;
- case "Hibernate":
- Application.SetSuspendState(PowerState.Hibernate, true, true);
- break;
- case "Lock System":
- Win32.LockWorkStation();
- break;
- case "Quit HandBrake":
- Execute.OnUIThread(Application.Exit);
- break;
- }
- }
-
- /// <summary>
/// Invoke the JobProcessingStarted event
/// </summary>
/// <param name="e">
@@ -608,31 +571,6 @@ namespace HandBrake.ApplicationServices.Services // Fire the event to tell connected services.
this.InvokeQueueCompleted(EventArgs.Empty);
-
- // Run the After encode completeion work
- this.Finish();
- }
- }
-
- /// <summary>
- /// Send a file to a 3rd party application after encoding has completed.
- /// </summary>
- /// <param name="file">
- /// The file path
- /// </param>
- private void SendToApplication(string file)
- {
- if (this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.SendFile) &&
- !string.IsNullOrEmpty(this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.SendFileTo)))
- {
- string args = string.Format(
- "{0} \"{1}\"",
- this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.SendFileToArgs),
- file);
- var vlc =
- new ProcessStartInfo(
- this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.SendFileTo), args);
- Process.Start(vlc);
}
}
|