From f83ab26ab8e1d2ce277f0c12f23b5753bf63d763 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 19 Nov 2013 21:55:44 +0000 Subject: 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 --- win/CS/HandBrake.ApplicationServices/Services/LibScan.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Services/LibScan.cs') diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 7064cc643..6a372f228 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -15,6 +15,7 @@ namespace HandBrake.ApplicationServices.Services using System.Text; using HandBrake.ApplicationServices.EventArgs; + using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; @@ -175,7 +176,10 @@ namespace HandBrake.ApplicationServices.Services /// /// The post Action. /// - public void Scan(string sourcePath, int title, int previewCount, Action postAction) + /// + /// The configuraiton. + /// + public void Scan(string sourcePath, int title, int previewCount, Action postAction, HBConfiguration configuraiton) { // Try to cleanup any previous scan instances. if (instance != null) @@ -223,7 +227,7 @@ namespace HandBrake.ApplicationServices.Services instance.ScanCompleted += this.InstanceScanCompleted; // Start the scan on a back - this.ScanSource(sourcePath, title, previewCount); + this.ScanSource(sourcePath, title, previewCount, configuraiton); } /// @@ -263,7 +267,10 @@ namespace HandBrake.ApplicationServices.Services /// /// The preview Count. /// - private void ScanSource(object sourcePath, int title, int previewCount) + /// + /// The configuraiton. + /// + private void ScanSource(object sourcePath, int title, int previewCount, HBConfiguration configuraiton) { try { @@ -281,7 +288,7 @@ namespace HandBrake.ApplicationServices.Services TimeSpan.FromSeconds( this.userSettingService.GetUserSetting(ASUserSettingConstants.MinScanDuration)); - HandBrakeUtils.SetDvdNav(!this.userSettingService.GetUserSetting(ASUserSettingConstants.DisableLibDvdNav)); + HandBrakeUtils.SetDvdNav(!configuraiton.IsDvdNavDisabled); this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0); } -- cgit v1.2.3