diff options
author | sr55 <[email protected]> | 2016-07-25 20:29:44 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2016-07-25 20:29:44 +0100 |
commit | 96e2f705a48ed96db9172203ade1c6ab30937dde (patch) | |
tree | 1aa4554abf2ee1beedf7dfa7e94070b8a96305d3 /win/CS/HandBrakeWPF/Views | |
parent | 1903ac850ad0374b765ef3a058570a4bec067115 (diff) |
WinGui: Lay the foundation for editing presets with a simple rename window.
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ManagePresetView.xaml | 111 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ManagePresetView.xaml.cs | 27 |
3 files changed, 139 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index cf880ce70..a12de9e49 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -541,6 +541,7 @@ <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_SetDefault}" cal:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
<Separator />
<MenuItem Header="{x:Static Properties:ResourcesUI.MainView_UpdateSelectedPreset}" cal:Message.Attach="[Event Click] = [Action PresetUpdate]" />
+ <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_PresetManage}" cal:Message.Attach="[Event Click] = [Action PresetManage]" />
<Separator />
<MenuItem Header="{x:Static Properties:ResourcesUI.Preset_Import}" cal:Message.Attach="[Event Click] = [Action PresetImport]" />
<MenuItem Header="{x:Static Properties:ResourcesUI.Preset_Export}" cal:Message.Attach="[Event Click] = [Action PresetExport]" />
diff --git a/win/CS/HandBrakeWPF/Views/ManagePresetView.xaml b/win/CS/HandBrakeWPF/Views/ManagePresetView.xaml new file mode 100644 index 000000000..fb16780e0 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/ManagePresetView.xaml @@ -0,0 +1,111 @@ +<Window x:Class="HandBrakeWPF.Views.ManagePresetView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:cal="http://www.caliburnproject.org" + xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:Properties="clr-namespace:HandBrakeWPF.Properties" xmlns:controls="clr-namespace:HandBrakeWPF.Controls" + Title="{Binding Title}" + Width="350" + ResizeMode="NoResize" + SizeToContent="Height" + WindowStartupLocation="CenterScreen" + TextOptions.TextFormattingMode="Display" + mc:Ignorable="d"> + + <Window.Resources> + <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" /> + <Converters:EnumComboConverter x:Key="enumComboConverter" /> + + <Style x:Key="LongToolTipHolder" TargetType="FrameworkElement"> + <Setter Property="ToolTipService.ShowDuration" Value="20000" /> + <Setter Property="Margin" Value="0,2,0,2" /> + </Style> + </Window.Resources> + + <Grid HorizontalAlignment="Stretch" + VerticalAlignment="Stretch"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="*" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + + <TextBlock Text="{x:Static Properties:ResourcesUI.ManagePresetView_ManagePreset}" FontSize="26" FontFamily="Segoe UI Light" FontWeight="Bold" Margin="10,10,10,10" Grid.Row="0" /> + + <!-- Header --> + <Grid Grid.Row="1" Margin="10,0,10,0"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="120" /> + <ColumnDefinition Width="*" /> + </Grid.ColumnDefinitions> + + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="*" /> + </Grid.RowDefinitions> + + <!-- Name --> + <TextBlock Grid.Row="0" + Grid.Column="0" + Text="{x:Static Properties:ResourcesUI.AddPresetView_Name}" /> + <TextBox Grid.Row="0" + Grid.Column="1" + HorizontalAlignment="Stretch" + Text="{Binding Preset.Name, UpdateSourceTrigger=PropertyChanged}" /> + + + <!-- Description --> + <TextBlock Grid.Row="2" + Grid.Column="0" Margin="0,10,0,0" + Text="{x:Static Properties:ResourcesUI.AddPresetView_Description}" /> + <TextBox Grid.Row="2" + Grid.Column="1" Margin="0,10,0,0" + + Text="{Binding Preset.Description, UpdateSourceTrigger=PropertyChanged}" /> + + <!-- Settings --> + + <StackPanel Grid.Row="4" + Grid.Column="1" + Margin="0,10,0,0" + Orientation="Horizontal" + Visibility="{Binding ShowCustomInputs, + Converter={StaticResource boolToVisConverter}}"/> + + </Grid> + + <!-- Controls --> + <Grid Grid.Row="3" + Margin="0,20,0,0"> + + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + + <Button Grid.Column="1" + Margin="0,5,10,10" + cal:Message.Attach="[Event Click] = [Action Cancel]" + Content="{x:Static Properties:ResourcesUI.Generic_Cancel}" + IsCancel="True" + Padding="8,2" /> + <Button Grid.Column="2" + Margin="0,5,10,10" + cal:Message.Attach="[Event Click] = [Action Save]" + Content="{x:Static Properties:ResourcesUI.Generic_Save}" + IsDefault="True" + Padding="8,2" /> + </Grid> + + </Grid> +</Window> diff --git a/win/CS/HandBrakeWPF/Views/ManagePresetView.xaml.cs b/win/CS/HandBrakeWPF/Views/ManagePresetView.xaml.cs new file mode 100644 index 000000000..d0964a982 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/ManagePresetView.xaml.cs @@ -0,0 +1,27 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="ManagePresetView.xaml.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> +// Interaction logic for ManagePresetView.xaml +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Views +{ + using System.Windows; + + /// <summary> + /// Interaction logic for ManagePresetView.xaml + /// </summary> + public partial class ManagePresetView : Window + { + /// <summary> + /// Initializes a new instance of the <see cref="ManagePresetView"/> class. + /// </summary> + public ManagePresetView() + { + InitializeComponent(); + } + } +} |