summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Base
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-01-26 16:21:27 +0000
committersr55 <[email protected]>2013-01-26 16:21:27 +0000
commit97d4f114df3e35c559e7f1564a542631b55f2845 (patch)
treeaa31b44c0f5fbc952c1648edcf76107a8959874a /win/CS/HandBrake.ApplicationServices/Services/Base
parent5aa8001465c0e94ac2470969613042bff221c6d4 (diff)
WinGui: Code Tidyup.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5206 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Base')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs43
1 files changed, 28 insertions, 15 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
index 67cad52e5..866edb794 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Base/EncodeBase.cs
@@ -15,6 +15,8 @@ namespace HandBrake.ApplicationServices.Services.Base
using System.Text;
using System.Text.RegularExpressions;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Model;
@@ -150,11 +152,15 @@ namespace HandBrake.ApplicationServices.Services.Base
/// </param>
public void InvokeEncodeStatusChanged(EncodeProgressEventArgs e)
{
- EncodeProgessStatus handler = this.EncodeStatusChanged;
- if (handler != null)
- {
- handler(this, e);
- }
+ Execute.OnUIThread(
+ () =>
+ {
+ EncodeProgessStatus handler = this.EncodeStatusChanged;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
+ });
}
/// <summary>
@@ -165,11 +171,15 @@ namespace HandBrake.ApplicationServices.Services.Base
/// </param>
public void InvokeEncodeCompleted(EncodeCompletedEventArgs e)
{
- EncodeCompletedStatus handler = this.EncodeCompleted;
- if (handler != null)
- {
- handler(this, e);
- }
+ Execute.OnUIThread(
+ () =>
+ {
+ EncodeCompletedStatus handler = this.EncodeCompleted;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
+ });
}
/// <summary>
@@ -180,11 +190,14 @@ namespace HandBrake.ApplicationServices.Services.Base
/// </param>
public void InvokeEncodeStarted(EventArgs e)
{
- EventHandler handler = this.EncodeStarted;
- if (handler != null)
- {
- handler(this, e);
- }
+ Execute.OnUIThread(() =>
+ {
+ EventHandler handler = this.EncodeStarted;
+ if (handler != null)
+ {
+ handler(this, e);
+ }
+ });
}
#endregion