193 lines
13 KiB
XML
193 lines
13 KiB
XML
<Window x:Class="SpineViewer.Views.ExporterDialogs.FFmpegVideoExporterDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:local="clr-namespace:SpineViewer.Views.ExporterDialogs"
|
|
xmlns:exporters="clr-namespace:SpineViewer.ViewModels.Exporters"
|
|
d:DataContext="{d:DesignInstance Type=exporters:FFmpegVideoExporterViewModel}"
|
|
mc:Ignorable="d"
|
|
Title="{DynamicResource Str_FFmpegVideoExporterTitle}"
|
|
Width="450"
|
|
Height="750"
|
|
ShowInTaskbar="False"
|
|
WindowStartupLocation="CenterOwner">
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Bottom">
|
|
<WrapPanel HorizontalAlignment="Center">
|
|
<WrapPanel.Resources>
|
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ButtonDefault}">
|
|
<Setter Property="Margin" Value="5"/>
|
|
<Setter Property="Width" Value="100"/>
|
|
</Style>
|
|
</WrapPanel.Resources>
|
|
<Button Content="{DynamicResource Str_OK}" Click="ButtonOK_Click"/>
|
|
<Button Content="{DynamicResource Str_Cancel}" Click="ButtonCancel_Click"/>
|
|
</WrapPanel>
|
|
</Border>
|
|
|
|
<Border>
|
|
<Border.Resources>
|
|
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource LabelDefault}">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
|
</Style>
|
|
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBoxBaseStyle}">
|
|
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
|
</Style>
|
|
<Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource ComboBoxBaseStyle}">
|
|
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
|
</Style>
|
|
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource MyToggleButton}">
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
</Style>
|
|
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource GroupBoxTab}">
|
|
<Setter Property="BorderBrush" Value="LightGray"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="hc:TitleElement.Background" Value="Transparent"/>
|
|
<Setter Property="Margin" Value="0 5 0 10"/>
|
|
</Style>
|
|
</Border.Resources>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Grid.IsSharedSizeScope="True">
|
|
<GroupBox Header="{DynamicResource Str_ExportBaseArgs}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Col1"/>
|
|
<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="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 水平分辨率 -->
|
|
<Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource Str_ResolutionX}" ToolTip="{DynamicResource Str_ResolutionTooltip}"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" IsReadOnly="True" Text="{Binding ResolutionX, Mode=OneWay}" ToolTip="{DynamicResource Str_ResolutionTooltip}"/>
|
|
|
|
<!-- 垂直分辨率 -->
|
|
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource Str_ResolutionY}" ToolTip="{DynamicResource Str_ResolutionTooltip}"/>
|
|
<TextBox Grid.Row="1" Grid.Column="1" IsReadOnly="True" Text="{Binding ResolutionY, Mode=OneWay}" ToolTip="{DynamicResource Str_ResolutionTooltip}"/>
|
|
|
|
<!-- 是否导出单个 -->
|
|
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource Str_ExportSingle}" ToolTip="{DynamicResource Str_ExportSingleTooltip}"/>
|
|
<ToggleButton Grid.Row="2" Grid.Column="1" IsChecked="{Binding ExportSingle}" ToolTip="{DynamicResource Str_ExportSingleTooltip}"/>
|
|
|
|
<!-- 输出文件夹 -->
|
|
<Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource Str_OutputDir}" ToolTip="{DynamicResource Str_OutputDirTooltip}"/>
|
|
<DockPanel Grid.Row="3" Grid.Column="1">
|
|
<Button DockPanel.Dock="Right" Content="..." Click="ButtonSelectOutputDir_Click"/>
|
|
<TextBox Text="{Binding OutputDir}" ToolTip="{DynamicResource Str_OutputDirTooltip}"/>
|
|
</DockPanel>
|
|
|
|
<!-- 背景颜色 -->
|
|
<Label Grid.Row="4" Grid.Column="0" Content="{DynamicResource Str_BackgroundColor}" ToolTip="#AARRGGBB"/>
|
|
<DockPanel Grid.Row="4" Grid.Column="1">
|
|
<Button DockPanel.Dock="Right" Content="..." Click="ButtonPickColor_Click">
|
|
<Button.Background>
|
|
<SolidColorBrush Color="{Binding BackgroundColor}"/>
|
|
</Button.Background>
|
|
</Button>
|
|
<TextBox x:Name="_colorTextBox" Text="{Binding BackgroundColor}" ToolTip="#AARRGGBB"/>
|
|
</DockPanel>
|
|
|
|
<!-- 四周边距 -->
|
|
<Label Grid.Row="5" Grid.Column="0" Content="{DynamicResource Str_Margin}" ToolTip="{DynamicResource Str_MarginTooltip}"/>
|
|
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Margin}" ToolTip="{DynamicResource Str_MarginTooltip}"/>
|
|
|
|
<!-- 自动分辨率 -->
|
|
<Label Grid.Row="6" Grid.Column="0" Content="{DynamicResource Str_AutoResolution}" ToolTip="{DynamicResource Str_AutoResolutionTooltip}"/>
|
|
<ToggleButton Grid.Row="6" Grid.Column="1" IsChecked="{Binding AutoResolution}" ToolTip="{DynamicResource Str_AutoResolutionTooltip}"/>
|
|
|
|
<!-- 最大分辨率 -->
|
|
<Label Grid.Row="7" Grid.Column="0" Content="{DynamicResource Str_MaxResolution}" ToolTip="{DynamicResource Str_MaxResolutionTooltip}"/>
|
|
<TextBox Grid.Row="7" Grid.Column="1" Text="{Binding MaxResolution}" ToolTip="{DynamicResource Str_MaxResolutionTooltip}"/>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="{DynamicResource Str_ExportVideoArgs}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Col1"/>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 导出时长 -->
|
|
<Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource Str_Duration}" ToolTip="{DynamicResource Str_ExportDurationTooltip}"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Duration}" ToolTip="{DynamicResource Str_ExportDurationTooltip}"/>
|
|
|
|
<!-- 导出帧率 -->
|
|
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource Str_Fps}"/>
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Fps}"/>
|
|
|
|
<!-- 导出速度 -->
|
|
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource Str_ExportSpeed}" ToolTip="{DynamicResource Str_ExportSpeedTooltip}"/>
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Speed}" ToolTip="{DynamicResource Str_ExportSpeedTooltip}"/>
|
|
|
|
<!-- 是否保留最后一帧 -->
|
|
<Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource Str_KeepLastFrame}" ToolTip="{DynamicResource Str_KeepLastFrameTooltip}"/>
|
|
<ToggleButton Grid.Row="3" Grid.Column="1" IsChecked="{Binding KeepLast}" ToolTip="{DynamicResource Str_KeelLastFrameTooltip}"/>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="{DynamicResource Str_ExportOtherArgs}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Col1"/>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 视频格式 -->
|
|
<Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource Str_VideoFormat}"/>
|
|
<ComboBox Grid.Row="0" Grid.Column="1" SelectedItem="{Binding Format}" ItemsSource="{Binding VideoFormatOptions}"/>
|
|
|
|
<!-- 动图是否循环 -->
|
|
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource Str_LoopPlay}" ToolTip="{DynamicResource Str_LoopPlayTooltip}"/>
|
|
<ToggleButton Grid.Row="1" Grid.Column="1" IsChecked="{Binding Loop}" ToolTip="{DynamicResource Str_LoopPlayTooltip}"/>
|
|
|
|
<!-- 质量参数 -->
|
|
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource Str_QualityParameter}" ToolTip="{DynamicResource Str_QualityParameterTooltip}"/>
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Quality}" ToolTip="{DynamicResource Str_QualityParameterTooltip}"/>
|
|
|
|
<!-- 无损压缩 -->
|
|
<Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource Str_LosslessParam}" ToolTip="{DynamicResource Str_LosslessParamTooltip}"/>
|
|
<ToggleButton Grid.Row="3" Grid.Column="1" IsChecked="{Binding Lossless}" ToolTip="{DynamicResource Str_LosslessParamTooltip}"/>
|
|
|
|
<!-- CRF 参数 -->
|
|
<Label Grid.Row="4" Grid.Column="0" Content="{DynamicResource Str_CrfParameter}" ToolTip="{DynamicResource Str_CrfParameterTooltip}"/>
|
|
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Crf}" ToolTip="{DynamicResource Str_CrfParameterTooltip}"/>
|
|
|
|
<!-- Profile 参数 -->
|
|
<Label Grid.Row="5" Grid.Column="0" Content="{DynamicResource Str_ProfileParameter}" ToolTip="{DynamicResource Str_ProfileParameterTooltip}"/>
|
|
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Profile}" ToolTip="{DynamicResource Str_ProfileParameterTooltip}"/>
|
|
</Grid>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</Border>
|
|
</DockPanel>
|
|
</Window>
|