HomePagePictureToPDFDialog.xaml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <UserControl
  2. x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePictureToPDFDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:PDF_Office.DataConvert"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:homepagetoolsdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.HomePageToolsDialogs"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:prism="http://prismlibrary.com/"
  11. x:Name="userControl"
  12. d:DataContext="{d:DesignInstance Type=homepagetoolsdialogs:HomePagePictureToPDFDialogViewModel}"
  13. d:DesignHeight="554"
  14. d:DesignWidth="892"
  15. prism:Dialog.WindowStyle="{StaticResource stlWindowEx}"
  16. prism:ViewModelLocator.AutoWireViewModel="True"
  17. mc:Ignorable="d">
  18. <UserControl.Resources>
  19. <ResourceDictionary>
  20. <ResourceDictionary.MergedDictionaries>
  21. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ListViewStyle.xaml" />
  22. </ResourceDictionary.MergedDictionaries>
  23. <Style x:Key="ImageFilesListViewStyle" TargetType="{x:Type ListView}">
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate TargetType="{x:Type ListView}">
  27. <Border
  28. x:Name="Bd"
  29. Padding="1"
  30. Background="{TemplateBinding Background}"
  31. BorderBrush="{TemplateBinding BorderBrush}"
  32. BorderThickness="{TemplateBinding BorderThickness}"
  33. SnapsToDevicePixels="true">
  34. <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
  35. <Grid>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="Auto" />
  38. <RowDefinition />
  39. </Grid.RowDefinitions>
  40. <Grid>
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width="4.5*" MinWidth="0" />
  43. <ColumnDefinition Width="3*" />
  44. <ColumnDefinition Width="2*" />
  45. <ColumnDefinition Width="100" />
  46. </Grid.ColumnDefinitions>
  47. <!-- 以下是列表模式的列标题 -->
  48. <TextBlock
  49. Margin="12,0,0,6"
  50. HorizontalAlignment="Left"
  51. VerticalAlignment="Center"
  52. FontSize="14" />
  53. <TextBlock
  54. Grid.Column="1"
  55. Margin="0,0,0,6"
  56. HorizontalAlignment="Center"
  57. VerticalAlignment="Center"
  58. FontSize="14"
  59. TextAlignment="Center"
  60. TextWrapping="Wrap" />
  61. <TextBlock
  62. Grid.Column="2"
  63. Margin="0,0,0,6"
  64. HorizontalAlignment="Center"
  65. VerticalAlignment="Center"
  66. FontSize="14" />
  67. <!-- 列表模式的列标题的分隔线 -->
  68. <Rectangle
  69. Grid.ColumnSpan="4"
  70. Height="0"
  71. Margin="12,0,0,0"
  72. HorizontalAlignment="Stretch"
  73. VerticalAlignment="Bottom"
  74. Fill="#26000000" />
  75. </Grid>
  76. <ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  77. </Grid>
  78. </ScrollViewer>
  79. </Border>
  80. </ControlTemplate>
  81. </Setter.Value>
  82. </Setter>
  83. </Style>
  84. <Style x:Key="HeadStyle" TargetType="{x:Type GridViewColumnHeader}">
  85. <Setter Property="OverridesDefaultStyle" Value="False" />
  86. <Setter Property="VerticalAlignment" Value="Center" />
  87. <Setter Property="HorizontalContentAlignment" Value="Left" />
  88. <Setter Property="Height" Value=" 32" />
  89. <Setter Property="TextBlock.FontFamily" Value="Segoe UI" />
  90. <Setter Property="Template">
  91. <Setter.Value>
  92. <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
  93. <Grid
  94. Name="g"
  95. HorizontalAlignment="Stretch"
  96. Background="AliceBlue">
  97. <Border Name="bd" Padding="{TemplateBinding Padding}">
  98. <ContentPresenter Margin="5,4,1,3" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
  99. </Border>
  100. </Grid>
  101. <ControlTemplate.Triggers>
  102. <Trigger Property="IsMouseOver" Value="True">
  103. <Setter TargetName="g" Property="Background">
  104. <Setter.Value>
  105. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  106. <GradientStop Offset="0.3" Color="#CED0D4" />
  107. </LinearGradientBrush>
  108. </Setter.Value>
  109. </Setter>
  110. </Trigger>
  111. </ControlTemplate.Triggers>
  112. </ControlTemplate>
  113. </Setter.Value>
  114. </Setter>
  115. </Style>
  116. <!-- ListViewItem的样式 -->
  117. <Style x:Key="listitem1" TargetType="{x:Type ListViewItem}">
  118. <Style.Setters>
  119. <Setter Property="SnapsToDevicePixels" Value="True" />
  120. <Setter Property="Template">
  121. <Setter.Value>
  122. <ControlTemplate TargetType="{x:Type ListViewItem}">
  123. <Border
  124. Name="Bd"
  125. Margin="{TemplateBinding Padding}"
  126. Padding="{TemplateBinding Control.Padding}"
  127. Background="{TemplateBinding Panel.Background}"
  128. BorderBrush="{TemplateBinding BorderBrush}"
  129. BorderThickness="{TemplateBinding BorderThickness}"
  130. SnapsToDevicePixels="True">
  131. <GridViewRowPresenter
  132. Margin="3"
  133. HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  134. VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
  135. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
  136. </Border>
  137. <ControlTemplate.Triggers>
  138. <Trigger Property="IsSelected" Value="True">
  139. <!--<Trigger.Setters>
  140. <Setter TargetName="Bd" Property="Background">
  141. <Setter.Value>
  142. <LinearGradientBrush StartPoint="0.5,0.22" EndPoint="0.5,1">
  143. <GradientStop Offset="0.31" Color="LightGray" />
  144. <GradientStop Offset="0.88" Color="Gray" />
  145. </LinearGradientBrush>
  146. </Setter.Value>
  147. </Setter>
  148. </Trigger.Setters>-->
  149. </Trigger>
  150. </ControlTemplate.Triggers>
  151. </ControlTemplate>
  152. </Setter.Value>
  153. </Setter>
  154. </Style.Setters>
  155. </Style>
  156. <convert:UnVisivleConvert x:Key="unVisibleConvert" />
  157. </ResourceDictionary>
  158. </UserControl.Resources>
  159. <Grid IsEnabled="{Binding PictureToPDFGridIsEnabled}">
  160. <Grid.ColumnDefinitions>
  161. <ColumnDefinition Width="632*" />
  162. <ColumnDefinition Width="260" />
  163. </Grid.ColumnDefinitions>
  164. <Grid Grid.Column="0">
  165. <Grid.RowDefinitions>
  166. <RowDefinition Height="*" />
  167. <RowDefinition Height="72" />
  168. </Grid.RowDefinitions>
  169. <Grid
  170. Grid.Row="0"
  171. AllowDrop="True"
  172. DragEnter="MainPage_DragEnter"
  173. DragLeave="MainPage_DragLeave"
  174. DragOver="MainPage_DragOver"
  175. Drop="Grid_Drop">
  176. <!--<Label Name="DropGrid" Background="#18A0FB" Opacity="0.5" Panel.ZIndex="1" Visibility="Collapsed"/>-->
  177. <Grid
  178. x:Name="grid"
  179. Width="632"
  180. Height="480"
  181. Visibility="{Binding AddFileVisibility}">
  182. <Button
  183. Name="BtnBlank"
  184. Width="418"
  185. Height="180"
  186. Background="White"
  187. BorderBrush="#FFFFFF"
  188. Command="{Binding ADDPictureCommand}"
  189. Visibility="{Binding AddFileVisibility}">
  190. <StackPanel>
  191. <Grid Width="128" Height="128">
  192. <Path
  193. Data="M19.5 43.7691C19.5 42.7996 20.286 42.0137 21.2555 42.0137H40.478C40.8527 42.0137 41.2176 42.1336 41.5193 42.3559L50.4493 48.9359C51.2666 49.5381 52.2551 49.8629 53.2702 49.8629H93.2372C94.2067 49.8629 94.9927 50.6489 94.9927 51.6184V95.5671C94.9927 96.5366 94.2067 97.3225 93.2372 97.3225H21.2555C20.286 97.3225 19.5 96.5366 19.5 95.5671V43.7691Z"
  194. Stroke="#CED0D4"
  195. StrokeThickness="3" />
  196. <Path
  197. Data="M27 41.3125V37.2555C27 35.4575 28.4575 34 30.2555 34H49.478C50.1729 34 50.8496 34.2224 51.4091 34.6346L60.3391 41.2146C60.8986 41.6269 61.5753 41.8493 62.2702 41.8493H100.237C102.035 41.8493 103.493 43.3068 103.493 45.1047V91C103.493 94.3137 100.806 97 97.4927 97H91.6811"
  198. Stroke="#CED0D4"
  199. StrokeThickness="3" />
  200. </Grid>
  201. <TextBlock
  202. Margin="0,8,0,0"
  203. HorizontalAlignment="Center"
  204. FontSize="14"
  205. Style="{StaticResource PropertyHeaderLv2}"
  206. Text="No Files" />
  207. <TextBlock
  208. Width="418"
  209. Height="20"
  210. Margin="0,2,0,0"
  211. FontSize="12"
  212. Style="{StaticResource PropertyHeaderLv2}"
  213. Text="Click the button below to select the file."
  214. TextAlignment="Center"
  215. TextBlock.Foreground="{StaticResource color.sys.text.neutral.lv3}" />
  216. </StackPanel>
  217. </Button>
  218. </Grid>
  219. <ListView
  220. x:Name="listView"
  221. Width="{Binding ActualWidth, ElementName=grid, Mode=OneWay}"
  222. Height="{Binding ActualHeight, ElementName=grid, Mode=OneWay}"
  223. Background="White"
  224. BorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  225. BorderThickness="0,0,0,1"
  226. DataContext="{Binding ImagesDataTable}"
  227. ItemsSource="{Binding}"
  228. SelectionChanged="listView_SelectionChanged"
  229. Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
  230. <ListView.ContextMenu>
  231. <ContextMenu StaysOpen="True">
  232. <MenuItem
  233. Name="OpenFileMenuItem"
  234. Click="OpenFileMenuItem_Click"
  235. Header="打开文件" />
  236. <MenuItem
  237. Name="RemoveFileMenuItem"
  238. Click="RemoveFileMenuItem_Click"
  239. Header="移除" />
  240. </ContextMenu>
  241. </ListView.ContextMenu>
  242. <ListView.View>
  243. <GridView ColumnHeaderContainerStyle="{StaticResource HeadStyle}">
  244. <GridViewColumn Width="400" Header="文档名">
  245. <GridViewColumn.CellTemplate>
  246. <DataTemplate>
  247. <StackPanel Orientation="Horizontal">
  248. <Label VerticalAlignment="Center">
  249. <Grid>
  250. <Rectangle
  251. Width="16"
  252. Height="16"
  253. Fill="AliceBlue"
  254. RadiusX="2"
  255. RadiusY="2" />
  256. <Path Data="M1.59814 10.3584H2.63037V5.42627H1.59814V10.3584Z" Fill="white" />
  257. <Path Data="M3.82666 10.3584H4.74609V7.00195H4.81445L6.0791 10.3584H6.7251L7.98975 7.00195H8.05811V10.3584H8.97754V5.42627H7.79492L6.43457 9.03564H6.37305L5.00928 5.42627H3.82666V10.3584Z" Fill="white" />
  258. <Path Data="M12.3237 10.4849C13.6704 10.4849 14.5112 9.66455 14.5112 8.35547V7.72998H12.4399V8.48193H13.5063L13.5029 8.57422C13.4824 9.19629 13.0176 9.60986 12.3408 9.60986C11.5273 9.60986 11.0112 8.9502 11.0112 7.88037V7.87354C11.0112 6.82422 11.5034 6.1748 12.2998 6.1748C12.8774 6.1748 13.2979 6.46533 13.438 6.9541L13.4448 6.98828H14.4702L14.4634 6.9541C14.3164 5.96973 13.4653 5.2998 12.2998 5.2998C10.8643 5.2998 9.9585 6.30127 9.9585 7.88379V7.89062C9.9585 9.49707 10.8574 10.4849 12.3237 10.4849Z" Fill="white" />
  259. </Grid>
  260. </Label>
  261. <TextBlock
  262. Margin="8,0,0,0"
  263. HorizontalAlignment="Left"
  264. VerticalAlignment="Center"
  265. Text="{Binding FileName}" />
  266. </StackPanel>
  267. </DataTemplate>
  268. </GridViewColumn.CellTemplate>
  269. </GridViewColumn>
  270. <GridViewColumn DisplayMemberBinding="{Binding FileSize}" Header="大小" />
  271. <GridViewColumn Header="状态">
  272. <GridViewColumn.CellTemplate>
  273. <DataTemplate>
  274. <StackPanel Orientation="Horizontal">
  275. <cus:BatchStatus
  276. Width="16"
  277. Height="16"
  278. MaxStatusValue="{Binding MaxPageRange, Mode=TwoWay}"
  279. StatusValue="{Binding FileState, Mode=TwoWay}" />
  280. <Button
  281. Name="DeleteTemplateBtn"
  282. Width="18"
  283. Height="18"
  284. Margin="39,0,0,0"
  285. Background="Transparent"
  286. BorderBrush="Transparent"
  287. Click="DeleteTemplateBtn_Click"
  288. Style="{StaticResource btn.sec}">
  289. <Grid Width="14" Height="14">
  290. <Path
  291. Data="M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14ZM10.5303 4.53038L8.06069 7L10.5303 9.46962L9.46967 10.5303L7.00002 8.06066L4.53033 10.5303L3.46967 9.46967L5.93936 7L3.46967 4.53033L4.53033 3.46967L7.00002 5.93934L9.46967 3.46971L10.5303 4.53038Z"
  292. Fill="#CED0D4"
  293. Stretch="Fill" />
  294. </Grid>
  295. </Button>
  296. </StackPanel>
  297. <DataTemplate.Triggers>
  298. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
  299. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible" />
  300. </DataTrigger>
  301. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
  302. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden" />
  303. </DataTrigger>
  304. </DataTemplate.Triggers>
  305. </DataTemplate>
  306. </GridViewColumn.CellTemplate>
  307. </GridViewColumn>
  308. </GridView>
  309. </ListView.View>
  310. <ListView.ItemContainerStyle>
  311. <Style BasedOn="{StaticResource listitem1}" TargetType="ListViewItem">
  312. <Setter Property="Height" Value="42" />
  313. <Setter Property="Margin" Value="0" />
  314. <Setter Property="BorderThickness" Value="0,1,0,0" />
  315. <Setter Property="TextBlock.Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  316. <Setter Property="TextBlock.FontFamily" Value="Segoe UI" />
  317. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  318. <Setter Property="Padding" Value="16,0,16,0" />
  319. <Style.Triggers>
  320. <Trigger Property="IsMouseOver" Value="True">
  321. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  322. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  323. <Setter Property="BorderThickness" Value="2,2,2,2" />
  324. </Trigger>
  325. <Trigger Property="IsSelected" Value="True">
  326. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  327. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  328. <Setter Property="BorderThickness" Value="2,2,2,2" />
  329. </Trigger>
  330. <Trigger Property="ListView.AlternationIndex" Value="1">
  331. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  332. </Trigger>
  333. </Style.Triggers>
  334. </Style>
  335. </ListView.ItemContainerStyle>
  336. </ListView>
  337. </Grid>
  338. <Grid Grid.Row="1">
  339. <Button
  340. x:Name="MenuBtn"
  341. Width="113"
  342. Height="32"
  343. Margin="25,0,0,0"
  344. HorizontalAlignment="Left"
  345. Click="Menu_Click"
  346. Style="{StaticResource btn.sec}">
  347. <StackPanel Orientation="Horizontal">
  348. <Border HorizontalAlignment="Right">
  349. <TextBlock
  350. Width="57"
  351. Height="22"
  352. FontSize="14"
  353. Foreground="Black"
  354. Text="Add Files" />
  355. </Border>
  356. <Border
  357. Width="12"
  358. Height="7"
  359. Margin="12,0,0,0">
  360. <Path
  361. HorizontalAlignment="Right"
  362. VerticalAlignment="Center"
  363. Data="M6 4.80726L1.26513 0L0 1.28448L5.36743 6.73398C5.71679 7.08868 6.28321 7.08868 6.63257 6.73398L12 1.28448L10.7349 0L6 4.80726Z"
  364. Fill="#94989C"
  365. Stretch="Fill" />
  366. </Border>
  367. </StackPanel>
  368. </Button>
  369. <Popup
  370. x:Name="menuPop1"
  371. AllowsTransparency="True"
  372. PlacementTarget="{Binding ElementName=MenuBtn}"
  373. StaysOpen="False">
  374. <Grid
  375. Width="auto"
  376. Height="auto"
  377. HorizontalAlignment="Left">
  378. <Border
  379. Margin="3"
  380. Background="White"
  381. BorderThickness="0"
  382. CornerRadius="3">
  383. <Border.Effect>
  384. <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6" />
  385. </Border.Effect>
  386. <StackPanel Margin="0">
  387. <MenuItem
  388. x:Name="添加文件"
  389. Command="{Binding ADDPictureCommand}"
  390. Header="添加文件" />
  391. <MenuItem
  392. x:Name="添加文件夹"
  393. Command="{Binding ADDPictureFilesCommand}"
  394. Header="添加文件夹" />
  395. </StackPanel>
  396. </Border>
  397. </Grid>
  398. </Popup>
  399. <!--<Button
  400. Width="40"
  401. Height="40"
  402. Margin="0,0,90,0"
  403. HorizontalAlignment="Right">
  404. </Button>-->
  405. <Button
  406. Width="32"
  407. Height="32"
  408. Margin="25,0"
  409. HorizontalAlignment="Right"
  410. Command="{Binding RemovePictureFileCommand}"
  411. IsEnabled="{Binding RemoveIsEnable}"
  412. Style="{StaticResource btn.sec}">
  413. <Grid Width="16" Height="16">
  414. <Path Data="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" Fill="#616469" />
  415. </Grid>
  416. </Button>
  417. </Grid>
  418. </Grid>
  419. <Grid
  420. Grid.Column="1"
  421. Background="WhiteSmoke"
  422. IsEnabled="{Binding SetPictureToPDFGridIsEnabled}">
  423. <Grid.RowDefinitions>
  424. <RowDefinition Height="1*" />
  425. <RowDefinition Height="64" />
  426. </Grid.RowDefinitions>
  427. <Grid Grid.Row="0" Margin="16,14,0,0">
  428. <StackPanel>
  429. <TextBlock Style="{StaticResource PagesView_titleContext}" Text="Setting" />
  430. <TextBlock
  431. Height="20"
  432. Margin="0,16,0,0"
  433. Style="{StaticResource PropertyHeaderLv2}"
  434. Text="Export" />
  435. <StackPanel Margin="0,8,0,0">
  436. <RadioButton
  437. Name="NewFilesRadioButtom"
  438. Padding="9,0,0,0"
  439. Click="RadioButton_Click"
  440. IsChecked="True"
  441. Style="{StaticResource RadioButtonStyleText}">
  442. <TextBlock Text="新建文档" />
  443. </RadioButton>
  444. <RadioButton
  445. Name="OneNewFileNameRadioButtom"
  446. Margin="0,8,0,0"
  447. Padding="9,0,0,0"
  448. Click="RadioButton_Click"
  449. Style="{StaticResource RadioButtonStyleText}">
  450. <TextBlock Text="合并为同一份PDF文档" />
  451. </RadioButton>
  452. <RadioButton
  453. Name="SelectFileNameRadioButton"
  454. Margin="0,8,0,0"
  455. Padding="9,0,0,0"
  456. Click="RadioButton_Click"
  457. Style="{StaticResource RadioButtonStyleText}"
  458. Visibility="Hidden">
  459. <TextBlock Text="插入现有PDF文档" />
  460. </RadioButton>
  461. </StackPanel>
  462. <StackPanel
  463. Margin="0,4,0,0"
  464. Orientation="Horizontal"
  465. Visibility="Hidden">
  466. <TextBox
  467. Width="190"
  468. Height="32"
  469. VerticalContentAlignment="Center"
  470. IsEnabled="False"
  471. Text="{Binding SelectFileName}" />
  472. <Button
  473. Width="32"
  474. Command="{Binding SelectFileCommand}"
  475. IsEnabled="{Binding ElementName=SelectFileNameRadioButton, Path=IsChecked}"
  476. Style="{StaticResource btn.sec}" />
  477. </StackPanel>
  478. </StackPanel>
  479. </Grid>
  480. <Grid
  481. Grid.Row="1"
  482. Margin="15,0,0,0"
  483. Visibility="Hidden">
  484. <StackPanel>
  485. <TextBlock Text="OCR" />
  486. <CheckBox Name="NeedOCRCheckBox" Margin="0,7,0,0">
  487. <TextBlock Text="在需要时识别文本" />
  488. </CheckBox>
  489. <ComboBox
  490. Width="228"
  491. Height="28.55"
  492. Margin="0,4,0,0"
  493. HorizontalAlignment="Left"
  494. IsEnabled="{Binding ElementName=NeedOCRCheckBox, Path=IsChecked}" />
  495. <CheckBox Margin="0,16,0,0" IsEnabled="{Binding ElementName=NeedOCRCheckBox, Path=IsChecked}">
  496. <TextBlock Text="识别为TXT" />
  497. </CheckBox>
  498. </StackPanel>
  499. </Grid>
  500. <Grid Grid.Row="1">
  501. <Button
  502. Width="228"
  503. Height="32"
  504. Command="{Binding ToPDFCommand}"
  505. IsEnabled="{Binding ImageToPDFBtnIsEnable}"
  506. Style="{StaticResource Btn.cta}">
  507. <TextBlock
  508. FontSize="18"
  509. Foreground="White"
  510. Text="导出文档" />
  511. </Button>
  512. </Grid>
  513. </Grid>
  514. </Grid>
  515. </UserControl>