summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-05-18 20:47:53 +0100
committersr55 <[email protected]>2018-05-18 20:47:53 +0100
commitde65fd561304c553c13fe06f35796a31dd362602 (patch)
tree5f7f990e4c64624cb46868ab8e8457ad5771733f /win/CS/HandBrakeWPF/Services
parentad88c56567ea543de294f25fa59b504ddb3013a2 (diff)
WinGui: Some more backend work for the upcoming Queue redesign.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs19
1 files changed, 6 insertions, 13 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs b/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
index ffc33113f..922a4ceb4 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
@@ -14,8 +14,10 @@ namespace HandBrakeWPF.Services.Encode
using System.Globalization;
using System.IO;
+ using HandBrake.ApplicationServices.Interop.EventArgs;
using HandBrake.ApplicationServices.Model;
+ using HandBrakeWPF.Services.Encode.Interfaces;
using HandBrakeWPF.Utilities;
using EncodeCompletedEventArgs = HandBrakeWPF.Services.Encode.EventArgs.EncodeCompletedEventArgs;
@@ -78,10 +80,7 @@ namespace HandBrakeWPF.Services.Encode
public void InvokeEncodeStatusChanged(EncodeProgressEventArgs e)
{
EncodeProgessStatus handler = this.EncodeStatusChanged;
- if (handler != null)
- {
- handler(this, e);
- }
+ handler?.Invoke(this, e);
}
/// <summary>
@@ -93,10 +92,7 @@ namespace HandBrakeWPF.Services.Encode
public void InvokeEncodeCompleted(EncodeCompletedEventArgs e)
{
EncodeCompletedStatus handler = this.EncodeCompleted;
- if (handler != null)
- {
- handler(this, e);
- }
+ handler?.Invoke(this, e);
}
/// <summary>
@@ -108,10 +104,7 @@ namespace HandBrakeWPF.Services.Encode
public void InvokeEncodeStarted(System.EventArgs e)
{
EventHandler handler = this.EncodeStarted;
- if (handler != null)
- {
- handler(this, e);
- }
+ handler?.Invoke(this, e);
}
#endregion
@@ -163,7 +156,7 @@ namespace HandBrakeWPF.Services.Encode
this.WriteFile(logContent, Path.Combine(configuration.SaveLogCopyDirectory, encodeLogFile));
}
- return encodeLogFile;
+ return Path.Combine(logDir, encodeLogFile);
}
catch (Exception exc)
{