summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs27
-rw-r--r--win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj3
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs23
-rw-r--r--win/CS/HandBrake.ApplicationServices/ServicesWindsorInstaller.cs1
-rw-r--r--win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs2
-rw-r--r--win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs2
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj2
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs2
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs2
-rw-r--r--win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs4
-rw-r--r--win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs2
-rw-r--r--win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs (renamed from win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs)2
-rw-r--r--win/CS/HandBrakeWPF/Services/UpdateService.cs2
-rw-r--r--win/CS/HandBrakeWPF/Services/UserSettingService.cs (renamed from win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs)9
-rw-r--r--win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs1
-rw-r--r--win/CS/HandBrakeWPF/UserSettingConstants.cs9
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs7
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs95
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs1
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml.cs1
27 files changed, 107 insertions, 105 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs b/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
deleted file mode 100644
index bea0a8844..000000000
--- a/win/CS/HandBrake.ApplicationServices/ASUserSettingConstants.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="ASUserSettingConstants.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// The User Setting Constants
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices
-{
- /// <summary>
- /// Constants for the User Settings Service
- /// </summary>
- public class ASUserSettingConstants
- {
- /// <summary>
- /// HandBrakes build
- /// </summary>
- public const string HandBrakeBuild = "HandBrakeBuild";
-
- /// <summary>
- /// Clear completed items from the queue automatically.
- /// </summary>
- public const string ClearCompletedFromQueue = "ClearCompletedFromQueue";
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index e9386ac37..6110c187d 100644
--- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -143,13 +143,10 @@
<Compile Include="Services\Interfaces\IQueueProcessor.cs" />
<Compile Include="Services\Interfaces\IScan.cs" />
<Compile Include="Services\Interfaces\IPresetService.cs" />
- <Compile Include="Services\Interfaces\IUserSettingService.cs" />
<Compile Include="Services\LibEncode.cs" />
<Compile Include="Services\LibScan.cs" />
<Compile Include="Services\PresetService.cs" />
<Compile Include="Services\QueueProcessor.cs" />
- <Compile Include="Services\UserSettingService.cs" />
- <Compile Include="ASUserSettingConstants.cs" />
<Compile Include="Utilities\AppcastReader.cs" />
<Compile Include="Utilities\CharCodesUtilities.cs" />
<Compile Include="Utilities\GeneralUtilities.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
index f1ba5c7fe..8fb61109a 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
@@ -173,7 +173,10 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
/// Starts encoding the first job in the queue and continues encoding until all jobs
/// have been encoded.
/// </summary>
- void Start();
+ /// <param name="clearCompleted">
+ /// The clear Completed.
+ /// </param>
+ void Start(bool clearCompleted);
#endregion
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index 1ade60d74..43c11a9bf 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -42,14 +42,14 @@ namespace HandBrake.ApplicationServices.Services
private readonly BindingList<QueueTask> queue = new BindingList<QueueTask>();
/// <summary>
- /// The User Setting Service
+ /// HandBrakes Queue file with a place holder for an extra string.
/// </summary>
- private readonly IUserSettingService userSettingService;
+ private readonly string queueFile;
/// <summary>
- /// HandBrakes Queue file with a place holder for an extra string.
+ /// The clear completed.
/// </summary>
- private readonly string queueFile;
+ private bool clearCompleted;
#endregion
@@ -61,15 +61,11 @@ namespace HandBrake.ApplicationServices.Services
/// <param name="encodeService">
/// The encode Service.
/// </param>
- /// <param name="userSettingService">
- /// The user Setting Service.
- /// </param>
/// <exception cref="ArgumentNullException">
/// Services are not setup
/// </exception>
- public QueueProcessor(IEncodeServiceWrapper encodeService, IUserSettingService userSettingService)
+ public QueueProcessor(IEncodeServiceWrapper encodeService)
{
- this.userSettingService = userSettingService;
this.EncodeService = encodeService;
// If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
@@ -436,13 +432,18 @@ namespace HandBrake.ApplicationServices.Services
/// Starts encoding the first job in the queue and continues encoding until all jobs
/// have been encoded.
/// </summary>
- public void Start()
+ /// <param name="isClearCompleted">
+ /// The is Clear Completed.
+ /// </param>
+ public void Start(bool isClearCompleted)
{
if (this.IsProcessing)
{
throw new Exception("Already Processing the Queue");
}
+ clearCompleted = isClearCompleted;
+
this.EncodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted;
this.EncodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
@@ -472,7 +473,7 @@ namespace HandBrake.ApplicationServices.Services
this.LastProcessedJob.Status = QueueItemStatus.Completed;
// Clear the completed item of the queue if the setting is set.
- if (this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.ClearCompletedFromQueue))
+ if (clearCompleted)
{
this.ClearCompleted();
}
diff --git a/win/CS/HandBrake.ApplicationServices/ServicesWindsorInstaller.cs b/win/CS/HandBrake.ApplicationServices/ServicesWindsorInstaller.cs
index b787aa18b..2ffd29046 100644
--- a/win/CS/HandBrake.ApplicationServices/ServicesWindsorInstaller.cs
+++ b/win/CS/HandBrake.ApplicationServices/ServicesWindsorInstaller.cs
@@ -31,7 +31,6 @@ namespace HandBrake.ApplicationServices
{
container.Register(Component.For<IPresetService>().ImplementedBy<PresetService>());
container.Register(Component.For<IQueueProcessor>().ImplementedBy<QueueProcessor>());
- container.Register(Component.For<IUserSettingService>().ImplementedBy<UserSettingService>());
}
#endregion
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
index eecb25890..2dd2e82d8 100644
--- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
@@ -23,6 +23,8 @@ namespace HandBrakeWPF.Converters.Video
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
+ using HandBrakeWPF.Services.Interfaces;
+
/// <summary>
/// Video Encoder Converter
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
index 86f061eca..8be9bcd41 100644
--- a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
+++ b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
@@ -14,6 +14,8 @@ namespace HandBrakeWPF.Factories
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Services.Interfaces;
+
/// <summary>
/// HBConfiguration Factory
/// </summary>
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index d6eb10641..5e8ab59c2 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -141,6 +141,8 @@
<Compile Include="Controls\SplitButton\SplitMenuButton.cs" />
<Compile Include="Converters\Video\ScalingConverter.cs" />
<Compile Include="Factories\HBConfigurationFactory.cs" />
+ <Compile Include="Services\Interfaces\IUserSettingService.cs" />
+ <Compile Include="Services\UserSettingService.cs" />
<Compile Include="ViewModels\CountdownAlertViewModel.cs" />
<Compile Include="ViewModels\Interfaces\ICountdownAlertViewModel.cs" />
<Compile Include="Views\CountdownAlertView.xaml.cs">
diff --git a/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs b/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
index 9b67f97e2..556cf53b4 100644
--- a/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/AppStyleHelper.cs
@@ -15,6 +15,8 @@ namespace HandBrakeWPF.Helpers
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Services.Interfaces;
+
/// <summary>
/// The AppStyle Helper.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
index 8c4032466..e9e4d0278 100644
--- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
@@ -21,6 +21,8 @@ namespace HandBrakeWPF.Helpers
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
+ using HandBrakeWPF.Services.Interfaces;
+
/// <summary>
/// The Destination AutoName Helper
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs b/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs
index 0060b1d15..ede46fa8b 100644
--- a/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs
@@ -85,7 +85,7 @@ namespace HandBrakeWPF.Helpers
int buildValue;
int.TryParse(build, out buildValue);
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeBuild, buildValue);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakeBuild, buildValue);
success = true;
}
}
@@ -109,7 +109,7 @@ namespace HandBrakeWPF.Helpers
}
catch (Exception e)
{
- userSettingService.SetUserSetting(ASUserSettingConstants.HandBrakeBuild, 0);
+ userSettingService.SetUserSetting(UserSettingConstants.HandBrakeBuild, 0);
userSettingService.SetUserSetting(UserSettingConstants.HandBrakeExeHash, string.Empty);
errorService.ShowError(
diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
index 254ccefb9..b8d715ede 100644
--- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
+++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
@@ -19,6 +19,8 @@ namespace HandBrakeWPF.Services
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Services.Interfaces;
+
using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;
using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs b/win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs
index bf6cb9c91..d2f433bc1 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IUserSettingService.cs
+++ b/win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs
@@ -7,7 +7,7 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
-namespace HandBrake.ApplicationServices.Services.Interfaces
+namespace HandBrakeWPF.Services.Interfaces
{
using HandBrake.ApplicationServices.EventArgs;
diff --git a/win/CS/HandBrakeWPF/Services/UpdateService.cs b/win/CS/HandBrakeWPF/Services/UpdateService.cs
index b95a1d862..41135743b 100644
--- a/win/CS/HandBrakeWPF/Services/UpdateService.cs
+++ b/win/CS/HandBrakeWPF/Services/UpdateService.cs
@@ -92,7 +92,7 @@ namespace HandBrakeWPF.Services
: Constants.Appcast32;
var currentBuild =
- this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild);
+ this.userSettingService.GetUserSetting<int>(UserSettingConstants.HandBrakeBuild);
var skipBuild = this.userSettingService.GetUserSetting<int>(
UserSettingConstants.Skipversion);
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
index 7f40bffff..6b7df3d85 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs
+++ b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
@@ -7,7 +7,7 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
-namespace HandBrake.ApplicationServices.Services
+namespace HandBrakeWPF.Services
{
using System;
using System.Collections.Specialized;
@@ -19,7 +19,8 @@ namespace HandBrake.ApplicationServices.Services
using HandBrake.ApplicationServices.Collections;
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Exceptions;
- using HandBrake.ApplicationServices.Services.Interfaces;
+
+ using HandBrakeWPF.Services.Interfaces;
/// <summary>
/// The User Setting Serivce
@@ -137,7 +138,7 @@ namespace HandBrake.ApplicationServices.Services
using (FileStream strm = new FileStream(this.settingsFile, FileMode.Create, FileAccess.Write))
{
- serializer.Serialize(strm, this.userSettings);
+ this.serializer.Serialize(strm, this.userSettings);
}
}
catch (Exception exc)
@@ -161,7 +162,7 @@ namespace HandBrake.ApplicationServices.Services
{
using (StreamReader reader = new StreamReader(this.settingsFile))
{
- SerializableDictionary<string, object> data = (SerializableDictionary<string, object>)serializer.Deserialize(reader);
+ SerializableDictionary<string, object> data = (SerializableDictionary<string, object>)this.serializer.Deserialize(reader);
this.userSettings = data;
}
}
diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
index 34f58c862..45dbde20d 100644
--- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
+++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
@@ -62,6 +62,7 @@ namespace HandBrakeWPF.Startup
this.windsorContainer.Register(Component.For<IEncodeServiceWrapper>().ImplementedBy<EncodeServiceWrapper>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<INotificationService>().ImplementedBy<NotificationService>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<IPrePostActionService>().ImplementedBy<PrePostActionService>().LifeStyle.Is(LifestyleType.Singleton));
+ this.windsorContainer.Register(Component.For<IUserSettingService>().ImplementedBy<UserSettingService>());
// Commands
this.windsorContainer.Register(Component.For<IAdvancedEncoderOptionsCommand>().ImplementedBy<AdvancedEncoderOptionsCommand>().LifeStyle.Is(LifestyleType.Singleton));
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs
index bf50ec8db..9f8c69b53 100644
--- a/win/CS/HandBrakeWPF/UserSettingConstants.cs
+++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs
@@ -17,6 +17,11 @@ namespace HandBrakeWPF
#region Constants and Fields
/// <summary>
+ /// HandBrakes build
+ /// </summary>
+ public const string HandBrakeBuild = "HandBrakeBuild";
+
+ /// <summary>
/// Add Only One Per Langage
/// </summary>
public const string AddOnlyOneAudioPerLanguage = "addOnlyOneAudioPerLanguage";
@@ -301,6 +306,10 @@ namespace HandBrakeWPF
/// </summary>
public const string SaveLogCopyDirectory = "SaveLogCopyDirectory";
+ /// <summary>
+ /// The clear completed from queue.
+ /// </summary>
+ public const string ClearCompletedFromQueue = "ClearCompletedFromQueue";
#endregion
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 61c2d4a22..296b1faa4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -26,6 +26,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Commands;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
index 6344e262b..b8f2a265b 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
@@ -22,6 +22,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
using LumenWorks.Framework.IO.Csv;
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
index de08398bb..e5d825ba4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
@@ -19,6 +19,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index d20657728..dc87292d9 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1258,7 +1258,7 @@ namespace HandBrakeWPF.ViewModels
// Check if we already have jobs, and if we do, just start the queue.
if (this.queueProcessor.Count != 0)
{
- this.queueProcessor.Start();
+ this.queueProcessor.Start(UserSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue));
return;
}
@@ -1287,7 +1287,7 @@ namespace HandBrakeWPF.ViewModels
// Create the Queue Task and Start Processing
QueueTask task = new QueueTask(new EncodeTask(this.CurrentTask), HBConfigurationFactory.Create());
this.queueProcessor.Add(task);
- this.queueProcessor.Start();
+ this.queueProcessor.Start(UserSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue));
this.IsEncoding = true;
}
@@ -1572,8 +1572,7 @@ namespace HandBrakeWPF.ViewModels
PlistUtility.Export(
savefiledialog.FileName,
this.selectedPreset,
- this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild)
- .ToString(CultureInfo.InvariantCulture));
+ this.userSettingService.GetUserSetting<int>(UserSettingConstants.HandBrakeBuild).ToString(CultureInfo.InvariantCulture));
}
}
else
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 122914d13..f8a86494e 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -1953,7 +1953,7 @@ namespace HandBrakeWPF.ViewModels
// Minimise to Tray
this.MinimiseToTray = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.MainWindowMinimize);
this.DisablePresetUpdateCheckNotification = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PresetNotification);
- this.ClearQueueOnEncodeCompleted = userSettingService.GetUserSetting<bool>(ASUserSettingConstants.ClearCompletedFromQueue);
+ this.ClearQueueOnEncodeCompleted = userSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue);
this.ShowAdvancedTab = userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedTab);
// Set the preview count
@@ -2052,7 +2052,7 @@ namespace HandBrakeWPF.ViewModels
/* Advanced */
userSettingService.SetUserSetting(UserSettingConstants.MainWindowMinimize, this.MinimiseToTray);
userSettingService.SetUserSetting(UserSettingConstants.PresetNotification, this.DisablePresetUpdateCheckNotification);
- userSettingService.SetUserSetting(ASUserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);
+ userSettingService.SetUserSetting(UserSettingConstants.ClearCompletedFromQueue, this.ClearQueueOnEncodeCompleted);
userSettingService.SetUserSetting(UserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index aa390eaa6..59ce20942 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -22,6 +22,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.Interop.Model.Encoding;
using HandBrakeWPF.Helpers;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
using Size = System.Drawing.Size;
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index 972c46d94..e89ecc4cd 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -304,7 +304,7 @@ namespace HandBrakeWPF.ViewModels
this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.Count);
this.IsEncoding = true;
- this.queueProcessor.Start();
+ this.queueProcessor.Start(UserSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue));
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index a40e76a46..d12798fef 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -30,6 +30,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Commands.Interfaces;
using HandBrakeWPF.Properties;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -983,53 +984,53 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.Task);
- if (preset.Task != null)
- {
- this.SetEncoder(preset.Task.VideoEncoder);
-
- // applies to both x264 and QSV
- if (preset.Task.VideoEncoder == VideoEncoder.X264 ||
- preset.Task.VideoEncoder == VideoEncoder.QuickSync)
- {
- this.H264Profile = preset.Task.H264Profile;
- this.H264Level = preset.Task.H264Level;
- }
- else
- {
- this.H264Profile = x264Profile.None;
- this.H264Level = "Auto";
- }
-
- // x264 Only
- if (preset.Task.VideoEncoder == VideoEncoder.X264)
- {
- this.X264PresetValue = (int)preset.Task.X264Preset;
- this.X264Tune = preset.Task.X264Tune;
- this.FastDecode = preset.Task.FastDecode;
- }
- else
- {
- this.X264PresetValue = (int)x264Preset.Medium;
- this.X264Tune = x264Tune.None;
- this.FastDecode = false;
- }
-
- // QSV Only
- if (preset.Task.VideoEncoder == VideoEncoder.QuickSync)
- {
- this.QsvPresetValue = (int)preset.Task.QsvPreset;
- }
- else
- {
- this.QsvPresetValue = SystemInfo.IsHswOrNewer
- ? (int)QsvPreset.Quality
- : (int)QsvPreset.Balanced;
- }
-
- this.ExtraArguments = preset.Task.ExtraAdvancedArguments;
- this.UseAdvancedTab = !string.IsNullOrEmpty(preset.Task.AdvancedEncoderOptions) && this.ShowAdvancedTab;
- }
- }
+ if (preset.Task != null)
+ {
+ this.SetEncoder(preset.Task.VideoEncoder);
+
+ // applies to both x264 and QSV
+ if (preset.Task.VideoEncoder == VideoEncoder.X264 ||
+ preset.Task.VideoEncoder == VideoEncoder.QuickSync)
+ {
+ this.H264Profile = preset.Task.H264Profile;
+ this.H264Level = preset.Task.H264Level;
+ }
+ else
+ {
+ this.H264Profile = x264Profile.None;
+ this.H264Level = "Auto";
+ }
+
+ // x264 Only
+ if (preset.Task.VideoEncoder == VideoEncoder.X264)
+ {
+ this.X264PresetValue = (int)preset.Task.X264Preset;
+ this.X264Tune = preset.Task.X264Tune;
+ this.FastDecode = preset.Task.FastDecode;
+ }
+ else
+ {
+ this.X264PresetValue = (int)x264Preset.Medium;
+ this.X264Tune = x264Tune.None;
+ this.FastDecode = false;
+ }
+
+ // QSV Only
+ if (preset.Task.VideoEncoder == VideoEncoder.QuickSync)
+ {
+ this.QsvPresetValue = (int)preset.Task.QsvPreset;
+ }
+ else
+ {
+ this.QsvPresetValue = SystemInfo.IsHswOrNewer
+ ? (int)QsvPreset.Quality
+ : (int)QsvPreset.Balanced;
+ }
+
+ this.ExtraArguments = preset.Task.ExtraAdvancedArguments;
+ this.UseAdvancedTab = !string.IsNullOrEmpty(preset.Task.AdvancedEncoderOptions) && this.ShowAdvancedTab;
+ }
+ }
/// <summary>
/// Update all the UI controls based on the encode task passed in.
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
index 7a13881dc..301e161dd 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
@@ -14,6 +14,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Helpers;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
index 0347bc647..fbf700b4a 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
@@ -22,6 +22,7 @@ namespace HandBrakeWPF.Views
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Commands;
+ using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
using Application = System.Windows.Application;