// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // HBConfiguration Factory // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrakeWPF.Factories { using Caliburn.Micro; using HandBrake.Interop.Model; using HandBrakeWPF.Services.Interfaces; /// /// HBConfiguration Factory /// public class HBConfigurationFactory { /// /// The user setting service. /// private static readonly IUserSettingService UserSettingService = IoC.Get(); /// /// The create. /// /// /// The . /// public static HBConfiguration Create() { HBConfiguration config = new HBConfiguration { IsDvdNavDisabled = UserSettingService.GetUserSetting(UserSettingConstants.DisableLibDvdNav), ScalingMode = UserSettingService.GetUserSetting(UserSettingConstants.ScalingMode), PreviewScanCount = UserSettingService.GetUserSetting(UserSettingConstants.PreviewScanCount), Verbosity = UserSettingService.GetUserSetting(UserSettingConstants.Verbosity), MinScanDuration = UserSettingService.GetUserSetting(UserSettingConstants.MinScanDuration), SaveLogToCopyDirectory = UserSettingService.GetUserSetting(UserSettingConstants.SaveLogToCopyDirectory), SaveLogWithVideo = UserSettingService.GetUserSetting(UserSettingConstants.SaveLogWithVideo), SaveLogCopyDirectory = UserSettingService.GetUserSetting(UserSettingConstants.SaveLogCopyDirectory), RemoteServiceEnabled = UserSettingService.GetUserSetting(UserSettingConstants.RemoteServiceEnabled), RemoteServicePort = UserSettingService.GetUserSetting(UserSettingConstants.RemoteServicePort), EnableVceEncoder = UserSettingService.GetUserSetting(UserSettingConstants.EnableVceEncoder), EnableNvencEncoder = UserSettingService.GetUserSetting(UserSettingConstants.EnableNvencEncoder), EnableQsvEncoder = UserSettingService.GetUserSetting(UserSettingConstants.EnableQuickSyncEncoding), EnableQuickSyncDecoding = UserSettingService.GetUserSetting(UserSettingConstants.EnableQuickSyncDecoding), UseQSVDecodeForNonQSVEnc = UserSettingService.GetUserSetting(UserSettingConstants.UseQSVDecodeForNonQSVEnc) }; return config; } } }