diff options
author | sr55 <[email protected]> | 2016-02-20 21:21:45 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2016-02-20 21:21:45 +0000 |
commit | fa82fc310a78663421faa9a2b0c27cccf3fc6446 (patch) | |
tree | 305d1c0460ad297c193604fdb5b0012afaa517df /win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs | |
parent | ead31bdf2ea3dacd0ff5c9f576de14e6d7d918e3 (diff) |
WinGui: Added a text block on the Queue Add selection that shows the current preset to be used to for adding to the queue.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueSelectionViewModel.cs | 49 |
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);
}
}
|