ConverterExcelDialog.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.ConverterDialogs.ConverterExcelDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  8. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
  11. xmlns:prism="http://prismlibrary.com/"
  12. Width="586"
  13. Height="522"
  14. d:DataContext="{d:DesignInstance Type=pageeditdialogs:ExtractDialogViewModel}"
  15. d:DesignHeight="522"
  16. d:DesignWidth="586"
  17. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. mc:Ignorable="d">
  20. <cus:DialogContent Header="{Binding T_Title}">
  21. <cus:DialogContent.Content>
  22. <Grid Grid.Row="1">
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="244" />
  25. <ColumnDefinition Width="*" />
  26. </Grid.ColumnDefinitions>
  27. <Grid Grid.Column="0">
  28. <cus:PageTurningPreview
  29. x:Name="ConverterPreview"
  30. VerticalAlignment="Top"
  31. Loaded="ConverterPreview_Loaded" />
  32. </Grid>
  33. <Grid Grid.Column="1">
  34. <StackPanel Margin="0,2,0,0" Orientation="Vertical">
  35. <StackPanel Orientation="Vertical">
  36. <TextBlock
  37. Height="20"
  38. Style="{StaticResource PropertyHeaderLv2}"
  39. Text="{Binding T_Settings}" />
  40. <StackPanel Margin="0,10,0,0" Orientation="Vertical">
  41. <RadioButton
  42. Name="AnyContentRadioBtn"
  43. Command="{Binding RadioButtonCommand}"
  44. CommandParameter="{Binding ElementName=AnyContentRadioBtn, Path=Name}"
  45. IsChecked="True"
  46. Style="{StaticResource RadioButtonStyleText}">
  47. <TextBlock Text="{Binding T_AllContents}" />
  48. </RadioButton>
  49. <ComboBox
  50. Width="326"
  51. Height="32"
  52. Margin="0,8,0,0"
  53. HorizontalAlignment="Left"
  54. IsEnabled="{Binding ElementName=AnyContentRadioBtn, Path=IsChecked}"
  55. SelectedIndex="{Binding AnyContentSelectIndex}">
  56. <ComboBoxItem Content="{Binding T_EachPageAllContents}" />
  57. <ComboBoxItem Content="{Binding T_FileAllContents}" />
  58. </ComboBox>
  59. <RadioButton
  60. Name="OnlyTableRadioBtn"
  61. Margin="0,8,0,0"
  62. Padding="8,0,0,0"
  63. Command="{Binding RadioButtonCommand}"
  64. CommandParameter="{Binding ElementName=OnlyTableRadioBtn, Path=Name}"
  65. Style="{StaticResource RadioButtonStyleText}">
  66. <TextBlock Text="{Binding T_OnlyTables}" />
  67. </RadioButton>
  68. <ComboBox
  69. Name="OnlyTableComboBox"
  70. Width="326"
  71. Height="32"
  72. Margin="0,8,0,0"
  73. HorizontalAlignment="Left"
  74. IsEnabled="{Binding ElementName=OnlyTableRadioBtn, Path=IsChecked}"
  75. SelectedIndex="{Binding OnlyTableSelectIndex}">
  76. <ComboBoxItem Content="{Binding T_EachTableOnlyTables}" />
  77. <ComboBoxItem Content="{Binding T_EachPageOnlyTables}" />
  78. <ComboBoxItem Content="{Binding T_FileOnlyTables}" />
  79. </ComboBox>
  80. <RadioButton
  81. Name="OnlyTextRadioBtn"
  82. Margin="0,8,0,0"
  83. Padding="8,0,0,0"
  84. Command="{Binding RadioButtonCommand}"
  85. CommandParameter="{Binding ElementName=OnlyTextRadioBtn, Path=Name}"
  86. Style="{StaticResource RadioButtonStyleText}">
  87. <TextBlock Text="{Binding T_OnlyText}" />
  88. </RadioButton>
  89. </StackPanel>
  90. </StackPanel>
  91. <StackPanel Margin="0,18,0,0" Orientation="Vertical">
  92. <StackPanel
  93. IsEnabled="{Binding OCRIsEnable}"
  94. Orientation="Vertical"
  95. Visibility="Visible">
  96. <TextBlock
  97. Height="20"
  98. HorizontalAlignment="Left"
  99. Style="{StaticResource PropertyHeaderLv2}"
  100. Text="Text Recognition Settings:" />
  101. <CheckBox
  102. Name="OCRCheckBox"
  103. Margin="0,10,0,0"
  104. Padding="8,0,0,0"
  105. IsChecked="{Binding OCRCheckBoxIsCheckBox}">
  106. <TextBlock Text="Recognize text if needed" />
  107. </CheckBox>
  108. <ComboBox
  109. Width="326"
  110. Height="32"
  111. Margin="0,8,0,0"
  112. HorizontalAlignment="Left"
  113. IsEnabled="{Binding ElementName=OCRCheckBox, Path=IsChecked}"
  114. SelectedIndex="{Binding LanguageSelectedIndex}">
  115. <ComboBoxItem Content="Chinese Simplified" />
  116. <ComboBoxItem Content="Chinese Traditional" />
  117. <ComboBoxItem Content="English" />
  118. <ComboBoxItem Content="Japanese" />
  119. <ComboBoxItem Content="Korean" />
  120. </ComboBox>
  121. </StackPanel>
  122. <StackPanel Margin="0,18,0,0" Orientation="Vertical">
  123. <TextBlock
  124. Height="20"
  125. HorizontalAlignment="Left"
  126. Style="{StaticResource PropertyHeaderLv2}"
  127. Text="{Binding T_PageRange}" />
  128. <cus:WritableComboBox
  129. x:Name="PageRangeComboBox"
  130. Width="326"
  131. Height="32"
  132. Margin="0,10,0,0"
  133. HorizontalAlignment="Left"
  134. IsCurrentPage="True"
  135. Loaded="PageRangeComboBox_Loaded"
  136. MaxPageRange="{Binding MaxPageRange}"
  137. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  138. Text="{Binding PageRangeText, Mode=TwoWay}">
  139. <i:Interaction.Triggers>
  140. <i:EventTrigger EventName="SelectionChanged">
  141. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  142. </i:EventTrigger>
  143. <i:EventTrigger EventName="TextChanged">
  144. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  145. </i:EventTrigger>
  146. <i:KeyTrigger Key="Return" FiredOn="KeyDown">
  147. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" />
  148. </i:KeyTrigger>
  149. </i:Interaction.Triggers>
  150. </cus:WritableComboBox>
  151. </StackPanel>
  152. </StackPanel>
  153. </StackPanel>
  154. </Grid>
  155. <StackPanel
  156. Grid.ColumnSpan="2"
  157. Height="20"
  158. Margin="0,0,16,8"
  159. HorizontalAlignment="Right"
  160. VerticalAlignment="Bottom"
  161. Panel.ZIndex="2"
  162. Orientation="Horizontal"
  163. Visibility="{Binding LimitationsConvertVisible}">
  164. <Grid Width="16" Height="16">
  165. <Ellipse
  166. Width="13"
  167. Height="13"
  168. Fill="white"
  169. Stroke="#CED0D4" />
  170. <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" />
  171. </Grid>
  172. <TextBlock
  173. Height="20"
  174. Margin="4,0,0,0"
  175. FontFamily="Segoe UI"
  176. FontSize="12"
  177. Foreground="#252629"
  178. Text="First 10 pages for free conversion." />
  179. <TextBlock
  180. Height="20"
  181. Margin="8,0,0,0"
  182. FontFamily="Segoe UI"
  183. FontSize="12"
  184. Foreground="{StaticResource color.light.blue.5}">
  185. <i:Interaction.Triggers>
  186. <i:EventTrigger EventName="MouseDown">
  187. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  188. </i:EventTrigger>
  189. </i:Interaction.Triggers>
  190. <Underline>
  191. <TextBlock Text="{Binding TextUpgrade}" />
  192. </Underline>
  193. </TextBlock>
  194. </StackPanel>
  195. </Grid>
  196. </cus:DialogContent.Content>
  197. <cus:DialogContent.BottmBar>
  198. <Grid>
  199. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,400,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  200. <Border>
  201. <TextBlock Text="批量处理" ></TextBlock>
  202. </Border>
  203. </Button>-->
  204. <Button
  205. Width="98"
  206. Height="32"
  207. Margin="0,0,16,0"
  208. HorizontalAlignment="Right"
  209. Command="{Binding CancelCommand}"
  210. Content="{Binding T_No}"
  211. Style="{StaticResource btn.sec}">
  212. <i:Interaction.Triggers>
  213. <i:EventTrigger EventName="PreviewMouseDown">
  214. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
  215. </i:EventTrigger>
  216. </i:Interaction.Triggers>
  217. </Button>
  218. <Button
  219. Width="98"
  220. Height="32"
  221. Margin="124,0"
  222. HorizontalAlignment="Right"
  223. Command="{Binding ConverterCommnad}"
  224. Content="{Binding T_YES}"
  225. Style="{StaticResource Btn.cta}" />
  226. </Grid>
  227. </cus:DialogContent.BottmBar>
  228. </cus:DialogContent>
  229. </UserControl>