|
@@ -2,6 +2,7 @@
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:help="clr-namespace:PDF_Office.Helper"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:cus="clr-namespace:PDF_Office.CustomControl"
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
@@ -11,9 +12,225 @@
|
|
|
d:DesignWidth="818"
|
|
|
mc:Ignorable="d">
|
|
|
<UserControl.Resources>
|
|
|
- <ResourceDictionary>
|
|
|
+
|
|
|
<convert:UnVisivleConvert x:Key="unVisibleConvert"/>
|
|
|
- </ResourceDictionary>
|
|
|
+
|
|
|
+ <Style TargetType="CheckBox" x:Key="EyeCheckbox">
|
|
|
+ <Setter Property="Cursor" Value="Hand"></Setter>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type CheckBox}">
|
|
|
+ <Grid>
|
|
|
+
|
|
|
+ <Border Background="Transparent"
|
|
|
+ BorderBrush="White"
|
|
|
+ BorderThickness="1"
|
|
|
+ CornerRadius="0"
|
|
|
+ VerticalAlignment="Center" >
|
|
|
+ <Grid Height="{TemplateBinding Height}"
|
|
|
+ Width="{Binding ActualHeight,RelativeSource={RelativeSource Self}}">
|
|
|
+ <Ellipse x:Name="ellipse"
|
|
|
+ Fill="Blue" Margin="2" />
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
+ <Setter TargetName="ellipse" Property="Fill" Value="Red">
|
|
|
+ </Setter>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsChecked" Value="False">
|
|
|
+ <Setter TargetName="ellipse" Property="Fill" Value="Blue">
|
|
|
+ </Setter>
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="PasswordBox" x:Key="OpenPasswordBoxStyle">
|
|
|
+ <Setter Property="Height" Value="32"/>
|
|
|
+ <Setter Property="FontSize" Value="14"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="PasswordBox">
|
|
|
+ <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
+ CornerRadius="5">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="24"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0">
|
|
|
+ <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
|
|
|
+ Name="markText" Visibility="Collapsed" FontSize="12" />
|
|
|
+ <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
|
|
|
+ HorizontalScrollBarVisibility="Hidden"
|
|
|
+ VerticalScrollBarVisibility="Hidden"
|
|
|
+ VerticalAlignment="Center" MinHeight="20"/>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
+ <Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsKeyboardFocused" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
|
|
+ </Trigger>
|
|
|
+ <DataTrigger Binding="{Binding Path = OpenPassword}" Value="">
|
|
|
+ <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="TextBox" x:Key="OpenPasswordTextBoxStyle">
|
|
|
+ <Setter Property="Height" Value="32"/>
|
|
|
+ <Setter Property="FontSize" Value="14"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="TextBox">
|
|
|
+ <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
+ CornerRadius="5">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="24"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0">
|
|
|
+ <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
|
|
|
+ Name="markText" Visibility="Collapsed" FontSize="12" />
|
|
|
+ <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
|
|
|
+ HorizontalScrollBarVisibility="Hidden"
|
|
|
+ VerticalScrollBarVisibility="Hidden"
|
|
|
+ VerticalAlignment="Center" MinHeight="20"/>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
+ <Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsKeyboardFocused" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
|
|
+ </Trigger>
|
|
|
+ <DataTrigger Binding="{Binding Path = OpenPassword}" Value="">
|
|
|
+ <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="PasswordBox" x:Key="PermissionsPasswordBoxStyle">
|
|
|
+ <Setter Property="Height" Value="32"/>
|
|
|
+ <Setter Property="FontSize" Value="14"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="PasswordBox">
|
|
|
+ <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
+ CornerRadius="5">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="24"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0">
|
|
|
+ <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
|
|
|
+ Name="markText" Visibility="Collapsed" FontSize="12" />
|
|
|
+ <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
|
|
|
+ HorizontalScrollBarVisibility="Hidden"
|
|
|
+ VerticalScrollBarVisibility="Hidden"
|
|
|
+ VerticalAlignment="Center" MinHeight="20"/>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
+ <Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsKeyboardFocused" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
|
|
+ </Trigger>
|
|
|
+ <DataTrigger Binding="{Binding Path = PermissionsPassword}" Value="">
|
|
|
+ <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="TextBox" x:Key="PermissionsPasswordTextBoxStyle">
|
|
|
+ <Setter Property="Height" Value="32"/>
|
|
|
+ <Setter Property="FontSize" Value="14"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="TextBox">
|
|
|
+ <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ SnapsToDevicePixels="True"
|
|
|
+ CornerRadius="5">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="24"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0">
|
|
|
+ <TextBlock Text="{TemplateBinding help:PasswordBoxHelper.DisplayText}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
|
|
|
+ Name="markText" Visibility="Collapsed" FontSize="12" />
|
|
|
+ <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
|
|
|
+ HorizontalScrollBarVisibility="Hidden"
|
|
|
+ VerticalScrollBarVisibility="Hidden"
|
|
|
+ VerticalAlignment="Center" MinHeight="20"/>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
+ <Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsKeyboardFocused" Value="true">
|
|
|
+ <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
|
|
|
+ </Trigger>
|
|
|
+ <DataTrigger Binding="{Binding Path = PermissionsPassword}" Value="">
|
|
|
+ <Setter Property="Visibility" TargetName="markText" Value="Visible"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
<Grid IsEnabled="{Binding SafetyGridIsEnabled}">
|
|
@@ -128,74 +345,59 @@
|
|
|
</Grid>
|
|
|
<Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetSafetyGridIsEnabled}">
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="268*"/>
|
|
|
- <RowDefinition Height="268*"/>
|
|
|
+ <RowDefinition Height="536*"/>
|
|
|
<RowDefinition Height="64*" MaxHeight="64"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <Grid Grid.Row="0">
|
|
|
- <StackPanel Margin="15,23,0,0">
|
|
|
- <TextBlock Text="设置密码" Width="48" Height="20" HorizontalAlignment="Left"/>
|
|
|
- <StackPanel Margin="0,11,0,0">
|
|
|
- <CheckBox x:Name="CanOpenCheckBox" IsChecked="{Binding CanOpen}" Margin="0,0,0,10" Command="{Binding DelegateSetOpenCommand}">
|
|
|
- <TextBlock Text="开启文档口令"></TextBlock>
|
|
|
- </CheckBox>
|
|
|
- <Grid HorizontalAlignment="Left" Width="228">
|
|
|
- <PasswordBox x:Name="CanOpenPasswordBox" Width="228" Height="24" Visibility="Visible" VerticalAlignment="Center"
|
|
|
- GotFocus="PasswordBox_GotFocus" PasswordChanged="PasswordBox_PasswordChanged" IsEnabled="{Binding ElementName=CanOpenCheckBox, Path=IsChecked}">
|
|
|
- </PasswordBox>
|
|
|
- <TextBox x:Name="CanOpenTextBox" Width="228" Height="24" Visibility="Hidden" VerticalAlignment="Center"
|
|
|
- GotFocus="TextBox_GotFocus" TextChanged="TextBox_TextChanged" >
|
|
|
- </TextBox>
|
|
|
- <Label x:Name="ShowOpenPasswordBoxEyeLabel" HorizontalAlignment="Right" Margin="0,3,0,3"
|
|
|
- MouseLeftButtonUp="ShowPasswordBoxEyeLabel_MouseLeftButtonUp">
|
|
|
- <Border Height="23" Width="27" Background="MediumVioletRed" ></Border>
|
|
|
- </Label>
|
|
|
- <Label x:Name="ShowOpenTextBoxEyeLabel" HorizontalAlignment="Right" Visibility="Hidden" Margin="0,3,0,3"
|
|
|
- MouseLeftButtonUp="ShowTextBoxEyeLabel_MouseLeftButtonUp">
|
|
|
- <Border Height="23" Width="27" Background="LightSeaGreen" ></Border>
|
|
|
- </Label>
|
|
|
- </Grid>
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Margin="0,17,0,0">
|
|
|
- <CheckBox IsChecked="{Binding CanEdit}" Name="CanEditCheckBox" Margin="0,0,0,10" Command="{Binding DelegateSetEditCommand}">
|
|
|
- <TextBlock Text="许可口令"></TextBlock>
|
|
|
- </CheckBox>
|
|
|
- <Grid HorizontalAlignment="Left" Width="228">
|
|
|
- <PasswordBox x:Name="CanEditPasswordBox" Width="228" Height="24" Visibility="Visible" VerticalAlignment="Center"
|
|
|
- GotFocus="PasswordBox_GotFocus" PasswordChanged="PasswordBox_PasswordChanged" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}">
|
|
|
- </PasswordBox>
|
|
|
- <TextBox x:Name="CanEditTextBox" Width="228" Height="24" Visibility="Hidden" VerticalAlignment="Center"
|
|
|
- GotFocus="TextBox_GotFocus" TextChanged="TextBox_TextChanged">
|
|
|
- </TextBox>
|
|
|
- <Label x:Name="ShowEditPasswordBoxEyeLabel" HorizontalAlignment="Right" Margin="0,3,0,3"
|
|
|
- MouseLeftButtonUp="ShowPasswordBoxEyeLabel_MouseLeftButtonUp">
|
|
|
- <Border Height="23" Width="27" Background="MediumVioletRed"
|
|
|
- ></Border>
|
|
|
- </Label>
|
|
|
- <Label x:Name="ShowEditTextBoxEyeLabel" HorizontalAlignment="Right" Visibility="Hidden" Margin="0,3,0,3"
|
|
|
- MouseLeftButtonUp="ShowTextBoxEyeLabel_MouseLeftButtonUp">
|
|
|
- <Border Height="23" Width="27" Background="LightSeaGreen" ></Border>
|
|
|
- </Label>
|
|
|
- </Grid>
|
|
|
- </StackPanel>
|
|
|
+ <Grid Margin="16,36,16,0" >
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="62"></RowDefinition>
|
|
|
+ <RowDefinition Height="78"></RowDefinition>
|
|
|
+ <RowDefinition Height="60"></RowDefinition>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <CheckBox Name="OpenPasswordChk" IsChecked="{Binding NeedOpenPassword, Mode=TwoWay}" Command="{Binding SetOpenPasswordCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}">
|
|
|
+ <TextBlock Text="Document Open Password" FontFamily="Segoe UI" FontSize="14"></TextBlock>
|
|
|
+ </CheckBox>
|
|
|
+ <Grid Margin="0,8,0,16" IsEnabled="{Binding ElementName=OpenPasswordChk, Path=IsChecked}" >
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="24"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <PasswordBox Style="{StaticResource OpenPasswordBoxStyle}" help:PasswordBoxHelper.Password="{Binding OpenPassword, Mode=TwoWay , UpdateSourceTrigger=PropertyChanged}" help:PasswordBoxHelper.DisplayText="{Binding OpenPasswordMsg, Mode=TwoWay}" Grid.ColumnSpan="2">
|
|
|
+ </PasswordBox>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <CheckBox Grid.Column="1" Height="56" VerticalAlignment="Bottom"></CheckBox>
|
|
|
</StackPanel>
|
|
|
- </Grid>
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <StackPanel Margin="15,0,0,0">
|
|
|
- <TextBlock Text="允许打印" Width="48" Height="20" HorizontalAlignment="Left"/>
|
|
|
- <ComboBox Height="24" Width="228" HorizontalAlignment="Left" Margin="0,8.5,0,0" SelectedIndex="{Binding PrintMod,Mode=TwoWay}" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}"></ComboBox>
|
|
|
- <TextBlock Text="允许更改" Margin="0,20.5,0,0" Width="48" Height="20" HorizontalAlignment="Left"/>
|
|
|
- <ComboBox Height="24" Width="228" HorizontalAlignment="Left" Margin="0,8.5,0,0" SelectedIndex="{Binding ChangeMod,Mode=TwoWay}" IsEnabled="{Binding ElementName=CanEditCheckBox, Path=IsChecked}"></ComboBox>
|
|
|
- <TextBlock Text="加密级别" Width="48" Height="20" HorizontalAlignment="Left" Margin="0,20.5,0,0"/>
|
|
|
- <ComboBox Height="24" Width="228" HorizontalAlignment="Left" Margin="0,8.5,0,0" >
|
|
|
- <ComboBoxItem Tag="0">128-bit-RC4</ComboBoxItem>
|
|
|
- <ComboBoxItem Tag="1">128-bit-AES</ComboBoxItem>
|
|
|
- <ComboBoxItem Tag="2">256 -bit-AES</ComboBoxItem>
|
|
|
- </ComboBox>
|
|
|
+ <StackPanel Orientation="Vertical" Grid.Row="1" Margin="0,16,0,0">
|
|
|
+ <CheckBox Name="PermissionsPasswordChk" IsChecked="{Binding NeedPermissionsPassword, Mode=TwoWay}" Command="{Binding SetPermissionsPasswordCommand}" CommandParameter="{Binding RelativeSource = {RelativeSource Self}}">
|
|
|
+ <TextBlock Text="Permissions" FontFamily="Segoe UI" FontSize="14"></TextBlock>
|
|
|
+ </CheckBox>
|
|
|
+ <Grid Height="32" Margin="0,8,0,16" IsEnabled="{Binding ElementName=PermissionsPasswordChk, Path=IsChecked}" >
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="24"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <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}">
|
|
|
+ </PasswordBox>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ </StackPanel >
|
|
|
+ <StackPanel Grid.Row="2" Orientation="Vertical" IsEnabled="{Binding ElementName=PermissionsPasswordChk, Path=IsChecked}" >
|
|
|
+ <CheckBox Margin="0,8,0,0" IsChecked="{Binding IsRestrictPrinting,Mode=TwoWay}" Command="{Binding SetRestrictCommand}" CommandParameter="{Binding RelativeSource = {RelativeSource Self}}" Tag="Printing">
|
|
|
+ <TextBlock Text="Restrict document printing"></TextBlock>
|
|
|
+ </CheckBox>
|
|
|
+ <CheckBox Margin="0,8,0,0" IsChecked="{Binding IsRestrictCopying}" Command="{Binding SetRestrictCommand}" CommandParameter="{Binding RelativeSource = {RelativeSource Self}}" Tag="Copying">
|
|
|
+ <TextBlock Text="Restrict content copying"></TextBlock>
|
|
|
+ </CheckBox>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
<Grid Grid.Row="2">
|
|
|
- <Button Height="40" Width="228" Background="Black" Command="{Binding DelegateConfirmEncryptCommand}" IsEnabled="{Binding IsEnabledConfirm, Mode=TwoWay}">
|
|
|
+ <Button Height="40" Width="228" Background="Black" Command="{Binding EncryptCommand}" IsEnabled="{Binding EnableConfirm, Mode=TwoWay}">
|
|
|
<TextBlock Text="设置安全密码" FontSize="18" Foreground="White"/>
|
|
|
</Button>
|
|
|
</Grid>
|