SetPasswordDialog.xaml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <UserControl x:Class="PDF_Office.Views.Dialog.ToolsDialogs.SaftyDialogs.SetPasswordDialog"
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:prism="http://prismlibrary.com/"
  7. xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. d:DesignHeight="500"
  10. d:DesignWidth="400"
  11. mc:Ignorable="d">
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <ResourceDictionary.MergedDictionaries>
  15. </ResourceDictionary.MergedDictionaries>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid >
  19. <Grid.RowDefinitions>
  20. <RowDefinition Name="HeadRow" Height="40" />
  21. <RowDefinition Height="*"/>
  22. <RowDefinition Height="55" />
  23. </Grid.RowDefinitions>
  24. <TextBlock Grid.Row="0" Text="设置密码" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
  25. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center">
  26. <StackPanel Margin="50,0,50,10">
  27. <StackPanel Margin="0,10,0,15">
  28. <CheckBox x:Name="CanOpenCheckBox" IsChecked="{Binding CanOpen}" Margin="0,0,0,10" Command="{Binding DelegateSetOpenCommand}">
  29. <TextBlock Text="开启文档口令"></TextBlock>
  30. </CheckBox>
  31. <Grid>
  32. <PasswordBox x:Name="CanOpenPasswordBox" Width="300" Height="24" Visibility="Visible" VerticalAlignment="Center"
  33. GotFocus="PasswordBox_GotFocus" PasswordChanged="PasswordBox_PasswordChanged" IsEnabled="{Binding ElementName=CanOpenCheckBox, Path=IsChecked}">
  34. </PasswordBox>
  35. <TextBox x:Name="CanOpenTextBox" Width="300" Height="24" Visibility="Hidden" VerticalAlignment="Center"
  36. GotFocus="TextBox_GotFocus" TextChanged="TextBox_TextChanged" >
  37. </TextBox>
  38. <Label x:Name="ShowOpenPasswordBoxEyeLabel" HorizontalAlignment="Right" Margin="0,3,0,3"
  39. MouseLeftButtonUp="ShowPasswordBoxEyeLabel_MouseLeftButtonUp" IsEnabled="{Binding ElementName=CanOpenCheckBox, Path=IsChecked}">
  40. <Border Height="23" Width="27" Background="MediumVioletRed" ></Border>
  41. </Label>
  42. <Label x:Name="ShowOpenTextBoxEyeLabel" HorizontalAlignment="Right" Visibility="Hidden" Margin="0,3,0,3"
  43. MouseLeftButtonUp="ShowTextBoxEyeLabel_MouseLeftButtonUp" IsEnabled="{Binding ElementName=CanOpenCheckBox, Path=IsChecked}">
  44. <Border Height="23" Width="27" Background="LightSeaGreen" ></Border>
  45. </Label>
  46. </Grid>
  47. </StackPanel>
  48. <StackPanel Margin="0,0,0,15">
  49. <CheckBox IsChecked="{Binding CanEdit}" Name="CanEditCheckBox" Margin="0,0,0,10" Command="{Binding DelegateSetEditCommand}">
  50. <TextBlock Text="许可口令"></TextBlock>
  51. </CheckBox>
  52. <Grid>
  53. <PasswordBox x:Name="CanEditPasswordBox" Width="300" Height="24" Visibility="Visible" VerticalAlignment="Center"
  54. GotFocus="PasswordBox_GotFocus" PasswordChanged="PasswordBox_PasswordChanged" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}">
  55. </PasswordBox>
  56. <TextBox x:Name="CanEditTextBox" Width="300" Height="24" Visibility="Hidden" VerticalAlignment="Center"
  57. GotFocus="TextBox_GotFocus" TextChanged="TextBox_TextChanged">
  58. </TextBox>
  59. <Label x:Name="ShowEditPasswordBoxEyeLabel" HorizontalAlignment="Right" Margin="0,3,0,3"
  60. MouseLeftButtonUp="ShowPasswordBoxEyeLabel_MouseLeftButtonUp" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}">
  61. <Border Height="23" Width="27" Background="MediumVioletRed"
  62. ></Border>
  63. </Label>
  64. <Label x:Name="ShowEditTextBoxEyeLabel" HorizontalAlignment="Right" Visibility="Hidden" Margin="0,3,0,3"
  65. MouseLeftButtonUp="ShowTextBoxEyeLabel_MouseLeftButtonUp">
  66. <Border Height="23" Width="27" Background="LightSeaGreen" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}"></Border>
  67. </Label>
  68. </Grid>
  69. </StackPanel>
  70. <StackPanel Margin="0,0,0,15">
  71. <TextBlock Text="允许打印" Margin="0,0,0,10"/>
  72. <ComboBox Width="300" Height="24" SelectedIndex="{Binding PrintMod,Mode=TwoWay}" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}">
  73. <ComboBoxItem Tag="NoneTag">无</ComboBoxItem>
  74. <ComboBoxItem Tag="LowDpiTag">低分辨率(150dpi)</ComboBoxItem>
  75. <ComboBoxItem Tag="HighDpiTag">高分辨率</ComboBoxItem>
  76. </ComboBox>
  77. </StackPanel>
  78. <StackPanel Margin="0,0,0,15">
  79. <TextBlock Text="允许更改" Margin="0,0,0,10"/>
  80. <ComboBox Width="300" SelectedIndex="{Binding ChangeMod,Mode=TwoWay}" Height="24" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}">
  81. <ComboBoxItem Tag="NoneTag">无</ComboBoxItem>
  82. <ComboBoxItem Tag="ChangePageTag">插入,删除和旋转页面</ComboBoxItem>
  83. <ComboBoxItem Tag="FormAndSignatureTag">填写表单域和签名现有的签名域</ComboBoxItem>
  84. <ComboBoxItem Tag="AnnotAndFormAndSignatureTag">注释,填写表单域和签名现有签名域</ComboBoxItem>
  85. <ComboBoxItem Tag="ExceptAbstrat">除了提取页面</ComboBoxItem>
  86. </ComboBox>
  87. </StackPanel>
  88. <StackPanel Margin="0,0,0,15">
  89. <TextBlock Text="加密级别" Margin="0,0,0,10"/>
  90. <ComboBox SelectedIndex="0" Width="300" Height="24" HorizontalAlignment="Left">
  91. <ComboBoxItem Tag="0">128-bit-RC4</ComboBoxItem>
  92. <ComboBoxItem Tag="1">128-bit-AES</ComboBoxItem>
  93. <ComboBoxItem Tag="2">256 -bit-AES</ComboBoxItem>
  94. </ComboBox>
  95. </StackPanel>
  96. </StackPanel>
  97. </Border>
  98. <Grid Grid.Row="2" Width="400" VerticalAlignment="Center">
  99. <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
  100. <Button x:Name="ConfirmEncryptBtn" Background="WhiteSmoke" Width="100" Height="25" Margin="10,0,0,0">
  101. <Border>
  102. <TextBlock Text="批量处理" ></TextBlock>
  103. </Border>
  104. </Button>
  105. </StackPanel>
  106. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  107. <Button Background="WhiteSmoke" Width="100" Height="25" Margin="0,0,10,0" Command="{Binding DelegateCancelEncryptCommand}">
  108. <Border>
  109. <TextBlock Text="取消"></TextBlock>
  110. </Border>
  111. </Button>
  112. <Button IsEnabled="{Binding IsEnabledConfirm, Mode=TwoWay}" Background="WhiteSmoke" Width="100" Height="25" Margin="0,0,10,0" Command="{Binding DelegateConfirmEncryptCommand}">
  113. <Border>
  114. <TextBlock Text="加密" ></TextBlock>
  115. </Border>
  116. </Button>
  117. </StackPanel>
  118. </Grid>
  119. </Grid>
  120. </UserControl>