From bd2a83d09b07c8e2fa303b6a17bf392811a0b95c Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 12 Aug 2012 10:35:46 +0000 Subject: WinGui: Highlight the default preset in italics. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4900 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrake.ApplicationServices/Model/Preset.cs | 60 ++++++++++++++++------ win/CS/HandBrakeWPF/Views/MainView.xaml | 15 ++++-- win/CS/HandBrakeWPF/Views/MainView.xaml.cs | 2 +- 3 files changed, 56 insertions(+), 21 deletions(-) diff --git a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs index 448d1a33e..128bf5c21 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Preset.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Preset.cs @@ -9,35 +9,59 @@ namespace HandBrake.ApplicationServices.Model { + using Caliburn.Micro; + /// /// A Preset for encoding with. /// - public class Preset + public class Preset : PropertyChangedBase { + #region Constants and Fields + + /// + /// The is default. + /// + private bool isDefault; + + #endregion + + #region Properties + /// /// Gets or sets the category which the preset resides under /// public string Category { get; set; } /// - /// Gets or sets the preset name + /// Gets or sets the Description for the preset /// - public string Name { get; set; } + public string Description { get; set; } /// - /// Gets or sets The version number which associates this preset with a HB build + /// Gets or sets a value indicating whether this is a built in preset /// - public string Version { get; set; } + public bool IsBuildIn { get; set; } /// - /// Gets or sets the Description for the preset + /// Gets or sets a value indicating whether IsDefault. /// - public string Description { get; set; } + public bool IsDefault + { + get + { + return this.isDefault; + } + set + { + this.isDefault = value; + this.NotifyOfPropertyChange(() => this.IsDefault); + } + } /// - /// Gets or sets a value indicating whether Picture Filters are used with this preset. + /// Gets or sets the preset name /// - public bool UsePictureFilters { get; set; } + public string Name { get; set; } /// /// Gets or sets PictureSettingsMode. @@ -46,19 +70,23 @@ namespace HandBrake.ApplicationServices.Model public PresetPictureSettingsMode PictureSettingsMode { get; set; } /// - /// Gets or sets a value indicating whether this is a built in preset + /// Gets or sets task. /// - public bool IsBuildIn { get; set; } + public EncodeTask Task { get; set; } /// - /// Gets or sets a value indicating whether IsDefault. + /// Gets or sets a value indicating whether Picture Filters are used with this preset. /// - public bool IsDefault { get; set; } + public bool UsePictureFilters { get; set; } /// - /// Gets or sets task. + /// Gets or sets The version number which associates this preset with a HB build /// - public EncodeTask Task { get; set; } + public string Version { get; set; } + + #endregion + + #region Public Methods /// /// Override the ToString Method @@ -70,5 +98,7 @@ namespace HandBrake.ApplicationServices.Model { return this.Name; } + + #endregion } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 5515fbbe8..57e7beee4 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -5,8 +5,7 @@ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" - xmlns:behaviours="clr-namespace:HandBrakeWPF.Helpers" xmlns:Model="clr-namespace:HandBrakeWPF.Model" - AllowDrop="True" + AllowDrop="True" Background="#FFF0F0F0" FontSize="11" Micro:Message.Attach="[Event Loaded] = [Action Load]" @@ -52,6 +51,12 @@ + + + + + + @@ -517,9 +522,9 @@ @@ -543,7 +548,7 @@ UseLayoutRounding="False" ToolBar.OverflowMode="Never" ToolBarTray.IsLocked="True" - Loaded="PresetsToolBarLoaded" + Loaded="ToolBarLoaded" >