summaryrefslogtreecommitdiffstats
path: root/win/C#/HandBrake.ApplicationServices/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-07-09 19:21:42 +0000
committersr55 <[email protected]>2010-07-09 19:21:42 +0000
commit094b2b9b203610939245502c89afee983219b9f9 (patch)
tree4e7255f856958f5315e765c42326d810ddb2bcfd /win/C#/HandBrake.ApplicationServices/Services
parent17392beaf07e263536d58ff96079bdf97d6469e6 (diff)
WinGui:
- Moved code from the prevent sleep into ApplicationServices instead. Makes more sense to have it there. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3432 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Encode.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
index ad5cd8c3d..1731d4851 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
@@ -193,6 +193,11 @@ namespace HandBrake.ApplicationServices.Services
this.job = encJob;
try
{
+ if (Properties.Settings.Default.preventSleep)
+ {
+ Win32.PreventSleep();
+ }
+
ResetLogReader();
IsEncoding = true;
@@ -215,8 +220,7 @@ namespace HandBrake.ApplicationServices.Services
HbProcess = Process.Start(cliStart);
this.processID = Main.GetCliProcess(before);
- if (HbProcess != null)
- this.processHandle = HbProcess.MainWindowHandle; // Set the process Handle
+ this.processHandle = HbProcess.MainWindowHandle; // Set the process Handle
// Start the Log Monitor
windowTimer = new Timer(new TimerCallback(ReadFile), null, 1000, 1000);
@@ -286,6 +290,11 @@ namespace HandBrake.ApplicationServices.Services
{
windowsSeven.SetTaskBarProgressToNoProgress();
}
+
+ if (Properties.Settings.Default.preventSleep)
+ {
+ Win32.AllowSleep();
+ }
}
/// <summary>
@@ -579,7 +588,7 @@ namespace HandBrake.ApplicationServices.Services
while (!encode.EndOfStream)
encode.ReadEncodeStatus();
- // Main.ShowExceptiowWindow("Encode Monitor Stopped", "Stopped");
+ // Main.ShowExceptiowWindow("Encode Monitor Stopped", "Stopped");
}
catch (Exception exc)
{