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 | |
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')
3 files changed, 38 insertions, 19 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs index 1b5f3f0b6..33acdfec8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueSelectionViewModel.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.ViewModels.Interfaces using System.ComponentModel;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Services.Scan.Model;
/// <summary>
@@ -38,6 +39,9 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// <param name="addAction">
/// The add To Queue action
/// </param>
- void Setup(Source scannedSource, string sourceName, Action<IEnumerable<SelectionTitle>> addAction);
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
+ void Setup(Source scannedSource, string sourceName, Action<IEnumerable<SelectionTitle>> addAction, Preset preset);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 0065bef6a..27bd32505 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1470,7 +1470,7 @@ namespace HandBrakeWPF.ViewModels this.SelectedTitle = title.Title;
this.AddToQueue();
}
- });
+ }, this.selectedPreset);
if (window != null)
{
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);
}
}
|