ConverterCSVDialog.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. MaxPageRange="{Binding MaxPageRange}"
  62. Loaded="PageRangeComboBox_Loaded"
  63. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  64. Text="{Binding PageRangeText, Mode=TwoWay}">
  65. <i:Interaction.Triggers>
  66. <i:EventTrigger EventName="SelectionChanged">
  67. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  68. </i:EventTrigger>
  69. <i:EventTrigger EventName="TextChanged">
  70. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  71. </i:EventTrigger>
  72. </i:Interaction.Triggers>
  73. </cus:WritableComboBox>
  74. </StackPanel>
  75. </StackPanel>
  76. </Grid>
  77. </Grid>
  78. </cus:DialogContent.Content>
  79. <cus:DialogContent.BottmBar>
  80. <Grid>
  81. <Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}">
  82. <Border>
  83. <TextBlock Text="批量处理" ></TextBlock>
  84. </Border>
  85. </Button>
  86. <Button
  87. Width="98"
  88. Height="32"
  89. Margin="0,0,124,0"
  90. HorizontalAlignment="Right"
  91. Command="{Binding CancelCommand}"
  92. Content="取消" />
  93. <Button
  94. Width="98"
  95. Height="32"
  96. Margin="16,0"
  97. HorizontalAlignment="Right"
  98. Command="{Binding ConverterCommnad}"
  99. Content="转换" />
  100. </Grid>
  101. </cus:DialogContent.BottmBar>
  102. </cus:DialogContent>
  103. </UserControl>