summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-09-01 21:55:29 +0000
committersr55 <[email protected]>2012-09-01 21:55:29 +0000
commitccd60c79e7bbe7e961885c8d7eb24a6536aeb670 (patch)
tree71d09543361e930ee1106498544e2248df4b28c6 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
parentc387255346f64661db1119b644c88311db67ba57 (diff)
WinGui: Further work in the process isolation service.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4927 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 59d442393..a6ae77489 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -166,9 +166,6 @@ namespace HandBrakeWPF.ViewModels
/// Initializes a new instance of the <see cref="MainViewModel"/> class.
/// The viewmodel for HandBrakes main window.
/// </summary>
- /// <param name="windowManager">
- /// The window manager.
- /// </param>
/// <param name="userSettingService">
/// The User Setting Service
/// </param>
@@ -193,7 +190,7 @@ namespace HandBrakeWPF.ViewModels
/// <param name="driveDetectService">
/// The drive Detect Service.
/// </param>
- public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
+ public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, IDriveDetectService driveDetectService)
{
GeneralUtilities.SetInstanceId();
@@ -808,6 +805,11 @@ namespace HandBrakeWPF.ViewModels
this.SourceMenu = this.GenerateSourceMenu();
this.driveDetectService.StartDetection(this.DriveTrayChanged);
+
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation))
+ {
+ this.EnableIsolationServices();
+ }
}
/// <summary>
@@ -1181,7 +1183,7 @@ namespace HandBrakeWPF.ViewModels
/// The test isolation services.
/// Swaps out the implementation of IScan to the IsolatedScanService version.
/// </summary>
- public void TestIsolationServices()
+ public void EnableIsolationServices()
{
// Unhook the old services
this.scanService.ScanStared -= this.ScanStared;
@@ -1190,8 +1192,8 @@ namespace HandBrakeWPF.ViewModels
this.queueProcessor.EncodeService.EncodeStatusChanged -= this.EncodeStatusChanged;
// Replace the Services
- this.scanService = new IsolatedScanService(this.errorService);
- this.encodeService = new IsolatedEncodeService(this.errorService);
+ this.scanService = new IsolatedScanService(this.errorService, this.userSettingService);
+ this.encodeService = new IsolatedEncodeService(this.errorService, this.userSettingService);
this.queueProcessor.SwapEncodeService(this.encodeService);
// Add the new Event Hooks