ConverterWordDialog.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterWordDialog"
  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_Master.ViewModels.Dialog.ConverterDialogs"
  6. xmlns:cus="clr-namespace:PDF_Master.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_Master.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="468"
  14. Height="478"
  15. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterWordDialogViewModel}"
  16. d:DesignHeight="478"
  17. d:DesignWidth="468"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d">
  21. <cus:DialogContent Header="{Binding T_Title}">
  22. <cus:DialogContent.Content>
  23. <Grid Grid.Row="1">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="244" />
  26. <ColumnDefinition Width="*" />
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Column="0" VerticalAlignment="Top">
  29. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <StackPanel Margin="0,2,0,0" Orientation="Vertical">
  33. <StackPanel Orientation="Vertical" Visibility="Visible">
  34. <TextBlock
  35. Height="20"
  36. HorizontalAlignment="Left"
  37. Style="{StaticResource PropertyHeaderLv2}"
  38. Text="Layout Settings" />
  39. <StackPanel Margin="0,8,0,0" Orientation="Vertical">
  40. <RadioButton
  41. Name="FlowingTextRadioBtn"
  42. Padding="8,0,0,0"
  43. Command="{Binding RadioButtonCommand}"
  44. CommandParameter="{Binding ElementName=FlowingTextRadioBtn, Path=Name}"
  45. IsChecked="True"
  46. Style="{StaticResource RadioButtonStyleText}">
  47. <TextBlock Text="Retain Flowing Text" />
  48. </RadioButton>
  49. <RadioButton
  50. Name="PageLayoutRadioBtn"
  51. Margin="0,8,0,0"
  52. Padding="8,0,0,0"
  53. Command="{Binding RadioButtonCommand}"
  54. CommandParameter="{Binding ElementName=PageLayoutRadioBtn, Path=Name}"
  55. IsChecked="False"
  56. Style="{StaticResource RadioButtonStyleText}">
  57. <TextBlock Text="Retain Page Layout" />
  58. </RadioButton>
  59. </StackPanel>
  60. </StackPanel>
  61. <StackPanel Margin="0,16,0,0" Orientation="Vertical">
  62. <StackPanel Orientation="Vertical" Visibility="Visible">
  63. <TextBlock
  64. Height="20"
  65. HorizontalAlignment="Left"
  66. Style="{StaticResource PropertyHeaderLv2}"
  67. Text="Text Recognition Settings" />
  68. <CheckBox
  69. Name="OCRCheckBox"
  70. Margin="0,8,0,0"
  71. Padding="8,0,0,0"
  72. Command="{Binding OpenOCRCommand}"
  73. IsChecked="{Binding OCRCheckBoxIsCheckBox}">
  74. <TextBlock Text="Recognize text if needed" />
  75. </CheckBox>
  76. <ComboBox
  77. Width="208"
  78. Height="32"
  79. Margin="0,8,0,8"
  80. HorizontalAlignment="Left"
  81. IsEnabled="{Binding ElementName=OCRCheckBox, Path=IsChecked}"
  82. SelectedIndex="{Binding LanguageSelectedIndex}">
  83. <ComboBoxItem Content="Chinese Simplified" />
  84. <ComboBoxItem Content="Chinese Traditional" />
  85. <ComboBoxItem Content="English" />
  86. <ComboBoxItem Content="Japanese" />
  87. <ComboBoxItem Content="Korean" />
  88. </ComboBox>
  89. </StackPanel>
  90. <StackPanel Margin="0,0,0,0" Orientation="Vertical">
  91. <TextBlock
  92. Height="20"
  93. HorizontalAlignment="Left"
  94. Style="{StaticResource PropertyHeaderLv2}"
  95. Text="{Binding T_PageRange}" />
  96. <cus:WritableComboBox
  97. x:Name="PageRangeComboBox"
  98. Width="208"
  99. Height="32"
  100. Margin="0,8,0,0"
  101. HorizontalAlignment="Left"
  102. IsCurrentPage="True"
  103. Loaded="PageRangeComboBox_Loaded"
  104. MaxPageRange="{Binding MaxPageRange}"
  105. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  106. Text="{Binding PageRangeText, Mode=TwoWay}">
  107. <i:Interaction.Triggers>
  108. <i:EventTrigger EventName="SelectionChanged">
  109. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  110. </i:EventTrigger>
  111. <i:EventTrigger EventName="TextChanged">
  112. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  113. </i:EventTrigger>
  114. <i:KeyTrigger Key="Return" FiredOn="KeyDown">
  115. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" />
  116. </i:KeyTrigger>
  117. </i:Interaction.Triggers>
  118. </cus:WritableComboBox>
  119. </StackPanel>
  120. </StackPanel>
  121. </StackPanel>
  122. </Grid>
  123. <StackPanel
  124. Grid.ColumnSpan="2"
  125. Height="20"
  126. Margin="0,0,16,8"
  127. HorizontalAlignment="Right"
  128. VerticalAlignment="Bottom"
  129. Panel.ZIndex="2"
  130. Orientation="Horizontal"
  131. Visibility="{Binding LimitationsConvertVisible}">
  132. <Grid Width="16" Height="16">
  133. <Ellipse
  134. Width="13"
  135. Height="13"
  136. Fill="white"
  137. Stroke="#CED0D4" />
  138. <Path Data="M7.4701 8.91H8.5001L8.7601 5.49L8.8101 4H7.1601L7.2101 5.49L7.4701 8.91ZM7.9901 11.58C8.4901 11.58 8.8701 11.21 8.8701 10.69C8.8701 10.17 8.4901 9.81 7.9901 9.81C7.4801 9.81 7.1001 10.17 7.1001 10.69C7.1001 11.21 7.4701 11.58 7.9901 11.58Z" Fill="#94989C" />
  139. </Grid>
  140. <TextBlock
  141. Height="20"
  142. Margin="4,0,0,0"
  143. FontFamily="Segoe UI"
  144. FontSize="12"
  145. Foreground="#252629"
  146. Text="First 10 pages for free conversion." />
  147. <TextBlock
  148. Height="20"
  149. Margin="8,0,0,0"
  150. FontFamily="Segoe UI"
  151. FontSize="12"
  152. Foreground="{StaticResource color.light.blue.5}">
  153. <i:Interaction.Triggers>
  154. <i:EventTrigger EventName="MouseDown">
  155. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  156. </i:EventTrigger>
  157. </i:Interaction.Triggers>
  158. <Underline>
  159. <TextBlock Text="{Binding TextUpgrade}" />
  160. </Underline>
  161. </TextBlock>
  162. </StackPanel>
  163. </Grid>
  164. </cus:DialogContent.Content>
  165. <cus:DialogContent.BottmBar>
  166. <Grid>
  167. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  168. <Border>
  169. <TextBlock Text="批量处理" ></TextBlock>
  170. </Border>
  171. </Button>-->
  172. <Button
  173. Width="98"
  174. Height="32"
  175. Margin="0,0,16,0"
  176. HorizontalAlignment="Right"
  177. Command="{Binding CancelCommand}"
  178. Content="{Binding T_No}"
  179. Style="{StaticResource btn.sec}">
  180. <i:Interaction.Triggers>
  181. <i:EventTrigger EventName="PreviewMouseDown">
  182. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  183. </i:EventTrigger>
  184. </i:Interaction.Triggers>
  185. </Button>
  186. <Button
  187. Width="98"
  188. Height="32"
  189. Margin="124,0"
  190. HorizontalAlignment="Right"
  191. Command="{Binding ConverterCommnad}"
  192. Content="{Binding T_YES}"
  193. Style="{StaticResource Btn.cta}" />
  194. </Grid>
  195. </cus:DialogContent.BottmBar>
  196. </cus:DialogContent>
  197. </UserControl>