diff options
author | sr55 <[email protected]> | 2013-11-19 21:55:44 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-11-19 21:55:44 +0000 |
commit | f83ab26ab8e1d2ce277f0c12f23b5753bf63d763 (patch) | |
tree | f59a860b5a06effcdccc57dfa83629d171536864 /win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs | |
parent | ca8fe7c1fe8abf869d4c53e31124c5f0b1aa8dfa (diff) |
WinGui: Started work on API improvements in the Application services dll. Removing the concept of user settings and replacing it with a Configuration object.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5896 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs new file mode 100644 index 000000000..8c353bbdb --- /dev/null +++ b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs @@ -0,0 +1,58 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBConfigurationFactory.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>
+// HBConfiguration Factory
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Factories
+{
+ using Caliburn.Micro;
+
+ using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Services.Interfaces;
+
+ /// <summary>
+ /// HBConfiguration Factory
+ /// </summary>
+ public class HBConfigurationFactory
+ {
+ /// <summary>
+ /// The user setting service.
+ /// </summary>
+ private static readonly IUserSettingService UserSettingService = IoC.Get<IUserSettingService>();
+
+ /// <summary>
+ /// The create.
+ /// </summary>
+ /// <param name="isLoggingEnabled">
+ /// The is logging enabled.
+ /// </param>
+ /// <returns>
+ /// The <see cref="HBConfiguration"/>.
+ /// </returns>
+ public static HBConfiguration Create(bool isLoggingEnabled)
+ {
+ HBConfiguration config = new HBConfiguration
+ {
+ IsDvdNavDisabled = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav),
+ IsLoggingEnabled = isLoggingEnabled
+ };
+
+ return config;
+ }
+
+ /// <summary>
+ /// The create.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="HBConfiguration"/>.
+ /// </returns>
+ public static HBConfiguration Create()
+ {
+ return Create(true);
+ }
+ }
+}
|