HomePagePictureToPDFDialog.xaml 36 KB

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