diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/Preset.cs | 60 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 15 | ||||
-rw-r--r-- | 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;
+
/// <summary>
/// A Preset for encoding with.
/// </summary>
- public class Preset
+ public class Preset : PropertyChangedBase
{
+ #region Constants and Fields
+
+ /// <summary>
+ /// The is default.
+ /// </summary>
+ private bool isDefault;
+
+ #endregion
+
+ #region Properties
+
/// <summary>
/// Gets or sets the category which the preset resides under
/// </summary>
public string Category { get; set; }
/// <summary>
- /// Gets or sets the preset name
+ /// Gets or sets the Description for the preset
/// </summary>
- public string Name { get; set; }
+ public string Description { get; set; }
/// <summary>
- /// 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
/// </summary>
- public string Version { get; set; }
+ public bool IsBuildIn { get; set; }
/// <summary>
- /// Gets or sets the Description for the preset
+ /// Gets or sets a value indicating whether IsDefault.
/// </summary>
- public string Description { get; set; }
+ public bool IsDefault
+ {
+ get
+ {
+ return this.isDefault;
+ }
+ set
+ {
+ this.isDefault = value;
+ this.NotifyOfPropertyChange(() => this.IsDefault);
+ }
+ }
/// <summary>
- /// Gets or sets a value indicating whether Picture Filters are used with this preset.
+ /// Gets or sets the preset name
/// </summary>
- public bool UsePictureFilters { get; set; }
+ public string Name { get; set; }
/// <summary>
/// Gets or sets PictureSettingsMode.
@@ -46,19 +70,23 @@ namespace HandBrake.ApplicationServices.Model public PresetPictureSettingsMode PictureSettingsMode { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether this is a built in preset
+ /// Gets or sets task.
/// </summary>
- public bool IsBuildIn { get; set; }
+ public EncodeTask Task { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether IsDefault.
+ /// Gets or sets a value indicating whether Picture Filters are used with this preset.
/// </summary>
- public bool IsDefault { get; set; }
+ public bool UsePictureFilters { get; set; }
/// <summary>
- /// Gets or sets task.
+ /// Gets or sets The version number which associates this preset with a HB build
/// </summary>
- public EncodeTask Task { get; set; }
+ public string Version { get; set; }
+
+ #endregion
+
+ #region Public Methods
/// <summary>
/// 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 @@ <Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Background" Value="Transparent"/>
</Trigger>
+ <DataTrigger Binding="{Binding IsDefault}" Value="True" >
+ <Setter Property="FontStyle" Value="Italic" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsDefault}" Value="False" >
+ <Setter Property="FontStyle" Value="Normal" />
+ </DataTrigger>
</Style.Triggers>
</Style>
@@ -517,9 +522,9 @@ </Grid.RowDefinitions>
<ListBox HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch" ItemsSource="{Binding Source={StaticResource presetsCvs}}"
+ VerticalAlignment="Stretch" ItemsSource="{Binding Source={StaticResource presetsCvs}}"
SelectedItem="{Binding SelectedPreset, Mode=TwoWay}" BorderThickness="0,0,0,1"
- BorderBrush="LightGray"
+ BorderBrush="LightGray"
>
<ListBox.GroupStyle>
@@ -543,7 +548,7 @@ UseLayoutRounding="False"
ToolBar.OverflowMode="Never"
ToolBarTray.IsLocked="True"
- Loaded="PresetsToolBarLoaded"
+ Loaded="ToolBarLoaded"
>
<Button Micro:Message.Attach="[Event Click] = [Action PresetAdd]" >
<Button.Content>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs index 0c6c291c9..7366ac9f8 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs @@ -35,7 +35,7 @@ namespace HandBrakeWPF.Views /// <param name="e">
/// The e.
/// </param>
- private void PresetsToolBarLoaded(object sender, RoutedEventArgs e)
+ private void ToolBarLoaded(object sender, RoutedEventArgs e)
{
ToolBar toolBar = sender as ToolBar;
if (toolBar != null)
|