diff options
author | sr55 <[email protected]> | 2012-02-11 23:13:12 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-02-11 23:13:12 +0000 |
commit | c3077f8c91764b1e5258b802a17d086c6afc02af (patch) | |
tree | abce8ba7664b3688863c3418b2625782d2cad15c /win/CS/HandBrakeWPF/Helpers | |
parent | 1d504d557ecc008e3f7924df4181f07b793448fc (diff) |
WinGui: (WPF) Initial wire-up work on the Picture settings panel and setup the auto-nameing feature for the destination path.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4445 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers')
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs index f0b942120..589c698e2 100644 --- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs @@ -13,6 +13,8 @@ namespace HandBrakeWPF.Helpers using System.IO;
using System.Linq;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Extensions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
@@ -24,22 +26,6 @@ namespace HandBrakeWPF.Helpers public class AutoNameHelper
{
/// <summary>
- /// Backing field for the user setting service
- /// </summary>
- private static IUserSettingService userSettingService;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AutoNameHelper"/> class.
- /// </summary>
- /// <param name="userSetting">
- /// The user Setting.
- /// </param>
- public AutoNameHelper(IUserSettingService userSetting)
- {
- userSettingService = userSetting;
- }
-
- /// <summary>
/// Function which generates the filename and path automatically based on
/// the Source Name, DVD title and DVD Chapters
/// </summary>
@@ -54,6 +40,13 @@ namespace HandBrakeWPF.Helpers /// </returns>
public static string AutoName(EncodeTask task, string sourceOrLabelName)
{
+
+ IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
+ if (task.Destination == null)
+ {
+ task.Destination = string.Empty;
+ }
+
string autoNamePath = string.Empty;
if (task.Title != 0) // TODO check.
{
|