HomePageSplitDialog.xaml 7.8 KB

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