ConverterWordDialog.xaml 6.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <UserControl x:Class="PDF_Office.Views.Dialog.ConverterDialogs.ConverterWordDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
  10. xmlns:prism="http://prismlibrary.com/"
  11. Width="480"
  12. Height="416"
  13. d:DataContext="{d:DesignInstance Type=pageeditdialogs:ExtractDialogViewModel}"
  14. d:DesignHeight="416"
  15. d:DesignWidth="480"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. mc:Ignorable="d">
  19. <cus:DialogContent Header="PDF转Word">
  20. <cus:DialogContent.Content>
  21. <Grid Grid.Row="1">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="212"/>
  24. <ColumnDefinition Width="*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid Grid.Column="0" >
  27. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded"/>
  28. </Grid>
  29. <Grid Grid.Column="1">
  30. <StackPanel Orientation="Vertical" Margin="18,0,0,0">
  31. <StackPanel Orientation="Vertical" Margin="0,16,0,0" HorizontalAlignment="Left">
  32. <TextBlock Text="版面设置:" Width="60" Height="20" HorizontalAlignment="Left"/>
  33. <StackPanel Orientation="Horizontal" Margin="0,7,0,0">
  34. <RadioButton Name="FlowingTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=FlowingTextRadioBtn,Path=Name}" IsEnabled="False">
  35. <TextBlock Text="保留流排文本"/>
  36. </RadioButton>
  37. <RadioButton Margin="15,0,0,0" Name="PageLayoutRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=PageLayoutRadioBtn,Path=Name}" IsChecked="True">
  38. <TextBlock Text="保留页面布局"/>
  39. </RadioButton>
  40. </StackPanel>
  41. </StackPanel>
  42. <StackPanel Orientation="Vertical" Margin="0,17,0,0">
  43. <StackPanel Orientation="Vertical">
  44. <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
  45. <CheckBox Name="OCRCheckBox" Margin="0,5,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}">
  46. <TextBlock Text="在需要时识别文本"/>
  47. </CheckBox>
  48. <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
  49. <ComboBoxItem Content="Chinese Simplified"/>
  50. <ComboBoxItem Content="Chinese Traditional"/>
  51. <ComboBoxItem Content="English"/>
  52. <ComboBoxItem Content="Japan"/>
  53. <ComboBoxItem Content="Korean"/>
  54. </ComboBox>
  55. </StackPanel>
  56. <StackPanel Orientation="Vertical" Margin="0,14,0,0">
  57. <TextBlock Text="页面范围" Height="20" Width="48" HorizontalAlignment="Left"/>
  58. <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,4,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" Loaded="PageRangeComboBox_Loaded">
  59. <i:Interaction.Triggers>
  60. <i:EventTrigger EventName="SelectionChanged">
  61. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  62. </i:EventTrigger>
  63. <i:EventTrigger EventName="TextChanged">
  64. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  65. </i:EventTrigger>
  66. </i:Interaction.Triggers>
  67. </cus:WritableComboBox>
  68. </StackPanel>
  69. </StackPanel>
  70. </StackPanel>
  71. </Grid>
  72. </Grid>
  73. </cus:DialogContent.Content>
  74. <cus:DialogContent.BottmBar>
  75. <Grid>
  76. <Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}">
  77. <Border>
  78. <TextBlock Text="批量处理" ></TextBlock>
  79. </Border>
  80. </Button>
  81. <Button
  82. Width="98"
  83. Height="32"
  84. Margin="0,0,16,0"
  85. HorizontalAlignment="Right"
  86. Content="取消"
  87. Command="{Binding CancelCommand}"/>
  88. <Button
  89. Width="98"
  90. Height="32"
  91. Margin="124,0"
  92. HorizontalAlignment="Right"
  93. Content="转换"
  94. Command = "{Binding ConverterCommnad}"/>
  95. </Grid>
  96. </cus:DialogContent.BottmBar>
  97. </cus:DialogContent>
  98. </UserControl>