summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.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/OptionsViewModel.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/OptionsViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs57
1 files changed, 52 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 119cb9d10..963abdf60 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -22,6 +22,7 @@ namespace HandBrakeWPF.ViewModels
using Caliburn.Micro;
using HandBrake.ApplicationServices;
+ using HandBrake.ApplicationServices.Exceptions;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
@@ -338,6 +339,16 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
private UpdateCheckInformation updateInfo;
+ /// <summary>
+ /// The enable process isolation.
+ /// </summary>
+ private bool enableProcessIsolation;
+
+ /// <summary>
+ /// The server port.
+ /// </summary>
+ private int serverPort;
+
#endregion
#region Constructors and Destructors
@@ -345,9 +356,6 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Initializes a new instance of the <see cref="OptionsViewModel"/> class.
/// </summary>
- /// <param name="windowManager">
- /// The window manager.
- /// </param>
/// <param name="userSettingService">
/// The user Setting Service.
/// </param>
@@ -357,7 +365,7 @@ namespace HandBrakeWPF.ViewModels
/// <param name="updateService">
/// The update Service.
/// </param>
- public OptionsViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IShellViewModel shellViewModel, IUpdateService updateService )
+ public OptionsViewModel(IUserSettingService userSettingService, IShellViewModel shellViewModel, IUpdateService updateService )
{
this.Title = "Options";
this.userSettingService = userSettingService;
@@ -1313,6 +1321,38 @@ namespace HandBrakeWPF.ViewModels
}
}
+ /// <summary>
+ /// Gets or sets a value indicating whether ClearQueueOnEncodeCompleted.
+ /// </summary>
+ public bool EnableProcessIsolation
+ {
+ get
+ {
+ return this.enableProcessIsolation;
+ }
+ set
+ {
+ this.enableProcessIsolation = value;
+ this.NotifyOfPropertyChange(() => this.EnableProcessIsolation);
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the server port.
+ /// </summary>
+ public int ServerPort
+ {
+ get
+ {
+ return this.serverPort;
+ }
+ set
+ {
+ this.serverPort = value;
+ this.NotifyOfPropertyChange(() => this.ServerPort);
+ }
+ }
+
#endregion
#endregion
@@ -1601,8 +1641,13 @@ namespace HandBrakeWPF.ViewModels
// Min Title Length
this.MinLength = this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.MinScanDuration);
- // Use Experimental dvdnav
+ // Use dvdnav
this.DisableLibdvdNav = userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav);
+
+ int port;
+ int.TryParse(userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort), out port);
+ this.ServerPort = port;
+ this.EnableProcessIsolation = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
}
/// <summary>
@@ -1817,6 +1862,8 @@ namespace HandBrakeWPF.ViewModels
}
userSettingService.SetUserSetting(ASUserSettingConstants.DisableLibDvdNav, this.DisableLibdvdNav);
+ userSettingService.SetUserSetting(UserSettingConstants.EnableProcessIsolation, this.EnableProcessIsolation);
+ userSettingService.SetUserSetting(UserSettingConstants.ServerPort, this.ServerPort.ToString());
}
/// <summary>