HomePageSplitDialog.xaml 7.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageSplitDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. Height="521"
  10. Width="583"
  11. d:DesignHeight="521"
  12. d:DesignWidth="583"
  13. mc:Ignorable="d">
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="48"></RowDefinition>
  17. <RowDefinition Height="*"></RowDefinition>
  18. <RowDefinition Height="64"></RowDefinition>
  19. </Grid.RowDefinitions>
  20. <TextBlock Grid.Row="0" Text="拆分" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
  21. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center" Height="409">
  22. <Grid >
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="212"/>
  25. <ColumnDefinition Width="*"/>
  26. </Grid.ColumnDefinitions>
  27. <Grid Grid.Column="0" VerticalAlignment="Top">
  28. <cus:PageTurningPreview x:Name="SplitPreview" Loaded="PageTurningPreview_Loaded" ></cus:PageTurningPreview>
  29. </Grid>
  30. <Grid Grid.Column="1" Margin="7,20,10,40">
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="4*"></RowDefinition>
  33. <RowDefinition Height="4*"></RowDefinition>
  34. </Grid.RowDefinitions>
  35. <Grid Grid.Row="0">
  36. <StackPanel Orientation="Vertical" >
  37. <TextBlock Text="拆分方式" Height="22" Width="56" HorizontalAlignment="Left" Margin="0,0,0,17"></TextBlock>
  38. <StackPanel Orientation="Horizontal" Margin="0,0,0,8">
  39. <RadioButton VerticalAlignment="Center" IsChecked="{Binding AveragePagesIsCheck}" Command="{Binding AveragePagesCommand}"></RadioButton>
  40. <TextBlock Text="平均每" VerticalAlignment="Center"></TextBlock>
  41. <cus:NumericUpDown Height="32" Width="110" Text="{Binding AveragePagesText,Mode=TwoWay}" IsEnabled="{Binding AveragePagesIsEnabled}"></cus:NumericUpDown>
  42. <TextBlock Text="页拆分为一个文件" VerticalAlignment="Center"></TextBlock>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal" Margin="0,0,0,8">
  45. <RadioButton VerticalAlignment="Center" IsChecked="{Binding AverageFilesIsCheck}" Command="{Binding AverageFilesCommand}"></RadioButton>
  46. <TextBlock Text="平均拆分为" VerticalAlignment="Center"></TextBlock>
  47. <cus:NumericUpDown Height="32" Width="110" Text="{Binding AverageFilesText,Mode=TwoWay}" IsEnabled="{Binding AverageFilesIsEnabled}"></cus:NumericUpDown>
  48. <TextBlock Text="个PDF文件"></TextBlock>
  49. </StackPanel>
  50. <StackPanel Orientation="Horizontal">
  51. <RadioButton VerticalAlignment="Center" IsChecked="{Binding CustomPageRangeIsCheck}" Command="{Binding CustomPageRangeCommand}"></RadioButton>
  52. <TextBlock Text="按特定页面拆分" VerticalAlignment="Center"></TextBlock>
  53. <cus:WritableComboBox x:Name="PageRangeComboBox" Height="32" Width="183" Text="{Binding PageRangeText, Mode=TwoWay}" IsEnabled="{Binding CustomPageRangeIsEnabled}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" Loaded="WritableComboBox_Loaded"/>
  54. </StackPanel>
  55. </StackPanel>
  56. </Grid>
  57. <Grid Grid.Row="1">
  58. <StackPanel Orientation="Vertical">
  59. <TextBlock Text="文档命名" Height="22" Width="56" HorizontalAlignment="Left"></TextBlock>
  60. <TextBlock Height="32" Width="303" Margin="0,0,0,6" Text="{Binding FilePathName}"></TextBlock>
  61. <StackPanel Orientation="Horizontal" Margin="0,0,0,13">
  62. <CheckBox Margin="0,0,11,0" Command="{Binding FrontFileNameCommand}" IsChecked="{Binding FrontFileIsCheck}"></CheckBox>
  63. <TextBlock Text="将原始文档名前置"></TextBlock>
  64. </StackPanel>
  65. <StackPanel Orientation="Horizontal" Margin="0,0,0,8">
  66. <CheckBox VerticalAlignment="Center" Margin="0,0,11,0" Command="{Binding FileNameLabelCommand}" IsChecked="{Binding FileNameLabelIsCheck}"></CheckBox>
  67. <TextBlock Text="标签" VerticalAlignment="Center" Margin="0,0,30,0"></TextBlock>
  68. <TextBox x:Name="FileNameLabelTextBox" Height="32" Width="110" Text="{Binding FileNameLabelText}" TextChanged="TextBox_TextChanged" IsEnabled="{Binding FileNameLabelIsEnabled}"></TextBox>
  69. </StackPanel>
  70. <StackPanel Orientation="Horizontal">
  71. <CheckBox VerticalAlignment="Center" Margin="0,0,11,0" Command="{Binding FileNameDeimiterCommand}" IsChecked="{Binding FileNameDeimiterIsCheck}"></CheckBox>
  72. <TextBlock Text="分隔符" VerticalAlignment="Center" Margin="0,0,18,0"></TextBlock>
  73. <TextBox x:Name="FileNameDeimiterTextBox" Height="32" Width="110" Text="{Binding FileNameDeimiterText}" TextChanged="TextBox_TextChanged" IsEnabled="{Binding FileNameDeimiterIsEnabled}"></TextBox>
  74. </StackPanel>
  75. </StackPanel>
  76. </Grid>
  77. </Grid>
  78. </Grid>
  79. </Border>
  80. <Grid Grid.Row="2">
  81. <Button
  82. Width="98"
  83. Height="32"
  84. Margin="16,0"
  85. HorizontalAlignment="Right"
  86. Command="{Binding CancelCommand}"
  87. Content="取消" />
  88. <Button
  89. Width="98"
  90. Height="32"
  91. Margin="124,0"
  92. HorizontalAlignment="Right"
  93. Command="{Binding SplitCommand}"
  94. Content="拆分" />
  95. </Grid>
  96. </Grid>
  97. </UserControl>