HomePageSetPasswordDialog.xaml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageSetPasswordDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:help="clr-namespace:PDF_Master.Helper"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  8. xmlns:prism="http://prismlibrary.com/"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  11. d:DesignHeight="600"
  12. d:DesignWidth="818"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <convert:UnVisivleConvert x:Key="unVisibleConvert"/>
  16. <Style TargetType="CheckBox" x:Key="EyeCheckbox">
  17. <Setter Property="Cursor" Value="Hand"></Setter>
  18. <Setter Property="Template">
  19. <Setter.Value>
  20. <ControlTemplate TargetType="{x:Type CheckBox}">
  21. <Grid>
  22. <Border Background="Transparent"
  23. BorderBrush="White"
  24. BorderThickness="1"
  25. CornerRadius="0"
  26. VerticalAlignment="Center" >
  27. <Grid Name="Grid" Height="{TemplateBinding Height}"
  28. Width="{Binding ActualHeight,RelativeSource={RelativeSource Self}}">
  29. <Path Name="Path" SnapsToDevicePixels="False" Data="M1.46967 1.5304L13.4699 13.5304L14.5306 12.4697L2.53032 0.469727L1.46967 1.5304ZM9.99623 11.1174L11.1401 12.2613C10.176 12.7137 9.11463 13.0001 8 13.0001C3.58172 13.0001 0 8.50006 0 7.00006C0 6.2525 0.889611 4.75982 2.32903 3.45038L3.39107 4.5124L3.35064 4.54885C2.71795 5.12245 2.22043 5.72507 1.89225 6.23808C1.62112 6.66189 1.53702 6.91174 1.51122 6.98839L1.50727 7.00006L1.51122 7.01173C1.53702 7.08838 1.62112 7.33823 1.89225 7.76205C2.22043 8.27505 2.71795 8.87768 3.35064 9.45128C4.63846 10.6188 6.29481 11.5001 8 11.5001C8.67993 11.5001 9.3521 11.3599 9.99623 11.1174ZM8 1.00006C6.88543 1.00006 5.82409 1.28643 4.86006 1.73876L6.00394 2.88262C6.64802 2.64015 7.32013 2.50006 8 2.50006C9.70519 2.50006 11.3615 3.3813 12.6494 4.54885C13.2821 5.12245 13.7796 5.72507 14.1078 6.23808C14.3789 6.66189 14.463 6.91174 14.4888 6.98839L14.4927 7.00006L14.4888 7.01173C14.463 7.08838 14.3789 7.33823 14.1078 7.76205C13.7796 8.27505 13.2821 8.87768 12.6494 9.45128L12.6091 9.48762L13.6711 10.5496C15.1104 9.24022 16 7.7476 16 7.00006C16 5.50006 12.4183 1.00006 8 1.00006ZM5 7.00006C5 6.7313 5.03534 6.47079 5.10163 6.22293L6.92836 8.04962C6.93565 8.05707 6.94301 8.06444 6.95046 8.07172L8.77718 9.89842C8.52931 9.96472 8.26878 10.0001 8 10.0001C6.34315 10.0001 5 8.65692 5 7.00006ZM7.223 4.10166L10.8984 7.77701C10.9647 7.5292 11 7.26876 11 7.00006C11 5.34321 9.65685 4.00006 8 4.00006C7.73128 4.00006 7.47082 4.03539 7.223 4.10166Z" Fill="#616469"/>
  30. </Grid>
  31. </Border>
  32. </Grid>
  33. <ControlTemplate.Triggers>
  34. <Trigger Property="IsChecked" Value="True">
  35. <Setter TargetName="Path" Property="Data" Value="M14.4888 7.98833L14.4927 8L14.4888 8.01167C14.463 8.08832 14.3789 8.33817 14.1078 8.76198C13.7796 9.27499 13.2821 9.87762 12.6494 10.4512C11.3615 11.6188 9.70519 12.5 8 12.5C6.29481 12.5 4.63846 11.6188 3.35064 10.4512C2.71795 9.87762 2.22043 9.27499 1.89225 8.76198C1.62112 8.33817 1.53702 8.08832 1.51122 8.01167L1.50727 8L1.51122 7.98833C1.53702 7.91168 1.62112 7.66183 1.89225 7.23802C2.22043 6.72501 2.71795 6.12238 3.35064 5.54879C4.63846 4.38124 6.29481 3.5 8 3.5C9.70519 3.5 11.3615 4.38124 12.6494 5.54879C13.2821 6.12238 13.7796 6.72501 14.1078 7.23802C14.3789 7.66183 14.463 7.91168 14.4888 7.98833ZM16 8C16 9.5 12.4183 14 8 14C3.58172 14 0 9.5 0 8C0 6.5 3.58172 2 8 2C12.4183 2 16 6.5 16 8ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8ZM11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z"></Setter>
  36. </Trigger>
  37. <Trigger Property="IsChecked" Value="False">
  38. <Setter TargetName="Path" Property="Data" Value="M1.46967 1.5304L13.4699 13.5304L14.5306 12.4697L2.53032 0.469727L1.46967 1.5304ZM9.99623 11.1174L11.1401 12.2613C10.176 12.7137 9.11463 13.0001 8 13.0001C3.58172 13.0001 0 8.50006 0 7.00006C0 6.2525 0.889611 4.75982 2.32903 3.45038L3.39107 4.5124L3.35064 4.54885C2.71795 5.12245 2.22043 5.72507 1.89225 6.23808C1.62112 6.66189 1.53702 6.91174 1.51122 6.98839L1.50727 7.00006L1.51122 7.01173C1.53702 7.08838 1.62112 7.33823 1.89225 7.76205C2.22043 8.27505 2.71795 8.87768 3.35064 9.45128C4.63846 10.6188 6.29481 11.5001 8 11.5001C8.67993 11.5001 9.3521 11.3599 9.99623 11.1174ZM8 1.00006C6.88543 1.00006 5.82409 1.28643 4.86006 1.73876L6.00394 2.88262C6.64802 2.64015 7.32013 2.50006 8 2.50006C9.70519 2.50006 11.3615 3.3813 12.6494 4.54885C13.2821 5.12245 13.7796 5.72507 14.1078 6.23808C14.3789 6.66189 14.463 6.91174 14.4888 6.98839L14.4927 7.00006L14.4888 7.01173C14.463 7.08838 14.3789 7.33823 14.1078 7.76205C13.7796 8.27505 13.2821 8.87768 12.6494 9.45128L12.6091 9.48762L13.6711 10.5496C15.1104 9.24022 16 7.7476 16 7.00006C16 5.50006 12.4183 1.00006 8 1.00006ZM5 7.00006C5 6.7313 5.03534 6.47079 5.10163 6.22293L6.92836 8.04962C6.93565 8.05707 6.94301 8.06444 6.95046 8.07172L8.77718 9.89842C8.52931 9.96472 8.26878 10.0001 8 10.0001C6.34315 10.0001 5 8.65692 5 7.00006ZM7.223 4.10166L10.8984 7.77701C10.9647 7.5292 11 7.26876 11 7.00006C11 5.34321 9.65685 4.00006 8 4.00006C7.73128 4.00006 7.47082 4.03539 7.223 4.10166Z"></Setter>
  39. </Trigger>
  40. </ControlTemplate.Triggers>
  41. </ControlTemplate>
  42. </Setter.Value>
  43. </Setter>
  44. </Style>
  45. <Style TargetType="PasswordBox" x:Key="OpenPasswordBoxStyle">
  46. <Setter Property="Height" Value="32"/>
  47. <Setter Property="FontSize" Value="14"/>
  48. <Setter Property="Template">
  49. <Setter.Value>
  50. <ControlTemplate TargetType="PasswordBox">
  51. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
  52. BorderThickness="{TemplateBinding BorderThickness}"
  53. Background="{TemplateBinding Background}"
  54. SnapsToDevicePixels="True"
  55. CornerRadius="5">
  56. <Grid>
  57. <Grid.ColumnDefinitions>
  58. <ColumnDefinition></ColumnDefinition>
  59. <ColumnDefinition Width="24"></ColumnDefinition>
  60. </Grid.ColumnDefinitions>
  61. <Grid Grid.Column="0">
  62. <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
  63. Name="markText" Visibility="Collapsed" FontSize="12" />
  64. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  65. HorizontalScrollBarVisibility="Hidden"
  66. VerticalScrollBarVisibility="Hidden"
  67. VerticalAlignment="Center" MinHeight="20"/>
  68. </Grid>
  69. </Grid>
  70. </Border>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsEnabled" Value="false">
  73. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  74. </Trigger>
  75. <Trigger Property="IsMouseOver" Value="true">
  76. <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
  77. </Trigger>
  78. <Trigger Property="IsKeyboardFocused" Value="true">
  79. <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
  80. </Trigger>
  81. <DataTrigger Binding="{Binding Path = OpenPassword}" Value="">
  82. <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
  83. </DataTrigger>
  84. </ControlTemplate.Triggers>
  85. </ControlTemplate>
  86. </Setter.Value>
  87. </Setter>
  88. </Style>
  89. <Style TargetType="TextBox" x:Key="OpenPasswordTextBoxStyle">
  90. <Setter Property="Height" Value="32"/>
  91. <Setter Property="FontSize" Value="14"/>
  92. <Setter Property="Template">
  93. <Setter.Value>
  94. <ControlTemplate TargetType="TextBox">
  95. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
  96. BorderThickness="{TemplateBinding BorderThickness}"
  97. Background="{TemplateBinding Background}"
  98. SnapsToDevicePixels="True"
  99. CornerRadius="5">
  100. <Grid>
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition></ColumnDefinition>
  103. <ColumnDefinition Width="24"></ColumnDefinition>
  104. </Grid.ColumnDefinitions>
  105. <Grid Grid.Column="0">
  106. <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
  107. Name="markText" Visibility="Collapsed" FontSize="12" />
  108. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  109. HorizontalScrollBarVisibility="Hidden"
  110. VerticalScrollBarVisibility="Hidden"
  111. VerticalAlignment="Center" MinHeight="20"/>
  112. </Grid>
  113. </Grid>
  114. </Border>
  115. <ControlTemplate.Triggers>
  116. <Trigger Property="IsEnabled" Value="false">
  117. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  118. </Trigger>
  119. <Trigger Property="IsMouseOver" Value="true">
  120. <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
  121. </Trigger>
  122. <Trigger Property="IsKeyboardFocused" Value="true">
  123. <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
  124. </Trigger>
  125. <DataTrigger Binding="{Binding Path = OpenPassword}" Value="">
  126. <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
  127. </DataTrigger>
  128. </ControlTemplate.Triggers>
  129. </ControlTemplate>
  130. </Setter.Value>
  131. </Setter>
  132. </Style>
  133. <Style TargetType="PasswordBox" x:Key="PermissionsPasswordBoxStyle">
  134. <Setter Property="Height" Value="32"/>
  135. <Setter Property="FontSize" Value="14"/>
  136. <Setter Property="Template">
  137. <Setter.Value>
  138. <ControlTemplate TargetType="PasswordBox">
  139. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
  140. BorderThickness="{TemplateBinding BorderThickness}"
  141. Background="{TemplateBinding Background}"
  142. SnapsToDevicePixels="True"
  143. CornerRadius="5">
  144. <Grid>
  145. <Grid.ColumnDefinitions>
  146. <ColumnDefinition></ColumnDefinition>
  147. <ColumnDefinition Width="24"></ColumnDefinition>
  148. </Grid.ColumnDefinitions>
  149. <Grid Grid.Column="0">
  150. <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
  151. Name="markText" Visibility="Collapsed" FontSize="12" />
  152. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  153. HorizontalScrollBarVisibility="Hidden"
  154. VerticalScrollBarVisibility="Hidden"
  155. VerticalAlignment="Center" MinHeight="20"/>
  156. </Grid>
  157. </Grid>
  158. </Border>
  159. <ControlTemplate.Triggers>
  160. <Trigger Property="IsEnabled" Value="false">
  161. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  162. </Trigger>
  163. <Trigger Property="IsMouseOver" Value="true">
  164. <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
  165. </Trigger>
  166. <Trigger Property="IsKeyboardFocused" Value="true">
  167. <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
  168. </Trigger>
  169. <DataTrigger Binding="{Binding Path = PermissionsPassword}" Value="">
  170. <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
  171. </DataTrigger>
  172. </ControlTemplate.Triggers>
  173. </ControlTemplate>
  174. </Setter.Value>
  175. </Setter>
  176. </Style>
  177. <Style TargetType="TextBox" x:Key="PermissionsPasswordTextBoxStyle">
  178. <Setter Property="Height" Value="32"/>
  179. <Setter Property="FontSize" Value="14"/>
  180. <Setter Property="Template">
  181. <Setter.Value>
  182. <ControlTemplate TargetType="TextBox">
  183. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
  184. BorderThickness="{TemplateBinding BorderThickness}"
  185. Background="{TemplateBinding Background}"
  186. SnapsToDevicePixels="True"
  187. CornerRadius="5">
  188. <Grid>
  189. <Grid.ColumnDefinitions>
  190. <ColumnDefinition></ColumnDefinition>
  191. <ColumnDefinition Width="24"></ColumnDefinition>
  192. </Grid.ColumnDefinitions>
  193. <Grid Grid.Column="0">
  194. <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
  195. Name="markText" Visibility="Collapsed" FontSize="12" />
  196. <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
  197. HorizontalScrollBarVisibility="Hidden"
  198. VerticalScrollBarVisibility="Hidden"
  199. VerticalAlignment="Center" MinHeight="20"/>
  200. </Grid>
  201. </Grid>
  202. </Border>
  203. <ControlTemplate.Triggers>
  204. <Trigger Property="IsEnabled" Value="false">
  205. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  206. </Trigger>
  207. <Trigger Property="IsMouseOver" Value="true">
  208. <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
  209. </Trigger>
  210. <Trigger Property="IsKeyboardFocused" Value="true">
  211. <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
  212. </Trigger>
  213. <DataTrigger Binding="{Binding Path = PermissionsPassword}" Value="">
  214. <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
  215. </DataTrigger>
  216. </ControlTemplate.Triggers>
  217. </ControlTemplate>
  218. </Setter.Value>
  219. </Setter>
  220. </Style>
  221. </UserControl.Resources>
  222. <Grid IsEnabled="{Binding SafetyGridIsEnabled}">
  223. <Grid.ColumnDefinitions>
  224. <ColumnDefinition Width="558*"/>
  225. <ColumnDefinition Width="260*" MaxWidth="260"/>
  226. </Grid.ColumnDefinitions>
  227. <Grid Grid.Column="0">
  228. <Grid.RowDefinitions>
  229. <RowDefinition Height="556*"/>
  230. <RowDefinition Height="64*"/>
  231. </Grid.RowDefinitions>
  232. <Grid Grid.Row="0" AllowDrop="True"
  233. Drop="Grid_Drop"
  234. DragEnter="MainPage_DragEnter"
  235. DragOver="MainPage_DragOver"
  236. DragLeave="MainPage_DragLeave"
  237. >
  238. <Label Name="DropGrid" Background="#18A0FB" Opacity="0.5" Panel.ZIndex="1" Visibility="Collapsed"/>
  239. <Button Name="BtnBlank" Background="Green" Height="300" Width="300" Visibility="{Binding AddFileVisibility}" Command="{Binding ADDPDFCommand}" >
  240. </Button>
  241. <ListView x:Name="listView" DataContext="{Binding PDFDataTable,Mode=TwoWay}" Background="White" ItemsSource="{Binding}" SelectionChanged="listView_SelectionChanged" Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
  242. <ListView.ContextMenu>
  243. <ContextMenu StaysOpen="True" >
  244. <MenuItem Header="打开文件" Name="OpenFileMenuItem" Click="OpenFileMenuItem_Click"/>
  245. <MenuItem Header="移除" Name="RemoveFileMenuItem" Click="RemoveFileMenuItem_Click"/>
  246. </ContextMenu>
  247. </ListView.ContextMenu>
  248. <ListView.View>
  249. <GridView>
  250. <GridViewColumn Header="文档名" Width="390" DisplayMemberBinding="{Binding FileName}"/>
  251. <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
  252. <GridViewColumn Header="状态" Width="80" >
  253. <GridViewColumn.CellTemplate>
  254. <DataTemplate>
  255. <StackPanel Orientation="Horizontal">
  256. <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" />
  257. <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
  258. </Button>
  259. </StackPanel>
  260. <DataTemplate.Triggers>
  261. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
  262. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
  263. </DataTrigger>
  264. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
  265. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden"/>
  266. </DataTrigger>
  267. </DataTemplate.Triggers>
  268. </DataTemplate>
  269. </GridViewColumn.CellTemplate>
  270. </GridViewColumn>
  271. </GridView>
  272. </ListView.View>
  273. <ListView.ItemContainerStyle>
  274. <Style TargetType="ListViewItem">
  275. <Setter Property="Height" Value="42"/>
  276. <Style.Triggers>
  277. <Trigger Property="ListView.AlternationIndex" Value="1">
  278. <Setter Property="Background" Value="LightGray"/>
  279. </Trigger>
  280. </Style.Triggers>
  281. </Style>
  282. </ListView.ItemContainerStyle>
  283. </ListView>
  284. </Grid>
  285. <Grid Grid.Row="1">
  286. <Button x:Name="MenuBtn" Width="113"
  287. Height="40"
  288. Margin="25,0,0,0"
  289. HorizontalAlignment="Left" Click="Menu_Click">
  290. <StackPanel Orientation="Horizontal" >
  291. <Border HorizontalAlignment="Right">
  292. <TextBlock Text="添加文件" FontSize="18" Foreground="Black"></TextBlock>
  293. </Border>
  294. <Border Margin="12,0,0,0">
  295. <Path VerticalAlignment="Center" HorizontalAlignment="Right" Stroke="Black" Data="M0 0L8 4 L16 0" Height="10" Stretch="Fill" />
  296. </Border>
  297. </StackPanel>
  298. </Button>
  299. <Popup x:Name="menuPop1" StaysOpen="False" AllowsTransparency="True" PlacementTarget="{Binding ElementName=MenuBtn}">
  300. <Grid Height="auto" Width="auto" HorizontalAlignment="Left">
  301. <Border BorderThickness="0" CornerRadius="3" Background="White" Margin="3">
  302. <Border.Effect>
  303. <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6"/>
  304. </Border.Effect>
  305. <StackPanel Margin="0">
  306. <MenuItem x:Name="添加文件" Header="添加文件" Command="{Binding ADDPDFCommand}"></MenuItem>
  307. <MenuItem x:Name="添加文件夹" Header="添加文件夹" Command="{Binding ADDPDFFilesCommand}"></MenuItem>
  308. <MenuItem x:Name="添加已打开文件" Header="添加文件夹" Command="{Binding ADDOpenedPDFCommand}"></MenuItem>
  309. </StackPanel>
  310. </Border>
  311. </Grid>
  312. </Popup>
  313. <!--<Button
  314. Width="40"
  315. Height="40"
  316. Margin="0,0,90,0"
  317. HorizontalAlignment="Right">
  318. </Button>-->
  319. <Button
  320. Width="40"
  321. Height="40"
  322. Margin="25,0"
  323. HorizontalAlignment="Right"
  324. IsEnabled="{Binding RemoveIsEnable}"
  325. Command="{Binding RemovePDFFileCommand}">
  326. </Button>
  327. </Grid>
  328. </Grid>
  329. <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetSafetyGridIsEnabled}">
  330. <Grid.RowDefinitions>
  331. <RowDefinition Height="536*"/>
  332. <RowDefinition Height="64*" MaxHeight="64"/>
  333. </Grid.RowDefinitions>
  334. <Grid Margin="16,36,16,0" >
  335. <Grid.RowDefinitions>
  336. <RowDefinition Height="62"></RowDefinition>
  337. <RowDefinition Height="78"></RowDefinition>
  338. <RowDefinition Height="60"></RowDefinition>
  339. </Grid.RowDefinitions>
  340. <StackPanel Orientation="Vertical">
  341. <CheckBox Name="OpenPasswordChk" IsChecked="{Binding NeedOpenPassword, Mode=TwoWay}" Command="{Binding SetOpenPasswordCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}">
  342. <TextBlock Text="Document Open Password" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  343. </CheckBox>
  344. <Grid Margin="0,8,0,16" IsEnabled="{Binding ElementName=OpenPasswordChk, Path=IsChecked}" >
  345. <Grid.ColumnDefinitions>
  346. <ColumnDefinition></ColumnDefinition>
  347. <ColumnDefinition Width="24"></ColumnDefinition>
  348. </Grid.ColumnDefinitions>
  349. <PasswordBox Style="{StaticResource OpenPasswordBoxStyle}" help:PasswordBoxHelper.Password="{Binding OpenPassword, Mode=TwoWay , UpdateSourceTrigger=PropertyChanged}" help:PasswordBoxHelper.DisplayText="{Binding OpenPasswordMsg, Mode=TwoWay}" Grid.ColumnSpan="2">
  350. </PasswordBox>
  351. <TextBox Style="{StaticResource OpenPasswordTextBoxStyle}" Text="{Binding OpenPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.ColumnSpan="2" Visibility="{Binding OpenTextVisibility, Mode=TwoWay}" help:PasswordBoxHelper.DisplayText="{Binding OpenPasswordMsg, Mode=TwoWay}" ></TextBox>
  352. <CheckBox IsChecked="{Binding IsOpenPasswordDisplayed,Mode=TwoWay}" x:Name="DisplayOpenPasswordChk" Style="{StaticResource EyeCheckbox}" Height="16" Grid.Column="1" HorizontalAlignment="Left" Panel.ZIndex="1" Command="{Binding DisplayPasswordCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"></CheckBox>
  353. </Grid>
  354. <CheckBox Grid.Column="1" Height="56" VerticalAlignment="Bottom"></CheckBox>
  355. </StackPanel>
  356. <StackPanel Orientation="Vertical" Grid.Row="1" Margin="0,16,0,0">
  357. <CheckBox Name="PermissionsPasswordChk" IsChecked="{Binding NeedPermissionsPassword, Mode=TwoWay}" Command="{Binding SetPermissionsPasswordCommand}" CommandParameter="{Binding RelativeSource = {RelativeSource Self}}">
  358. <TextBlock Text="Permissions" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  359. </CheckBox>
  360. <Grid Height="32" Margin="0,8,0,16" IsEnabled="{Binding ElementName=PermissionsPasswordChk, Path=IsChecked}" >
  361. <Grid.ColumnDefinitions>
  362. <ColumnDefinition></ColumnDefinition>
  363. <ColumnDefinition Width="24"></ColumnDefinition>
  364. </Grid.ColumnDefinitions>
  365. <PasswordBox Style="{StaticResource PermissionsPasswordBoxStyle}" help:PasswordBoxHelper.Password="{Binding PermissionsPassword, Mode=TwoWay , UpdateSourceTrigger=PropertyChanged}" help:PasswordBoxHelper.DisplayText="{Binding PermissionsPasswordMsg, Mode=TwoWay}" Grid.ColumnSpan="2" Visibility="{Binding PermissionsPasswordVisibility, Mode=TwoWay}">
  366. </PasswordBox>
  367. <TextBox Style="{StaticResource PermissionsPasswordTextBoxStyle}" Text="{Binding PermissionsPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" help:PasswordBoxHelper.DisplayText="{Binding PermissionsPasswordMsg, Mode=TwoWay}" Grid.ColumnSpan="2" Visibility="{Binding PermissionsTextVisibility, Mode=TwoWay}" ></TextBox>
  368. <CheckBox IsChecked="{Binding IsPermissionsPasswordDisplayed,Mode=TwoWay}" x:Name="DisplayPermissionsPasswordChk" Style="{StaticResource EyeCheckbox}" Height="16" Grid.Column="1" HorizontalAlignment="Left" Panel.ZIndex="1" Command="{Binding DisplayPasswordCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"></CheckBox>
  369. </Grid>
  370. </StackPanel >
  371. <StackPanel Grid.Row="2" Orientation="Vertical" IsEnabled="{Binding ElementName=PermissionsPasswordChk, Path=IsChecked}" >
  372. <CheckBox Margin="0,8,0,0" IsChecked="{Binding IsRestrictPrinting,Mode=TwoWay}" Command="{Binding SetRestrictCommand}" CommandParameter="{Binding RelativeSource = {RelativeSource Self}}" Tag="Printing">
  373. <TextBlock Text="Restrict document printing"></TextBlock>
  374. </CheckBox>
  375. <CheckBox Margin="0,8,0,0" IsChecked="{Binding IsRestrictCopying}" Command="{Binding SetRestrictCommand}" CommandParameter="{Binding RelativeSource = {RelativeSource Self}}" Tag="Copying">
  376. <TextBlock Text="Restrict content copying"></TextBlock>
  377. </CheckBox>
  378. </StackPanel>
  379. </Grid>
  380. <Grid Grid.Row="2">
  381. <Button Height="40" Width="228" Background="Black" Command="{Binding EncryptCommand}" IsEnabled="{Binding EnableConfirm, Mode=TwoWay}">
  382. <TextBlock Text="设置安全密码" FontSize="18" Foreground="White"/>
  383. </Button>
  384. </Grid>
  385. </Grid>
  386. </Grid>
  387. </UserControl>