ConverterCSVDialog.xaml 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <UserControl
  2. x:Class="PDF_Office.Views.Dialog.ConverterDialogs.ConverterCSVDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:converterdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.ConverterDialogs"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="529"
  14. Height="416"
  15. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterCSVDialogViewModel}"
  16. d:DesignHeight="416"
  17. d:DesignWidth="529"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d">
  21. <cus:DialogContent Header="PDF转CSV">
  22. <cus:DialogContent.Content>
  23. <Grid Grid.Row="1">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="212" />
  26. <ColumnDefinition Width="*" />
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Column="0">
  29. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <StackPanel Margin="18,16,0,0">
  33. <StackPanel>
  34. <RadioButton
  35. Name="ForEachPageRadioBtn"
  36. Command="{Binding RadioButtonCommand}"
  37. CommandParameter="{Binding ElementName=ForEachPageRadioBtn, Path=Name}">
  38. <TextBlock Text="将每个页面转换为一个单独的文档" />
  39. </RadioButton>
  40. <RadioButton
  41. Name="OnlyTableRadioBtn"
  42. Margin="0,6,0,0"
  43. Command="{Binding RadioButtonCommand}"
  44. CommandParameter="{Binding ElementName=ForTheDocRadioBtn, Path=Name}">
  45. <TextBlock Text="只提取表格" />
  46. </RadioButton>
  47. </StackPanel>
  48. <StackPanel Margin="0,14,0,0" Orientation="Vertical">
  49. <TextBlock
  50. Width="48"
  51. Height="20"
  52. HorizontalAlignment="Left"
  53. Text="页面范围" />
  54. <cus:WritableComboBox
  55. x:Name="PageRangeComboBox"
  56. Width="228"
  57. Height="32"
  58. Margin="0,4,0,0"
  59. HorizontalAlignment="Left"
  60. IsCurrentPage="True"
  61. Loaded="PageRangeComboBox_Loaded"
  62. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  63. Text="{Binding PageRangeText, Mode=TwoWay}">
  64. <i:Interaction.Triggers>
  65. <i:EventTrigger EventName="SelectionChanged">
  66. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  67. </i:EventTrigger>
  68. <i:EventTrigger EventName="TextChanged">
  69. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  70. </i:EventTrigger>
  71. </i:Interaction.Triggers>
  72. </cus:WritableComboBox>
  73. </StackPanel>
  74. </StackPanel>
  75. </Grid>
  76. </Grid>
  77. </cus:DialogContent.Content>
  78. <cus:DialogContent.BottmBar>
  79. <Grid>
  80. <Button
  81. Width="98"
  82. Height="32"
  83. Margin="0,0,124,0"
  84. HorizontalAlignment="Right"
  85. Command="{Binding CancelCommand}"
  86. Content="取消" />
  87. <Button
  88. Width="98"
  89. Height="32"
  90. Margin="16,0"
  91. HorizontalAlignment="Right"
  92. Command="{Binding ConverterCommnad}"
  93. Content="转换" />
  94. </Grid>
  95. </cus:DialogContent.BottmBar>
  96. </cus:DialogContent>
  97. </UserControl>