HomePageSplitDialog.xaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  15. mc:Ignorable="d">
  16. <cus:DialogContent Header="拆分">
  17. <cus:DialogContent.Content>
  18. <Grid Grid.Row="1">
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="409"></RowDefinition>
  21. </Grid.RowDefinitions>
  22. <Grid Grid.Row="0">
  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" Minimum="1" 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" Minimum="1" Text="{Binding AverageFilesText,Mode=TwoWay}" IsEnabled="{Binding AverageFilesIsEnabled}"></cus:NumericUpDown>
  48. <TextBlock Text="个PDF文件" VerticalAlignment="Center"></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}">
  54. <i:Interaction.Triggers>
  55. <i:EventTrigger EventName="SelectionChanged">
  56. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=SplitPreview}" />
  57. </i:EventTrigger>
  58. <i:EventTrigger EventName="TextChanged">
  59. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=SplitPreview}" />
  60. </i:EventTrigger>
  61. </i:Interaction.Triggers>
  62. </cus:WritableComboBox>
  63. </StackPanel>
  64. </StackPanel>
  65. </Grid>
  66. <Grid Grid.Row="1">
  67. <StackPanel Orientation="Vertical">
  68. <TextBlock Text="文档命名" Height="22" Width="56" HorizontalAlignment="Left"></TextBlock>
  69. <TextBlock Height="32" Width="303" Margin="0,0,0,6" Text="{Binding FilePathName}"></TextBlock>
  70. <StackPanel Orientation="Horizontal" Margin="0,0,0,13">
  71. <CheckBox Margin="0,0,11,0" Command="{Binding FrontFileNameCommand}" IsChecked="{Binding FrontFileIsCheck}"></CheckBox>
  72. <TextBlock Text="将原始文档名前置"></TextBlock>
  73. </StackPanel>
  74. <StackPanel Orientation="Horizontal" Margin="0,0,0,8">
  75. <CheckBox VerticalAlignment="Center" Margin="0,0,11,0" Command="{Binding FileNameLabelCommand}" IsChecked="{Binding FileNameLabelIsCheck}"></CheckBox>
  76. <TextBlock Text="标签" VerticalAlignment="Center" Margin="0,0,30,0"></TextBlock>
  77. <TextBox x:Name="FileNameLabelTextBox" Height="32" Width="110" Text="{Binding FileNameLabelText}" TextChanged="TextBox_TextChanged" IsEnabled="{Binding FileNameLabelIsEnabled}"></TextBox>
  78. </StackPanel>
  79. <StackPanel Orientation="Horizontal">
  80. <CheckBox VerticalAlignment="Center" Margin="0,0,11,0" Command="{Binding FileNameDeimiterCommand}" IsChecked="{Binding FileNameDeimiterIsCheck}"></CheckBox>
  81. <TextBlock Text="分隔符" VerticalAlignment="Center" Margin="0,0,18,0"></TextBlock>
  82. <TextBox x:Name="FileNameDeimiterTextBox" Height="32" Width="110" Text="{Binding FileNameDeimiterText}" TextChanged="TextBox_TextChanged" IsEnabled="{Binding FileNameDeimiterIsEnabled}"></TextBox>
  83. </StackPanel>
  84. </StackPanel>
  85. </Grid>
  86. </Grid>
  87. </Grid>
  88. </Grid>
  89. </cus:DialogContent.Content>
  90. <cus:DialogContent.BottmBar>
  91. <Grid>
  92. <Button
  93. Width="98"
  94. Height="32"
  95. Margin="16,0"
  96. HorizontalAlignment="Right"
  97. Command="{Binding CancelCommand}"
  98. Content="取消" />
  99. <Button
  100. Width="98"
  101. Height="32"
  102. Margin="124,0"
  103. HorizontalAlignment="Right"
  104. Command="{Binding SplitCommand}"
  105. Content="拆分" />
  106. </Grid>
  107. </cus:DialogContent.BottmBar>
  108. </cus:DialogContent>
  109. </UserControl>