CPDFPageExtractUI.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <UserControl x:Class="Compdfkit_Tools.PDFControlUI.CPDFPageExtractUI"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Compdfkit_Tools.PDFControlUI"
  7. xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="378" d:DesignWidth="432"
  10. Background="#FFF"
  11. BorderThickness="1">
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <cpdfcommon:ReverseBoolConverter x:Key="ReverseBoolConverter"></cpdfcommon:ReverseBoolConverter>
  15. <cpdfcommon:DocEditorResourceConverter x:Key="DocEditorResourceConverter"></cpdfcommon:DocEditorResourceConverter>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="30"></RowDefinition>
  21. <RowDefinition Height="200"></RowDefinition>
  22. <RowDefinition></RowDefinition>
  23. <RowDefinition Height="57"></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Title_Extract}" FontSize="14" Margin="12,6" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBlock>
  26. <Grid Grid.Row="1">
  27. <Border BorderBrush="#1A000000" BorderThickness="1" Width="382" Height="190" Margin="25,0,25,0">
  28. <StackPanel Orientation="Vertical" Margin="17">
  29. <RadioButton Margin="0,20,0,0" x:Name="AllPagesRadioButton" GroupName="PageRange" IsChecked="True" Tag="AllPages" Click="PageRangeRadioButtonClick">
  30. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_All}"></TextBlock>
  31. </RadioButton>
  32. <RadioButton Margin="0,20,0,0" x:Name="OddPagesRadioButton" GroupName="PageRange" Tag="OddPages" Click="PageRangeRadioButtonClick">
  33. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Odd}"></TextBlock>
  34. </RadioButton>
  35. <RadioButton Margin="0,20,0,0" x:Name="EvenPagesRadioButton" GroupName="PageRange" Tag="EvenPages" Click="PageRangeRadioButtonClick">
  36. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Even}"></TextBlock>
  37. </RadioButton>
  38. <StackPanel Orientation="Horizontal" Margin="0,16,0,0">
  39. <RadioButton x:Name="CustomPagesRadioButton" VerticalAlignment="Center" Tag="CustomPages" GroupName="PageRange" Click="PageRangeRadioButtonClick">
  40. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Range_Custom}"></TextBlock>
  41. </RadioButton>
  42. <TextBox x:Name="CustomPageRangeTextBox" Height="32" Width="135" Margin="12,0,0,0" IsEnabled="{Binding ElementName=CustomPagesRadioButton, Path=IsChecked}" TextChanged="TextBox_TextChanged" VerticalContentAlignment="Center"></TextBox>
  43. <TextBlock Text="/" VerticalAlignment="Center" Margin="8,0,0,0"></TextBlock>
  44. <TextBlock x:Name="MaxPageTextBlock" Text="10000" VerticalAlignment="Center" Margin="8,0,0,0"></TextBlock>
  45. </StackPanel>
  46. </StackPanel>
  47. </Border>
  48. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Subtitle_Pages}" FontFamily="Microsoft YaHei" Margin="40,-1,0,0" Padding="5,0,5,0" Background="White" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
  49. </Grid>
  50. <Grid Grid.Row="2">
  51. <StackPanel Margin="42,10,0,0">
  52. <CheckBox Margin="0,10,0,0" Click="SeparateCheckBoxClick" >
  53. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Separate}"></TextBlock>
  54. </CheckBox>
  55. <CheckBox x:Name="DeleteCheckBox" Margin="0,16,0,0" Click="DeleteCheckBoxClick" IsEnabled="{Binding ElementName=AllPagesRadioButton, Path=IsChecked, Converter={StaticResource ReverseBoolConverter}}">
  56. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Option_Delete}"></TextBlock>
  57. </CheckBox>
  58. </StackPanel>
  59. </Grid>
  60. <StackPanel HorizontalAlignment="Right" Grid.Row="3" Orientation="Horizontal" Margin="0,0,25,0">
  61. <Button x:Name="CancelButton" Height="32" Width="112" Click="CancelButton_Click">
  62. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Cancel}"></TextBlock>
  63. </Button>
  64. <Button x:Name="ExtractButton" Height="32" Width="112" Margin="8,0,0,0" Click="ExtractButton_Click">
  65. <TextBlock Text="{Binding Converter={StaticResource DocEditorResourceConverter},ConverterParameter=Button_Extract}"></TextBlock>
  66. </Button>
  67. </StackPanel>
  68. </Grid>
  69. </UserControl>