summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/Presets/Interfaces
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-03-04 17:22:26 +0000
committersr55 <[email protected]>2017-03-04 17:22:26 +0000
commit45eb6a58ae7fd4e0f84d9e64eb78def0eebfe274 (patch)
treeb731f65a10e5030f1d4ec9928b7764bc3f9503af /win/CS/HandBrakeWPF/Services/Presets/Interfaces
parentaa59dc68d74a62b469e0bf5ae39cd73d16d5c1b3 (diff)
WinGui: Rework of the preset system
- Better support for categories. - Switched from a List to Treeview Control. - Remember the expansion state of each group - Put User Presets on top after next save. Closes #445
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Presets/Interfaces')
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetObject.cs17
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs23
2 files changed, 38 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetObject.cs b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetObject.cs
new file mode 100644
index 000000000..07c3d4d1b
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetObject.cs
@@ -0,0 +1,17 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IPresetObject.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Preset Service Interface
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Services.Presets.Interfaces
+{
+ public interface IPresetObject
+ {
+ bool IsSelected { get; set; }
+ string Category { get; }
+ }
+} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs
index fb46b932f..f75c054c5 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs
@@ -23,7 +23,7 @@ namespace HandBrakeWPF.Services.Presets.Interfaces
/// <summary>
/// Gets a Collection of presets.
/// </summary>
- ObservableCollection<Preset> Presets { get; }
+ ObservableCollection<IPresetObject> Presets { get; }
/// <summary>
/// Gets DefaultPreset.
@@ -36,6 +36,16 @@ namespace HandBrakeWPF.Services.Presets.Interfaces
void Load();
/// <summary>
+ /// Save the state of the Preset Treview
+ /// </summary>
+ void SaveCategoryStates();
+
+ /// <summary>
+ /// Load the state of the Preset Treeview.
+ /// </summary>
+ void LoadCategoryStates();
+
+ /// <summary>
/// Add a new preset to the system
/// </summary>
/// <param name="preset">
@@ -83,7 +93,10 @@ namespace HandBrakeWPF.Services.Presets.Interfaces
/// <param name="preset">
/// The Preset to remove
/// </param>
- void Remove(Preset preset);
+ /// <returns>
+ /// True if it was removed successfully, false otherwise.
+ /// </returns>
+ bool Remove(Preset preset);
/// <summary>
/// Remove a group of presets by category
@@ -155,5 +168,11 @@ namespace HandBrakeWPF.Services.Presets.Interfaces
/// The replacement.
/// </param>
void Replace(Preset existing, Preset replacement);
+
+ /// <summary>
+ /// Set the selected preset
+ /// </summary>
+ /// <param name="selectedPreset">The preset we want to select.</param>
+ void SetSelected(Preset selectedPreset);
}
} \ No newline at end of file