HomePageSplitDialog.xaml 6.8 KB

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