summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs49
1 files changed, 32 insertions, 17 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
index ab790c234..5e41c0a28 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs
@@ -17,6 +17,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Model;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
+ using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -25,28 +26,14 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public class QueueSelectionViewModel : ViewModelBase, IQueueSelectionViewModel
{
- /// <summary>
- /// The error service.
- /// </summary>
private readonly IErrorService errorService;
-
private readonly IUserSettingService userSettingService;
-
- /// <summary>
- /// The ordered by duration.
- /// </summary>
private bool orderedByDuration;
-
- /// <summary>
- /// The ordered by title.
- /// </summary>
private bool orderedByTitle;
-
- /// <summary>
- /// The add to queue.
- /// </summary>
private Action<IEnumerable<SelectionTitle>> addToQueue;
+ private string currentPreset;
+
/// <summary>
/// Initializes a new instance of the <see cref="QueueSelectionViewModel"/> class.
/// </summary>
@@ -76,6 +63,26 @@ namespace HandBrakeWPF.ViewModels
public BindingList<SelectionTitle> TitleList { get; set; }
/// <summary>
+ /// Gets or sets the current preset.
+ /// </summary>
+ public string CurrentPreset
+ {
+ get
+ {
+ return this.currentPreset;
+ }
+ set
+ {
+ if (value == this.currentPreset)
+ {
+ return;
+ }
+ this.currentPreset = value;
+ this.NotifyOfPropertyChange(() => this.CurrentPreset);
+ }
+ }
+
+ /// <summary>
/// Gets or sets a value indicating whether ordered by title.
/// </summary>
public bool OrderedByTitle
@@ -202,7 +209,10 @@ namespace HandBrakeWPF.ViewModels
/// <param name="addAction">
/// The add Action.
/// </param>
- public void Setup(Source scannedSource, string srcName, Action<IEnumerable<SelectionTitle>> addAction)
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
+ public void Setup(Source scannedSource, string srcName, Action<IEnumerable<SelectionTitle>> addAction, Preset preset)
{
this.TitleList.Clear();
this.addToQueue = addAction;
@@ -220,6 +230,11 @@ namespace HandBrakeWPF.ViewModels
}
}
+ if (preset != null)
+ {
+ this.CurrentPreset = string.Format(ResourcesUI.QueueSelection_UsingPreset, preset.Name);
+ }
+
this.NotifyOfPropertyChange(() => this.IsAutoNamingEnabled);
}
}