ConverterWordDialog.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. Style="{StaticResource RadioButtonStyleText}">
  46. <TextBlock Text="Retain Flowing Text" />
  47. </RadioButton>
  48. <RadioButton
  49. Name="PageLayoutRadioBtn"
  50. Margin="0,8,0,0"
  51. Padding="8,0,0,0"
  52. Command="{Binding RadioButtonCommand}"
  53. CommandParameter="{Binding ElementName=PageLayoutRadioBtn, Path=Name}"
  54. IsChecked="True"
  55. Style="{StaticResource RadioButtonStyleText}">
  56. <TextBlock Text="Retain Page Layout" />
  57. </RadioButton>
  58. </StackPanel>
  59. </StackPanel>
  60. <StackPanel Margin="0,16,0,0" Orientation="Vertical">
  61. <StackPanel Orientation="Vertical" Visibility="Visible">
  62. <TextBlock
  63. Height="20"
  64. HorizontalAlignment="Left"
  65. Style="{StaticResource PropertyHeaderLv2}"
  66. Text="Text Recognition Settings" />
  67. <CheckBox
  68. Name="OCRCheckBox"
  69. Margin="0,8,0,0"
  70. Padding="8,0,0,0"
  71. IsChecked="{Binding OCRCheckBoxIsCheckBox}">
  72. <TextBlock Text="Recognize text if needed" />
  73. </CheckBox>
  74. <ComboBox
  75. Width="208"
  76. Height="32"
  77. Margin="0,8,0,8"
  78. HorizontalAlignment="Left"
  79. IsEnabled="{Binding ElementName=OCRCheckBox, Path=IsChecked}"
  80. SelectedIndex="{Binding LanguageSelectedIndex}">
  81. <ComboBoxItem Content="Chinese Simplified" />
  82. <ComboBoxItem Content="Chinese Traditional" />
  83. <ComboBoxItem Content="English" />
  84. <ComboBoxItem Content="Japanese" />
  85. <ComboBoxItem Content="Korean" />
  86. </ComboBox>
  87. </StackPanel>
  88. <StackPanel Margin="0,0,0,0" Orientation="Vertical">
  89. <TextBlock
  90. Height="20"
  91. HorizontalAlignment="Left"
  92. Style="{StaticResource PropertyHeaderLv2}"
  93. Text="{Binding T_PageRange}" />
  94. <cus:WritableComboBox
  95. x:Name="PageRangeComboBox"
  96. Width="208"
  97. Height="32"
  98. Margin="0,8,0,0"
  99. HorizontalAlignment="Left"
  100. IsCurrentPage="True"
  101. Loaded="PageRangeComboBox_Loaded"
  102. MaxPageRange="{Binding MaxPageRange}"
  103. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  104. Text="{Binding PageRangeText, Mode=TwoWay}">
  105. <i:Interaction.Triggers>
  106. <i:EventTrigger EventName="SelectionChanged">
  107. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  108. </i:EventTrigger>
  109. <i:EventTrigger EventName="TextChanged">
  110. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  111. </i:EventTrigger>
  112. <i:KeyTrigger Key="Return" FiredOn="KeyDown">
  113. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" />
  114. </i:KeyTrigger>
  115. </i:Interaction.Triggers>
  116. </cus:WritableComboBox>
  117. </StackPanel>
  118. </StackPanel>
  119. </StackPanel>
  120. </Grid>
  121. <StackPanel
  122. Grid.ColumnSpan="2"
  123. Height="20"
  124. Margin="0,0,16,8"
  125. HorizontalAlignment="Right"
  126. VerticalAlignment="Bottom"
  127. Panel.ZIndex="2"
  128. Orientation="Horizontal"
  129. Visibility="{Binding LimitationsConvertVisible}">
  130. <Grid Width="16" Height="16">
  131. <Ellipse
  132. Width="13"
  133. Height="13"
  134. Fill="white"
  135. Stroke="#CED0D4" />
  136. <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" />
  137. </Grid>
  138. <TextBlock
  139. Height="20"
  140. Margin="4,0,0,0"
  141. FontFamily="Segoe UI"
  142. FontSize="12"
  143. Foreground="#252629"
  144. Text="First 10 pages for free conversion." />
  145. <TextBlock
  146. Height="20"
  147. Margin="8,0,0,0"
  148. FontFamily="Segoe UI"
  149. FontSize="12"
  150. Foreground="{StaticResource color.light.blue.5}">
  151. <i:Interaction.Triggers>
  152. <i:EventTrigger EventName="MouseDown">
  153. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  154. </i:EventTrigger>
  155. </i:Interaction.Triggers>
  156. <Underline>
  157. <TextBlock Text="{Binding TextUpgrade}" />
  158. </Underline>
  159. </TextBlock>
  160. </StackPanel>
  161. </Grid>
  162. </cus:DialogContent.Content>
  163. <cus:DialogContent.BottmBar>
  164. <Grid>
  165. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  166. <Border>
  167. <TextBlock Text="批量处理" ></TextBlock>
  168. </Border>
  169. </Button>-->
  170. <Button
  171. Width="98"
  172. Height="32"
  173. Margin="0,0,16,0"
  174. HorizontalAlignment="Right"
  175. Command="{Binding CancelCommand}"
  176. Content="{Binding T_No}"
  177. Style="{StaticResource btn.sec}">
  178. <i:Interaction.Triggers>
  179. <i:EventTrigger EventName="PreviewMouseDown">
  180. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  181. </i:EventTrigger>
  182. </i:Interaction.Triggers>
  183. </Button>
  184. <Button
  185. Width="98"
  186. Height="32"
  187. Margin="124,0"
  188. HorizontalAlignment="Right"
  189. Command="{Binding ConverterCommnad}"
  190. Content="{Binding T_YES}"
  191. Style="{StaticResource Btn.cta}" />
  192. </Grid>
  193. </cus:DialogContent.BottmBar>
  194. </cus:DialogContent>
  195. </UserControl>