|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | 7 | xmlns:local="clr-namespace:OpenSvip.GUI" |
| 8 | + xmlns:config="clr-namespace:OpenSvip.GUI.Config" |
8 | 9 | xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
9 | 10 | mc:Ignorable="d" |
10 | 11 | Title="OpenSVIP - 歌声合成工程文件转换器(预览版本)" |
|
38 | 39 | </Grid.RowDefinitions> |
39 | 40 | <Border Grid.Row="0" Background="WhiteSmoke"> |
40 | 41 | <Border.Resources> |
41 | | - <x:Array x:Key="DefaultExportEnumValues" Type="local:DefaultExport"> |
42 | | - <local:DefaultExport>None</local:DefaultExport> |
43 | | - <local:DefaultExport>Source</local:DefaultExport> |
44 | | - <local:DefaultExport>Desktop</local:DefaultExport> |
45 | | - <local:DefaultExport>Custom</local:DefaultExport> |
| 42 | + <x:Array x:Key="DefaultExportEnumValues" Type="config:ExportPaths"> |
| 43 | + <config:ExportPaths>Unset</config:ExportPaths> |
| 44 | + <config:ExportPaths>Source</config:ExportPaths> |
| 45 | + <config:ExportPaths>Desktop</config:ExportPaths> |
| 46 | + <config:ExportPaths>Custom</config:ExportPaths> |
46 | 47 | </x:Array> |
47 | 48 | </Border.Resources> |
48 | 49 | <ComboBox |
|
51 | 52 | Height="0" |
52 | 53 | Width="0" |
53 | 54 | ItemsSource="{StaticResource DefaultExportEnumValues}" |
54 | | - SelectedIndex="{Binding DefaultExportPath, Converter={StaticResource IndexToEnumValueConverter}, ConverterParameter={x:Type local:DefaultExport}}"/> |
| 55 | + SelectedIndex="{Binding DefaultExportPath, Converter={StaticResource IndexToEnumValueConverter}, ConverterParameter={x:Type config:ExportPaths}}"/> |
55 | 56 | </Border> |
56 | 57 | <DockPanel x:Name="MenuPanel" Grid.Row="0"> |
57 | 58 | <Menu IsMainMenu="True" Margin="20 0 0 0" Height="25" FontFamily="Microsoft YaHei UI" FontSize="13" FontWeight="Normal"> |
|
386 | 387 | DragLeave="FileMaskPanel_UnFocus"> |
387 | 388 | <ItemsControl |
388 | 389 | x:Name="TaskListView" |
389 | | - Margin="6 5 -5 5" |
| 390 | + Margin="6 5 10 5" |
390 | 391 | ItemsSource="{Binding TaskList}" |
391 | 392 | Visibility="{Binding HasItems, ElementName=TaskListView, Converter={StaticResource BooleanToVisibilityConverter}}" |
392 | 393 | IsEnabled="{Binding ExecutionInProgress, Converter={StaticResource InvertBooleanConverter}}" |
|
486 | 487 | </MultiBinding> |
487 | 488 | </StackPanel.Visibility> |
488 | 489 | <StackPanel.Resources> |
| 490 | + <Style TargetType="ScrollViewer" BasedOn="{StaticResource MaterialDesignScrollViewer}"/> |
489 | 491 | <Style TargetType="TreeView" BasedOn="{StaticResource MaterialDesignTreeView}"> |
490 | 492 | <Setter Property="ScrollViewer.PanningMode" Value="None"/> |
491 | 493 | <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> |
|
502 | 504 | <Setter Property="MaxWidth"> |
503 | 505 | <Setter.Value> |
504 | 506 | <Binding |
505 | | - RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=TreeView}" |
| 507 | + RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=materialDesign:Card}" |
506 | 508 | Path="ActualWidth" |
507 | 509 | Converter="{StaticResource DoubleConstantSubConverter}" |
508 | | - ConverterParameter="140"/> |
| 510 | + ConverterParameter="160"/> |
509 | 511 | </Setter.Value> |
510 | 512 | </Setter> |
511 | 513 | </Style> |
|
531 | 533 | <WrapPanel |
532 | 534 | Grid.Row="1" |
533 | 535 | Orientation="Horizontal" |
534 | | - Width="{Binding ActualWidth, ElementName=ConverterOptionsCard, Converter={StaticResource DoubleConstantSubConverter}, ConverterParameter=70}"> |
| 536 | + Width="{Binding ActualWidth, ElementName=ConverterOptionsCard, Converter={StaticResource DoubleConstantSubConverter}, ConverterParameter=64}"> |
535 | 537 | <local:OptionTreeViewItem DataContext="{Binding}" VerticalAlignment="Center" HorizontalAlignment="Stretch"/> |
536 | 538 | </WrapPanel> |
537 | 539 | </Grid> |
|
554 | 556 | <TextBlock Style="{StaticResource TreeViewHeaderComment}" Text="["/> |
555 | 557 | <TextBlock Style="{StaticResource TreeViewHeaderComment}" Margin="7 2 0 0"> |
556 | 558 | <TextBlock.Text> |
557 | | - <Binding Path="SelectedInputPlugin.Format" StringFormat="{}导入自 {0}"/> |
| 559 | + <Binding Path="SelectedInputFormat" StringFormat="{}导入自 {0}" Mode="OneWay"/> |
558 | 560 | </TextBlock.Text> |
559 | 561 | </TextBlock> |
560 | 562 | <TextBlock Style="{StaticResource TreeViewHeaderComment}" Text="]" Margin="7 2 0 0"/> |
|
582 | 584 | <TextBlock Style="{StaticResource TreeViewHeaderComment}" Text="["/> |
583 | 585 | <TextBlock Style="{StaticResource TreeViewHeaderComment}" Margin="7 2 0 0"> |
584 | 586 | <TextBlock.Text> |
585 | | - <Binding Path="SelectedOutputPlugin.Format" StringFormat="{}导出为 {0}"/> |
| 587 | + <Binding Path="SelectedOutputFormat" StringFormat="{}导出为 {0}" Mode="OneWay"/> |
586 | 588 | </TextBlock.Text> |
587 | 589 | </TextBlock> |
588 | 590 | <TextBlock Style="{StaticResource TreeViewHeaderComment}" Text="]" Margin="7 2 0 0"/> |
|
654 | 656 | <TextBox |
655 | 657 | VerticalAlignment="Center" |
656 | 658 | Margin="10 0" |
| 659 | + Padding="0 2" |
657 | 660 | materialDesign:HintAssist.Hint="{Binding IsChecked, ElementName=ExportToSourceMenuItem, Converter={StaticResource BooleanSwitchOperationConverter}, ConverterParameter=输出路径(本次);输出路径}" |
658 | 661 | Text="{Binding ExportPath}" |
659 | 662 | FontSize="16" |
|
684 | 687 | FontSize="14" |
685 | 688 | materialDesign:ComboBoxAssist.ShowSelectedItem="False" |
686 | 689 | IsEnabled="{Binding ExecutionInProgress, Converter={StaticResource InvertBooleanConverter}}" |
687 | | - SelectedIndex="{Binding OverWriteOption, Converter={StaticResource IndexToEnumValueConverter}, ConverterParameter={x:Type local:OverwriteOptions}}"> |
| 690 | + SelectedIndex="{Binding OverWriteOption, Converter={StaticResource IndexToEnumValueConverter}, ConverterParameter={x:Type config:OverwriteOptions}}"> |
688 | 691 | <ComboBoxItem IsSelected="True" Content="覆盖"/> |
689 | 692 | <ComboBoxItem Content="跳过"/> |
690 | 693 | <ComboBoxItem Content="询问"/> |
|
0 commit comments