summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-06-24 21:15:49 +0100
committersr55 <[email protected]>2019-06-24 21:16:01 +0100
commitb52b25d167d76106c8666c788c17e7a33f713f4d (patch)
treea01ff14c78959c9b4151819c78e46701c1cbf53b /win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
parent1613a41853551dedc5b3219f05ed32aacbc85b79 (diff)
WinGui: Refactor "When Done" to use an enum to avoid language issues. Also change "suspend" to "sleep" to be consistent with the OS. Fixes #2162
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index 0415a8c95..e86d8f488 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -23,6 +23,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.EventArgs;
using HandBrakeWPF.Extensions;
+ using HandBrakeWPF.Model.Options;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Services.Queue.Interfaces;
@@ -47,7 +48,7 @@ namespace HandBrakeWPF.ViewModels
private readonly IQueueService queueProcessor;
private string jobStatus;
private string jobsPending;
- private string whenDoneAction;
+ private WhenDone whenDoneAction;
private QueueTask selectedTask;
private bool isQueueRunning;
private double progressValue;
@@ -82,7 +83,7 @@ namespace HandBrakeWPF.ViewModels
this.DisplayName = "Queue";
this.IsQueueRunning = false;
- this.WhenDoneAction = this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction);
+ this.WhenDoneAction = (WhenDone)this.userSettingService.GetUserSetting<int>(UserSettingConstants.WhenCompleteAction);
}
#endregion
@@ -147,7 +148,7 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Gets or sets WhenDoneAction.
/// </summary>
- public string WhenDoneAction
+ public WhenDone WhenDoneAction
{
get
{
@@ -273,7 +274,7 @@ namespace HandBrakeWPF.ViewModels
/// <param name="action">
/// The action.
/// </param>
- public void WhenDone(string action)
+ public void WhenDone(int action)
{
this.WhenDone(action, true);
}
@@ -287,9 +288,9 @@ namespace HandBrakeWPF.ViewModels
/// <param name="saveChange">
/// Save the change to the setting. Use false when updating UI.
/// </param>
- public void WhenDone(string action, bool saveChange)
+ public void WhenDone(int action, bool saveChange)
{
- this.WhenDoneAction = action;
+ this.WhenDoneAction = (WhenDone)action;
if (saveChange)
{