HomePagePictureToPDFDialog.xaml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. <UserControl
  2. x:Class="PDF_Master.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_Master.DataConvert"
  6. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:homepagetoolsdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.HomePageToolsDialogs"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:prism="http://prismlibrary.com/"
  11. xmlns:mainpage="clr-namespace:PDF_Master.Strings.MainPage"
  12. x:Name="userControl"
  13. d:DataContext="{d:DesignInstance Type=homepagetoolsdialogs:HomePagePictureToPDFDialogViewModel}"
  14. prism:Dialog.WindowStyle="{StaticResource stlWindowEx}"
  15. d:DesignHeight="640"
  16. SizeChanged="userControl_SizeChanged"
  17. d:DesignWidth="1024"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. mc:Ignorable="d">
  20. <UserControl.Resources>
  21. <ResourceDictionary>
  22. <ResourceDictionary.MergedDictionaries>
  23. <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/ListViewStyle.xaml" />
  24. </ResourceDictionary.MergedDictionaries>
  25. <Style x:Key="ImageFilesListViewStyle" TargetType="{x:Type ListView}">
  26. <Setter Property="Template">
  27. <Setter.Value>
  28. <ControlTemplate TargetType="{x:Type ListView}">
  29. <Border
  30. x:Name="Bd"
  31. Padding="1"
  32. Background="{TemplateBinding Background}"
  33. BorderBrush="{TemplateBinding BorderBrush}"
  34. BorderThickness="{TemplateBinding BorderThickness}"
  35. SnapsToDevicePixels="true">
  36. <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
  37. <Grid>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="Auto" />
  40. <RowDefinition />
  41. </Grid.RowDefinitions>
  42. <Grid>
  43. <Grid.ColumnDefinitions>
  44. <ColumnDefinition Width="4.5*" MinWidth="0" />
  45. <ColumnDefinition Width="3*" />
  46. <ColumnDefinition Width="2*" />
  47. <ColumnDefinition Width="100" />
  48. </Grid.ColumnDefinitions>
  49. <!-- 以下是列表模式的列标题 -->
  50. <TextBlock
  51. Margin="12,0,0,6"
  52. HorizontalAlignment="Left"
  53. VerticalAlignment="Center"
  54. FontSize="14" />
  55. <TextBlock
  56. Grid.Column="1"
  57. Margin="0,0,0,6"
  58. HorizontalAlignment="Center"
  59. VerticalAlignment="Center"
  60. FontSize="14"
  61. TextAlignment="Center"
  62. TextWrapping="Wrap" />
  63. <TextBlock
  64. Grid.Column="2"
  65. Margin="0,0,0,6"
  66. HorizontalAlignment="Center"
  67. VerticalAlignment="Center"
  68. FontSize="14" />
  69. <!-- 列表模式的列标题的分隔线 -->
  70. <Rectangle
  71. Grid.ColumnSpan="4"
  72. Height="0"
  73. Margin="12,0,0,0"
  74. HorizontalAlignment="Stretch"
  75. VerticalAlignment="Bottom"
  76. Fill="#26000000" />
  77. </Grid>
  78. <ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  79. </Grid>
  80. </ScrollViewer>
  81. </Border>
  82. </ControlTemplate>
  83. </Setter.Value>
  84. </Setter>
  85. </Style>
  86. <Style x:Key="HeadStyle" TargetType="{x:Type GridViewColumnHeader}">
  87. <Setter Property="OverridesDefaultStyle" Value="False" />
  88. <Setter Property="VerticalAlignment" Value="Center" />
  89. <Setter Property="HorizontalContentAlignment" Value="Left" />
  90. <Setter Property="Height" Value=" 32" />
  91. <Setter Property="TextBlock.FontFamily" Value="Segoe UI" />
  92. <Setter Property="Template">
  93. <Setter.Value>
  94. <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
  95. <Grid
  96. Name="g"
  97. Width="{TemplateBinding Width}"
  98. Background="#FFFFFF">
  99. <Border Name="bd" Padding="{TemplateBinding Padding}" BorderThickness="0,0,0,1" BorderBrush="{StaticResource color.item-state.sel.border.lv3}">
  100. <ContentPresenter Margin="5,4,1,3" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
  101. </Border>
  102. </Grid>
  103. </ControlTemplate>
  104. </Setter.Value>
  105. </Setter>
  106. </Style>
  107. <!-- ListViewItem的样式 -->
  108. <Style x:Key="listitem1" TargetType="{x:Type ListViewItem}">
  109. <Style.Setters>
  110. <Setter Property="SnapsToDevicePixels" Value="True" />
  111. <Setter Property="Template">
  112. <Setter.Value>
  113. <ControlTemplate TargetType="{x:Type ListViewItem}">
  114. <Border
  115. Name="Bd"
  116. Margin="2"
  117. Padding="{TemplateBinding Control.Padding}"
  118. Background="{TemplateBinding Panel.Background}"
  119. BorderBrush="{TemplateBinding BorderBrush}"
  120. BorderThickness="{TemplateBinding BorderThickness}"
  121. CornerRadius="4"
  122. SnapsToDevicePixels="True">
  123. <GridViewRowPresenter
  124. Margin="3"
  125. HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  126. VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
  127. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
  128. </Border>
  129. <ControlTemplate.Triggers>
  130. <Trigger Property="IsSelected" Value="True">
  131. <!--<Trigger.Setters>
  132. <Setter TargetName="Bd" Property="Background">
  133. <Setter.Value>
  134. <LinearGradientBrush StartPoint="0.5,0.22" EndPoint="0.5,1">
  135. <GradientStop Offset="0.31" Color="LightGray" />
  136. <GradientStop Offset="0.88" Color="Gray" />
  137. </LinearGradientBrush>
  138. </Setter.Value>
  139. </Setter>
  140. </Trigger.Setters>-->
  141. </Trigger>
  142. </ControlTemplate.Triggers>
  143. </ControlTemplate>
  144. </Setter.Value>
  145. </Setter>
  146. </Style.Setters>
  147. </Style>
  148. <convert:UnVisivleConvert x:Key="unVisibleConvert" />
  149. <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
  150. </ResourceDictionary>
  151. </UserControl.Resources>
  152. <Grid >
  153. <Grid.RowDefinitions>
  154. <RowDefinition Height="40" />
  155. <RowDefinition Height="*" />
  156. </Grid.RowDefinitions>
  157. <Grid Background="{StaticResource color.sys.layout.bg.tabbar}" >
  158. <TextBlock Text="{Binding T_Title}" Foreground="{StaticResource color.sys.text.neutral.lv1}" FontSize="16" FontFamily="Segoe UI" VerticalAlignment="Center" FontWeight="DemiBold" Margin="16,8,0,8" HorizontalAlignment="Left"></TextBlock>
  159. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" WindowChrome.IsHitTestVisibleInChrome="True">
  160. <Button
  161. Name="BtnMiniSize"
  162. Width="40"
  163. Height="40"
  164. Background="Transparent"
  165. BorderThickness="0"
  166. Click="BtnMiniSize_Click"
  167. Style="{StaticResource TitleBarBtn}">
  168. <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
  169. <Polygon.RenderTransform>
  170. <TransformGroup>
  171. <TranslateTransform Y="-3" />
  172. </TransformGroup>
  173. </Polygon.RenderTransform>
  174. </Polygon>
  175. </Button>
  176. <Button
  177. Name="BtnReStore"
  178. Width="40"
  179. Height="40"
  180. Background="Transparent"
  181. BorderThickness="0"
  182. Click="BtnReStore_Click"
  183. Style="{StaticResource TitleBarBtn}">
  184. <Grid>
  185. <Path
  186. x:Name="ico_max"
  187. Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
  188. Fill="{StaticResource color.btn.sec.text.def}"
  189. Visibility="Collapsed" />
  190. <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
  191. <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
  192. <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
  193. </Grid>
  194. </Grid>
  195. </Button>
  196. <Button
  197. Name="BtnClose"
  198. Width="40"
  199. Height="40"
  200. Background="Transparent"
  201. BorderThickness="0"
  202. Click="BtnClose_Click"
  203. Style="{StaticResource CloseBtn}">
  204. <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
  205. </Button>
  206. </StackPanel>
  207. </Grid>
  208. <Grid IsEnabled="{Binding PictureToPDFGridIsEnabled}" Grid.Row="1" Background="{StaticResource color.sys.layout.anti}">
  209. <Grid.ColumnDefinitions>
  210. <ColumnDefinition Width="764*" />
  211. <ColumnDefinition Width="260" />
  212. </Grid.ColumnDefinitions>
  213. <Grid Grid.Column="0">
  214. <Grid.RowDefinitions>
  215. <RowDefinition Height="*" />
  216. <RowDefinition Height="72" />
  217. </Grid.RowDefinitions>
  218. <Grid
  219. Grid.Row="0"
  220. x:Name="grid"
  221. AllowDrop="True"
  222. DragEnter="MainPage_DragEnter"
  223. DragLeave="MainPage_DragLeave"
  224. DragOver="MainPage_DragOver"
  225. Drop="Grid_Drop">
  226. <!--<Label Name="DropGrid" Background="#18A0FB" Opacity="0.5" Panel.ZIndex="1" Visibility="Collapsed"/>-->
  227. <Grid
  228. Width="732"
  229. Height="600"
  230. Visibility="{Binding AddFileVisibility}">
  231. <Button
  232. Name="BtnBlank"
  233. Width="418"
  234. Height="180"
  235. Style="{StaticResource btn.sec}"
  236. Command="{Binding ADDPictureCommand}"
  237. BorderBrush="#FFFFFFFF"
  238. Visibility="{Binding AddFileVisibility}">
  239. <StackPanel>
  240. <Grid Width="128" Height="128">
  241. <Path
  242. 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"
  243. Stroke="#CED0D4"
  244. StrokeThickness="3" />
  245. <Path
  246. 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"
  247. Stroke="#CED0D4"
  248. StrokeThickness="3" />
  249. </Grid>
  250. <TextBlock
  251. Margin="0,8,0,0"
  252. HorizontalAlignment="Center"
  253. FontSize="14"
  254. Style="{StaticResource PropertyHeaderLv2}"
  255. Text="No Files" />
  256. <TextBlock
  257. Width="418"
  258. Height="20"
  259. Margin="0,2,0,0"
  260. FontSize="12"
  261. Style="{StaticResource PropertyHeaderLv2}"
  262. Text="{Binding T_EmptyContext}"
  263. TextAlignment="Center"
  264. TextBlock.Foreground="{StaticResource color.sys.text.neutral.lv3}" />
  265. </StackPanel>
  266. </Button>
  267. </Grid>
  268. <Grid Width="{Binding ActualWidth, ElementName=grid, Mode=OneWay}"
  269. Height="{Binding ActualHeight, ElementName=grid, Mode=OneWay}" >
  270. <Grid Width="{Binding ActualWidth, ElementName=grid, Mode=OneWay}" Visibility="Hidden">
  271. <Grid.ColumnDefinitions>
  272. <ColumnDefinition Width="16" />
  273. <ColumnDefinition Width="*" />
  274. <ColumnDefinition Width="16" />
  275. </Grid.ColumnDefinitions>
  276. <Grid Grid.Column="1" x:Name="col4" />
  277. </Grid>
  278. <Grid x:Name="gridContainer" Width="{Binding ElementName=col4, Path=ActualWidth}" Visibility="Hidden">
  279. <Grid.ColumnDefinitions>
  280. <ColumnDefinition Width="16"/>
  281. <ColumnDefinition Width="588*" />
  282. <ColumnDefinition Width="68*" />
  283. <ColumnDefinition Width="88*"/>
  284. </Grid.ColumnDefinitions>
  285. <Grid Grid.Column="1" x:Name="col1" />
  286. <Grid Grid.Column="2" x:Name="col2"/>
  287. <Grid Grid.Column="3" x:Name="col3" />
  288. </Grid>
  289. <ListView
  290. PreviewKeyDown="listView_PreviewKeyDown"
  291. Width="{Binding ElementName=col4, Path=ActualWidth}"
  292. HorizontalAlignment="Center"
  293. x:Name="listView"
  294. Background="White"
  295. BorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  296. BorderThickness="0,0,0,0"
  297. DataContext="{Binding ImagesDataTable}"
  298. ItemsSource="{Binding}"
  299. SelectionChanged="listView_SelectionChanged"
  300. Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
  301. <ListView.ContextMenu>
  302. <ContextMenu StaysOpen="True">
  303. <MenuItem
  304. Name="OpenFileMenuItem"
  305. Click="OpenFileMenuItem_Click"
  306. Header="{x:Static mainpage:MainPage.ImageToPDF_MenuShowFolder}" />
  307. <MenuItem
  308. Name="RemoveFileMenuItem"
  309. Click="RemoveFileMenuItem_Click"
  310. Header="{x:Static mainpage:MainPage.ImageToPDF_MenuDelete}" />
  311. </ContextMenu>
  312. </ListView.ContextMenu>
  313. <ListView.View>
  314. <GridView ColumnHeaderContainerStyle="{StaticResource HeadStyle}">
  315. <GridViewColumn Width="{Binding ElementName=col1, Path=ActualWidth}" Header="{x:Static mainpage:MainPage.ImageToPDF_FileName}">
  316. <GridViewColumn.CellTemplate>
  317. <DataTemplate>
  318. <StackPanel Orientation="Horizontal">
  319. <Label VerticalAlignment="Center">
  320. <Grid>
  321. <Rectangle
  322. Width="16"
  323. Height="16"
  324. Fill="#617CA1"
  325. RadiusX="2"
  326. RadiusY="2" />
  327. <Path Data="M1.59814 10.3584H2.63037V5.42627H1.59814V10.3584Z" Fill="white" />
  328. <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" />
  329. <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" />
  330. </Grid>
  331. </Label>
  332. <TextBlock
  333. Margin="8,0,0,0"
  334. HorizontalAlignment="Left"
  335. VerticalAlignment="Center"
  336. Text="{Binding FileName}" />
  337. </StackPanel>
  338. </DataTemplate>
  339. </GridViewColumn.CellTemplate>
  340. </GridViewColumn>
  341. <GridViewColumn DisplayMemberBinding="{Binding FileSize}" Width="{Binding ElementName=col2, Path=ActualWidth}" Header="{x:Static mainpage:MainPage.ImageToPDF_Size}" />
  342. <GridViewColumn Header="{x:Static mainpage:MainPage.ImageToPDF_Status}" Width="{Binding ElementName=col3, Path=ActualWidth}">
  343. <GridViewColumn.CellTemplate>
  344. <DataTemplate>
  345. <StackPanel Orientation="Horizontal">
  346. <cus:BatchStatus
  347. Width="16"
  348. Height="16"
  349. MaxStatusValue="{Binding MaxPageRange, Mode=TwoWay}"
  350. StatusValue="{Binding FileState, Mode=TwoWay}" />
  351. <Button
  352. Name="DeleteTemplateBtn"
  353. Width="18"
  354. Height="18"
  355. Margin="32,0,0,0"
  356. Background="Transparent"
  357. BorderBrush="Transparent"
  358. Click="DeleteTemplateBtn_Click"
  359. Style="{StaticResource btn.sec}">
  360. <Grid Width="14" Height="14">
  361. <Path
  362. 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"
  363. Fill="#CED0D4"
  364. Stretch="Fill" />
  365. </Grid>
  366. </Button>
  367. </StackPanel>
  368. <DataTemplate.Triggers>
  369. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
  370. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible" />
  371. </DataTrigger>
  372. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
  373. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden" />
  374. </DataTrigger>
  375. </DataTemplate.Triggers>
  376. </DataTemplate>
  377. </GridViewColumn.CellTemplate>
  378. </GridViewColumn>
  379. </GridView>
  380. </ListView.View>
  381. <ListView.ItemContainerStyle>
  382. <Style BasedOn="{StaticResource listitem1}" TargetType="ListViewItem">
  383. <Setter Property="Height" Value="42" />
  384. <Setter Property="Margin" Value="0,0,0,0" />
  385. <Setter Property="BorderThickness" Value="0,0,0,1" />
  386. <Setter Property="TextBlock.Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  387. <Setter Property="TextBlock.FontFamily" Value="Segoe UI" />
  388. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  389. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  390. <Setter Property="Padding" Value="0,0,0,0" />
  391. <Style.Triggers>
  392. <Trigger Property="IsMouseOver" Value="True">
  393. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  394. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  395. <Setter Property="BorderThickness" Value="2,2,2,2" />
  396. </Trigger>
  397. <Trigger Property="IsSelected" Value="True">
  398. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  399. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  400. <Setter Property="BorderThickness" Value="2,2,2,2" />
  401. </Trigger>
  402. <Trigger Property="ListView.AlternationIndex" Value="1">
  403. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  404. </Trigger>
  405. </Style.Triggers>
  406. </Style>
  407. </ListView.ItemContainerStyle>
  408. </ListView>
  409. </Grid>
  410. </Grid>
  411. <Grid Grid.Row="1">
  412. <Button
  413. x:Name="MenuBtn"
  414. Width="113"
  415. Height="32"
  416. Margin="25,0,0,0"
  417. HorizontalAlignment="Left"
  418. Click="Menu_Click"
  419. Style="{StaticResource btn.sec}">
  420. <StackPanel Orientation="Horizontal">
  421. <Border HorizontalAlignment="Right">
  422. <TextBlock
  423. Width="57"
  424. Height="22"
  425. FontSize="14"
  426. Foreground="Black"
  427. Text="{Binding T_AddFile}" />
  428. </Border>
  429. <Border
  430. Width="12"
  431. Height="7"
  432. Margin="12,0,0,0">
  433. <Path
  434. HorizontalAlignment="Right"
  435. VerticalAlignment="Center"
  436. 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"
  437. Fill="#94989C"
  438. Stretch="Fill" />
  439. </Border>
  440. </StackPanel>
  441. </Button>
  442. <Popup
  443. x:Name="menuPop1"
  444. AllowsTransparency="True"
  445. PlacementTarget="{Binding ElementName=MenuBtn}"
  446. StaysOpen="False">
  447. <Grid
  448. Width="auto"
  449. Height="auto"
  450. HorizontalAlignment="Left">
  451. <Border
  452. Margin="3"
  453. Background="White"
  454. BorderThickness="0"
  455. CornerRadius="3">
  456. <Border.Effect>
  457. <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6" />
  458. </Border.Effect>
  459. <StackPanel Margin="0">
  460. <MenuItem
  461. x:Name="添加文件"
  462. Command="{Binding ADDPictureCommand}"
  463. Header="{Binding T_AddFile}" />
  464. <MenuItem
  465. x:Name="添加文件夹"
  466. Command="{Binding ADDPictureFilesCommand}"
  467. Header="{Binding T_AddFolder}" />
  468. </StackPanel>
  469. </Border>
  470. </Grid>
  471. </Popup>
  472. <!--<Button
  473. Width="40"
  474. Height="40"
  475. Margin="0,0,90,0"
  476. HorizontalAlignment="Right">
  477. </Button>-->
  478. <Button
  479. Width="32"
  480. Height="32"
  481. Margin="25,0"
  482. HorizontalAlignment="Right"
  483. Command="{Binding RemovePictureFileCommand}"
  484. IsEnabled="{Binding RemoveIsEnable}"
  485. Style="{StaticResource btn.sec}">
  486. <Grid Width="16" Height="16">
  487. <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" />
  488. </Grid>
  489. </Button>
  490. </Grid>
  491. </Grid>
  492. <Grid
  493. Grid.Column="1"
  494. Background="WhiteSmoke"
  495. IsEnabled="{Binding SetPictureToPDFGridIsEnabled}">
  496. <Grid.RowDefinitions>
  497. <RowDefinition Height="1*" />
  498. <RowDefinition Height="64" />
  499. </Grid.RowDefinitions>
  500. <Grid Grid.Row="0" Margin="16,14,0,0">
  501. <StackPanel>
  502. <TextBlock Style="{StaticResource PagesView_titleContext}" Text="{Binding T_Settings}" />
  503. <TextBlock
  504. Height="20"
  505. Margin="0,16,0,0"
  506. Style="{StaticResource PropertyHeaderLv2}"
  507. Text="{Binding T_ExportTitle}" />
  508. <StackPanel Margin="0,8,0,0">
  509. <RadioButton
  510. Name="NewFilesRadioButtom"
  511. Padding="9,0,0,0"
  512. Click="RadioButton_Click"
  513. IsChecked="True"
  514. Style="{StaticResource RadioButtonStyleText}">
  515. <TextBlock Text="{Binding T_Create}" />
  516. </RadioButton>
  517. <RadioButton
  518. Name="OneNewFileNameRadioButtom"
  519. Margin="0,8,0,0"
  520. Padding="9,0,0,0"
  521. Click="RadioButton_Click"
  522. Style="{StaticResource RadioButtonStyleText}">
  523. <TextBlock Text="{Binding T_Merge}" />
  524. </RadioButton>
  525. <RadioButton
  526. Name="SelectFileNameRadioButton"
  527. Margin="0,8,0,0"
  528. Padding="9,0,0,0"
  529. Click="RadioButton_Click"
  530. Style="{StaticResource RadioButtonStyleText}"
  531. Visibility="Hidden">
  532. <TextBlock Text="插入现有PDF文档" />
  533. </RadioButton>
  534. </StackPanel>
  535. <StackPanel
  536. Margin="0,4,0,0"
  537. Orientation="Horizontal"
  538. Visibility="Hidden">
  539. <TextBox
  540. Width="190"
  541. Height="32"
  542. VerticalContentAlignment="Center"
  543. IsEnabled="False"
  544. Text="{Binding SelectFileName}" />
  545. <Button
  546. Width="32"
  547. Command="{Binding SelectFileCommand}"
  548. IsEnabled="{Binding ElementName=SelectFileNameRadioButton, Path=IsChecked}"
  549. Style="{StaticResource btn.sec}" />
  550. </StackPanel>
  551. </StackPanel>
  552. </Grid>
  553. <Grid
  554. Grid.Row="1"
  555. Margin="15,0,0,0"
  556. Visibility="Hidden">
  557. <StackPanel>
  558. <TextBlock Text="OCR" />
  559. <CheckBox Name="NeedOCRCheckBox" Margin="0,7,0,0">
  560. <TextBlock Text="在需要时识别文本" />
  561. </CheckBox>
  562. <ComboBox
  563. Width="228"
  564. Height="28.55"
  565. Margin="0,4,0,0"
  566. HorizontalAlignment="Left"
  567. IsEnabled="{Binding ElementName=NeedOCRCheckBox, Path=IsChecked}" />
  568. <CheckBox Margin="0,16,0,0" IsEnabled="{Binding ElementName=NeedOCRCheckBox, Path=IsChecked}">
  569. <TextBlock Text="识别为TXT" />
  570. </CheckBox>
  571. </StackPanel>
  572. </Grid>
  573. <Grid Grid.Row="1">
  574. <Button
  575. Width="228"
  576. Height="32"
  577. Command="{Binding ToPDFCommand}"
  578. IsEnabled="{Binding ImageToPDFBtnIsEnable}"
  579. Style="{StaticResource Btn.cta}">
  580. <TextBlock
  581. FontSize="18"
  582. Foreground="White"
  583. Text="导出文档" />
  584. </Button>
  585. </Grid>
  586. </Grid>
  587. </Grid>
  588. </Grid>
  589. </UserControl>