ToolsBarContent.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <UserControl
  2. x:Class="PDF_Master.Views.Tools.ToolsBarContent"
  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:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:PDF_Master.ViewModels.Tools"
  8. xmlns:prism="http://prismlibrary.com/"
  9. prism:ViewModelLocator.AutoWireViewModel="True">
  10. <UserControl.Resources>
  11. <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
  12. </UserControl.Resources>
  13. <Border
  14. x:Name="ToolsBorder"
  15. Height="40"
  16. BorderBrush="#1A000000"
  17. BorderThickness="0,1,0,1">
  18. <Grid Height="40" HorizontalAlignment="Center">
  19. <Grid VerticalAlignment="Center">
  20. <StackPanel Orientation="Horizontal" UseLayoutRounding="False">
  21. <Button Command="{Binding CompressCommand}" Style="{StaticResource InsideBarBtnStyle}">
  22. <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
  23. <StackPanel Margin="0,0,4,0">
  24. <Grid>
  25. <Path
  26. Data="M16 19H4C3.44772 19 3 18.5523 3 18V2C3 1.44772 3.44772 1 4 1H11.8671C12.1563 1 12.4315 1.12527 12.6214 1.34348L16.7543 6.09195C16.9127 6.27398 17 6.50715 17 6.74847V18C17 18.5523 16.5523 19 16 19Z"
  27. Stroke="#273C62"
  28. StrokeThickness="2" />
  29. <Path Data="M8 2H6V4H8V6H6V8H8V10H6V12V15C6 15.5523 6.44772 16 7 16H9C9.55228 16 10 15.5523 10 15V12H8V10H10V8H8V6H10V4H8V2Z" Fill="#94989C" />
  30. </Grid>
  31. </StackPanel>
  32. <TextBlock VerticalAlignment="Center" Text="压缩" />
  33. </StackPanel>
  34. </Button>
  35. <Button Command="{Binding MergeCommand}" Style="{StaticResource InsideBarBtnStyle}">
  36. <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
  37. <StackPanel Margin="0,0,4,0">
  38. <Grid>
  39. <Path Data="M2 2C0.89543 2 0 2.89543 0 4V16C0 17.1046 0.89543 18 2 18H7C8.10457 18 9 17.1046 9 16V13.5H7V16H2V4L7 4V6.5H9V4C9 2.89543 8.10457 2 7 2H2ZM13 2C11.8954 2 11 2.89543 11 4V6.5H13V4H18V16H13V13.5H11V16C11 17.1046 11.8954 18 13 18H18C19.1046 18 20 17.1046 20 16V4C20 2.89543 19.1046 2 18 2H13Z" Fill="#273C62" />
  40. <Path Data="M5.29295 7.87868L6.41427 9L3 9V11L6.41427 11L5.29295 12.1213L6.70716 13.5355L9.53559 10.7071L10 10.2427L10.4644 10.7071L13.2928 13.5355L14.707 12.1213L13.5857 11L17 11V9L13.5857 9L14.707 7.87868L13.2928 6.46446L10.4644 9.29289L10 9.7573L9.53559 9.29289L6.70716 6.46446L5.29295 7.87868Z" Fill="#94989C" />
  41. </Grid>
  42. </StackPanel>
  43. <TextBlock VerticalAlignment="Center" Text="合并" />
  44. </StackPanel>
  45. </Button>
  46. <Button
  47. Name="SecurityButtonMore"
  48. Click="SecurityButtonMore_Click"
  49. Initialized="SecurityButtonMore_Initialized"
  50. IsEnabled="{Binding ElementName=SecurityMenuMore, Path=IsOpen, Converter={StaticResource InvertBoolConvert}}"
  51. Style="{StaticResource InsideBarBtnStyle}">
  52. <StackPanel Orientation="Horizontal">
  53. <StackPanel Margin="4,0,4,0">
  54. <Grid>
  55. <Path
  56. Data="M2.50001 3.22655L2.50001 2.79201L10 1.02731L17.5 2.79201V2.80177V2.81579V2.82991V2.84413V2.85846V2.8729V2.88745V2.90209V2.91685V2.93171V2.94667V2.96173V2.9769V2.99217V3.00755V3.02302V3.0386V3.05428V3.07006V3.08594V3.10192V3.118V3.13418V3.15046V3.16683V3.18331V3.19988V3.21655V3.23332V3.25018V3.26714V3.2842V3.30135V3.3186V3.33594V3.35338V3.37091V3.38853V3.40625V3.42406V3.44196V3.45996V3.47805V3.49623V3.51449V3.53285V3.55131V3.56985V3.58848V3.60719V3.626V3.6449V3.66388V3.68295V3.70211V3.72136V3.74069V3.76011V3.77961V3.7992V3.81887V3.83863V3.85848V3.8784V3.89841V3.9185V3.93868V3.95894V3.97928V3.9997V4.0202V4.04079V4.06145V4.08219V4.10302V4.12392V4.1449V4.16596V4.1871V4.20831V4.22961V4.25098V4.27242V4.29395V4.31554V4.33722V4.35897V4.38079V4.40269V4.42466V4.44671V4.46882V4.49102V4.51328V4.53562V4.55802V4.5805V4.60305V4.62567V4.64836V4.67112V4.69395V4.71685V4.73982V4.76285V4.78595V4.80912V4.83236V4.85567V4.87904V4.90247V4.92597V4.94954V4.97317V4.99687V5.02063V5.04445V5.06834V5.09229V5.1163V5.14038V5.16452V5.18871V5.21297V5.23729V5.26167V5.28611V5.31061V5.33517V5.35979V5.38446V5.40919V5.43399V5.45883V5.48374V5.5087V5.53372V5.55879V5.58392V5.6091V5.63434V5.65963V5.68498V5.71038V5.73583V5.76133V5.78689V5.8125V5.83816V5.86387V5.88963V5.91545V5.94131V5.96722V5.99318V6.01919V6.04525V6.07136V6.09751V6.12372V6.14996V6.17626V6.2026V6.22899V6.25542V6.2819V6.30842V6.33499V6.3616V6.38825V6.41495V6.44169V6.46847V6.4953V6.52216V6.54907V6.57602V6.60301V6.63004V6.6571V6.68421V6.71136V6.73854V6.76577V6.79303V6.82033V6.84766V6.87504V6.90244V6.92989V6.95737V6.98489V7.01244V7.04002V7.06764V7.09529V7.12298V7.15069V7.17845V7.20623V7.23404V7.26189V7.28977V7.31767V7.34561V7.37358V7.40158V7.4296V7.45766V7.48574V7.51385V7.54199V7.57016V7.59835V7.62657V7.65482V7.68309V7.71138V7.7397V7.76805V7.79642V7.82481V7.85323V7.88167V7.91013V7.93862V7.96712V7.99565V8.0242V8.05277V8.08136V8.10997V8.1386V8.16725V8.19592V8.2246V8.25331V8.28203V8.31077V8.33953V8.3683V8.39709V8.42589V8.45471V8.48355V8.5124V8.54126V8.57014V8.59903V8.62793V8.65685V8.68578V8.71472V8.74368V8.77264V8.80162V8.8306V8.8596V8.8886V8.91762V8.94664V8.97567V9.00471V9.03376V9.06282V9.09188V9.12095V9.15003V9.17911V9.20819V9.23729V9.26638V9.29549V9.32459V9.3537V9.38281V9.41193V9.44104V9.47017V9.49929V9.52841V9.55753V9.58666V9.61578V9.64491V9.67403V9.70315V9.73227V9.76139V9.79051V9.81963V9.84874V9.87785V9.90695V9.93606V9.96515V9.99425V10.0233V10.0524V10.0815V10.1106V10.1396V10.1687V10.1977V10.2268V10.2558V10.2848V10.3138V10.3428V10.3718V10.4008V10.4298V10.4588V10.4877V10.5167V10.5456V10.5745V10.6034V10.6323V10.6612V10.6901V10.7189V10.7477V10.7766V10.8054V10.8342V10.8629V10.8917V10.9204V10.9492V10.9779V11.0065V11.0352V11.0639V11.0925V11.1211V11.1497V11.1783V11.2068V11.2354V11.2639V11.2923V11.3208V11.3493V11.3777V11.4061V11.4344V11.4628V11.4911V11.5194V11.5477V11.5759V11.6041V11.6323V11.6605V11.6886V11.7168V11.7448V11.7729V11.8009V11.8289V11.8569V11.8848V11.9127V11.9406V11.9685V11.9963V12.0241V12.0518V12.0795V12.1072V12.1349V12.1625V12.1901V12.2176V12.2452V12.2726V12.3001V12.3275V12.3549V12.3822V12.4095V12.4368V12.464V12.4912V12.5183V12.5455V12.5725V12.5996V12.6265V12.6535V12.6804V12.7073V12.7341V12.7609V12.7876V12.8143V12.841V12.8676V12.8942V12.9207V12.9472V12.9736V13C17.5 13.5369 17.1807 14.1959 16.451 14.955C15.7396 15.695 14.7594 16.4028 13.7312 17.0267C12.7108 17.6459 11.684 18.1581 10.9085 18.5167C10.5349 18.6894 10.2222 18.8253 10 18.9191C9.77783 18.8253 9.46513 18.6894 9.09151 18.5167C8.31597 18.1581 7.28917 17.6459 6.26873 17.0267C5.24056 16.4028 4.26037 15.695 3.549 14.955C2.81927 14.1959 2.49998 13.5369 2.5 13L2.50004 6.18749L2.50001 3.22655Z"
  57. Stroke="#273C62"
  58. StrokeThickness="2" />
  59. <Path Data="M9 10V13H11V10H14V8H11V5H9V8H6V10H9Z" Fill="#94989C" />
  60. </Grid>
  61. </StackPanel>
  62. <TextBlock VerticalAlignment="Center" Text="安全" />
  63. <Path
  64. Width="12"
  65. Height="12"
  66. Margin="4,0"
  67. Data="M6.5 10L11.5 4H1.5L6.5 10Z"
  68. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  69. </StackPanel>
  70. <Button.ContextMenu>
  71. <ContextMenu Name="SecurityMenuMore" Placement="Bottom">
  72. <MenuItem Command="{Binding SetPasswordCommand}" Header="{Binding T_SetPassWord}" />
  73. <MenuItem Command="{Binding CancelPasswordCommand}" Header="{Binding T_RemovePassword}" />
  74. </ContextMenu>
  75. </Button.ContextMenu>
  76. </Button>
  77. <Button Style="{StaticResource InsideBarBtnStyle}" Visibility="Collapsed">
  78. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  79. <StackPanel Margin="0,0,8,0">
  80. <Border
  81. Width="30"
  82. Height="30"
  83. Background="LightSeaGreen" />
  84. </StackPanel>
  85. <TextBlock VerticalAlignment="Center" Text="文件对比" />
  86. </StackPanel>
  87. </Button>
  88. <Rectangle
  89. Width="1"
  90. Height="16"
  91. Margin="12,0,12,0"
  92. Fill="{StaticResource color.sys.layout.divider}" />
  93. <Button
  94. Name="RedactionContent"
  95. Command="{Binding SetEditToolsCommand}"
  96. CommandParameter="{Binding ElementName=RedactionContent}"
  97. Style="{StaticResource InsideBarBtnStyle}"
  98. Visibility="Collapsed">
  99. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  100. <StackPanel Margin="0,0,8,0">
  101. <Border
  102. Width="30"
  103. Height="30"
  104. Background="LightSeaGreen" />
  105. </StackPanel>
  106. <TextBlock VerticalAlignment="Center" Text="密文" />
  107. <Path
  108. HorizontalAlignment="Right"
  109. VerticalAlignment="Center"
  110. Data="M0 0L4 4L8 0H0Z"
  111. Fill="Black">
  112. <Path.RenderTransform>
  113. <TranslateTransform X="8" />
  114. </Path.RenderTransform>
  115. </Path>
  116. </StackPanel>
  117. </Button>
  118. <Button
  119. x:Name="WatermarkContent"
  120. Command="{Binding SetEditToolsCommand}"
  121. CommandParameter="{Binding ElementName=WatermarkContent}"
  122. Style="{StaticResource InsideBarBtnStyle}"
  123. Visibility="Collapsed">
  124. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  125. <StackPanel Margin="0,0,8,0">
  126. <Border
  127. Width="30"
  128. Height="30"
  129. Background="LightSeaGreen" />
  130. </StackPanel>
  131. <TextBlock VerticalAlignment="Center" Text="水印" />
  132. <Path
  133. HorizontalAlignment="Right"
  134. VerticalAlignment="Center"
  135. Data="M0 0L4 4L8 0H0Z"
  136. Fill="Black">
  137. <Path.RenderTransform>
  138. <TranslateTransform X="8" />
  139. </Path.RenderTransform>
  140. </Path>
  141. </StackPanel>
  142. </Button>
  143. <Button
  144. Name="BackgroundContent"
  145. Command="{Binding SetEditToolsCommand}"
  146. CommandParameter="{Binding ElementName=BackgroundContent}"
  147. Style="{StaticResource InsideBarBtnStyle}"
  148. Visibility="Collapsed">
  149. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  150. <StackPanel Margin="0,0,8,0">
  151. <Border
  152. Width="30"
  153. Height="30"
  154. Background="LightSeaGreen" />
  155. </StackPanel>
  156. <TextBlock VerticalAlignment="Center" Text="背景" />
  157. <Path
  158. HorizontalAlignment="Right"
  159. VerticalAlignment="Center"
  160. Data="M0 0L4 4L8 0H0Z"
  161. Fill="Black">
  162. <Path.RenderTransform>
  163. <TranslateTransform X="8" />
  164. </Path.RenderTransform>
  165. </Path>
  166. </StackPanel>
  167. </Button>
  168. <Button
  169. Name="HeaderFooterContent"
  170. Command="{Binding SetEditToolsCommand}"
  171. CommandParameter="{Binding ElementName=HeaderFooterContent}"
  172. Style="{StaticResource InsideBarBtnStyle}"
  173. Visibility="Collapsed">
  174. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  175. <StackPanel Margin="0,0,8,0">
  176. <Border
  177. Width="30"
  178. Height="30"
  179. Background="LightSeaGreen" />
  180. </StackPanel>
  181. <TextBlock VerticalAlignment="Center" Text="页眉页脚" />
  182. <Path
  183. HorizontalAlignment="Right"
  184. VerticalAlignment="Center"
  185. Data="M0 0L4 4L8 0H0Z"
  186. Fill="Black">
  187. <Path.RenderTransform>
  188. <TranslateTransform X="8" />
  189. </Path.RenderTransform>
  190. </Path>
  191. </StackPanel>
  192. </Button>
  193. <Button
  194. Name="BatesContent"
  195. Command="{Binding SetEditToolsCommand}"
  196. CommandParameter="{Binding ElementName=BatesContent}"
  197. Style="{StaticResource InsideBarBtnStyle}"
  198. Visibility="Collapsed">
  199. <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
  200. <StackPanel Margin="0,0,8,0">
  201. <Border
  202. Width="30"
  203. Height="30"
  204. Background="LightSeaGreen" />
  205. </StackPanel>
  206. <TextBlock VerticalAlignment="Center" Text="贝茨码" />
  207. <Path
  208. HorizontalAlignment="Right"
  209. VerticalAlignment="Center"
  210. Data="M0 0L4 4L8 0H0Z"
  211. Fill="Black">
  212. <Path.RenderTransform>
  213. <TranslateTransform X="8" />
  214. </Path.RenderTransform>
  215. </Path>
  216. </StackPanel>
  217. </Button>
  218. <Button
  219. Name="CropPageMenuMore"
  220. Click="CropPageMore_Click"
  221. Initialized="CropPageMore_Initialized"
  222. IsEnabled="{Binding ElementName=SecurityMenuMore, Path=IsOpen, Converter={StaticResource InvertBoolConvert}}"
  223. Style="{StaticResource InsideBarBtnStyle}"
  224. Visibility="Visible">
  225. <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
  226. <Path Data="M13 16L5 16C4.44771 16 4 15.5523 4 15V7L4 2V0H2L2 2H0V4H2L2 15C2 16.6569 3.34315 18 5 18L16 18V20H18V18H20V16H18H16H13ZM16 14V5C16 4.44771 15.5523 4 15 4H6V2H15C16.6569 2 18 3.34315 18 5V14H16Z" Fill="#273C62" />
  227. <TextBlock VerticalAlignment="Center" Text="裁剪" />
  228. <Path
  229. Width="12"
  230. Height="12"
  231. Margin="4,0"
  232. Data="M6.5 10L11.5 4H1.5L6.5 10Z"
  233. Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
  234. </StackPanel>
  235. <Button.ContextMenu>
  236. <ContextMenu Name="CropPageMenu" Placement="Bottom">
  237. <MenuItem Command="{Binding CropCurrentPageWMCommand}" Header="Crop Current Page - White Margins" />
  238. <MenuItem Command="{Binding CropAllPagesWMCommand}" Header="Crop All Pages - White Margins" />
  239. </ContextMenu>
  240. </Button.ContextMenu>
  241. </Button>
  242. </StackPanel>
  243. </Grid>
  244. </Grid>
  245. </Border>
  246. </UserControl>