FillDigitalSignatureControl.xaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.FillDigitalSignatureControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="530" d:DesignWidth="630"
  10. >
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="../../Asset/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
  15. <ResourceDictionary Source="../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
  16. <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  17. </ResourceDictionary.MergedDictionaries>
  18. <common:SigResourceConverter x:Key="SigResourceConverter"></common:SigResourceConverter>
  19. </ResourceDictionary>
  20. </UserControl.Resources>
  21. <Grid>
  22. <Grid Name="MainGrid" Background="White">
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="auto"></RowDefinition>
  25. <RowDefinition Height="auto"></RowDefinition>
  26. <RowDefinition Height="30"></RowDefinition>
  27. <RowDefinition Height="auto"></RowDefinition>
  28. <RowDefinition Height="auto"></RowDefinition>
  29. <RowDefinition Height="auto"></RowDefinition>
  30. </Grid.RowDefinitions>
  31. <Grid Grid.Row="0" Width="314" HorizontalAlignment="Center" Margin="0,20,0,1">
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="91"></ColumnDefinition>
  34. <ColumnDefinition Width="87"></ColumnDefinition>
  35. <ColumnDefinition Width="68"></ColumnDefinition>
  36. <ColumnDefinition Width="68"></ColumnDefinition>
  37. </Grid.ColumnDefinitions>
  38. <Grid>
  39. <Border Name="KeyboardBorder" Background="White" Padding="0,0,0,5" BorderBrush="#4982E6" Width="75"
  40. MouseDown="Border_MouseDown" Tag="Keyboard">
  41. <TextBlock FontSize="16" HorizontalAlignment="Center" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Option_Keyboard}"></TextBlock>
  42. </Border>
  43. </Grid>
  44. <Grid Grid.Column="1">
  45. <Border Name="TrackpadBorder" Background="White" Padding="0,0,0,5" BorderBrush="#4982E6" Width="72"
  46. MouseDown="Border_MouseDown" Tag="Trackpad">
  47. <TextBlock FontSize="16" HorizontalAlignment="Center" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Option_Trackpad}"></TextBlock>
  48. </Border>
  49. </Grid>
  50. <Grid Grid.Column="2">
  51. <Border Name="ImageBorder" Background="White" Padding="0,0,0,5" BorderBrush="#4982E6" Width="52"
  52. MouseDown="Border_MouseDown" Tag="Image">
  53. <TextBlock FontSize="16" HorizontalAlignment="Center" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Option_Image}"></TextBlock>
  54. </Border>
  55. </Grid>
  56. <Grid Grid.Column="3">
  57. <Border Name="NoneBorder" Background="White" Padding="0,0,0,5" BorderBrush="#4982E6" Width="43"
  58. MouseDown="Border_MouseDown" Tag="None">
  59. <TextBlock FontSize="16" HorizontalAlignment="Center" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Option_None}"></TextBlock>
  60. </Border>
  61. </Grid>
  62. </Grid>
  63. <Canvas Grid.Row="1" Width="580" Height="187" Background="#F4F7FF">
  64. <Image Width="580" Height="187" x:Name="imageControl" />
  65. </Canvas>
  66. <StackPanel Grid.Row="2" Name="ImagePickPanel" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0,6,30,0"
  67. Visibility="Hidden">
  68. <TextBlock x:Name="BrowseTxt" Foreground="Blue" MouseLeftButtonDown="BrowseTxt_MouseLeftButtonDown" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Browse}"></TextBlock>
  69. <TextBlock x:Name="ClearTxt" Margin="10,0,0,0" Foreground="Blue" MouseLeftButtonDown="ClearTxt_MouseLeftButtonDown" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Clear}"></TextBlock>
  70. </StackPanel>
  71. <Grid Grid.Row="3" Margin="25,0,25,0">
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition Width="*"></ColumnDefinition>
  74. <ColumnDefinition Width="auto"></ColumnDefinition>
  75. </Grid.ColumnDefinitions>
  76. <TextBlock FontSize="14" Margin="0,3,0,0" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_Include}"></TextBlock>
  77. <StackPanel Margin="00,0,20,0" Grid.Column="1" Orientation="Horizontal">
  78. <TextBlock FontSize="14" VerticalAlignment="Center" Margin="0,0,8,0" Text="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_TextAlignment}"></TextBlock>
  79. <ToggleButton Name="TextAlignLeftBtn" Style="{StaticResource ToggleButtonStyle}" BorderThickness="0" Width="73" Height="30"
  80. IsChecked="True" Click="TextAlignBtn_Click">
  81. <Path Fill="Black">
  82. <Path.Data>
  83. M13 4V3H0V4H13ZM16 8V7H0V8H16ZM10 11V12H0V11H10Z
  84. </Path.Data>
  85. </Path>
  86. </ToggleButton>
  87. <ToggleButton Name="TextAlignRightBtn" Style="{StaticResource ToggleButtonStyle}" BorderThickness="0" Width="73" Height="30"
  88. Click="TextAlignBtn_Click">
  89. <Path Fill="Black">
  90. <Path.Data>
  91. M16 4V3H3.00079V4H16ZM16 8V7H0.000976562V8H16ZM16 11V12H6.00061V11H16Z
  92. </Path.Data>
  93. </Path>
  94. </ToggleButton>
  95. </StackPanel>
  96. </Grid>
  97. <Grid Grid.Row="4" Margin="25,10,0,0">
  98. <Grid.ColumnDefinitions>
  99. <ColumnDefinition Width="auto"></ColumnDefinition>
  100. <ColumnDefinition Width="auto"></ColumnDefinition>
  101. </Grid.ColumnDefinitions>
  102. <Grid HorizontalAlignment="Left">
  103. <Grid.RowDefinitions>
  104. <RowDefinition Height="32"></RowDefinition>
  105. <RowDefinition Height="32"></RowDefinition>
  106. <RowDefinition Height="32"></RowDefinition>
  107. <RowDefinition Height="32"></RowDefinition>
  108. </Grid.RowDefinitions>
  109. <Grid.ColumnDefinitions>
  110. <ColumnDefinition Width="auto"></ColumnDefinition>
  111. <ColumnDefinition Width="50"></ColumnDefinition>
  112. <ColumnDefinition Width="auto"></ColumnDefinition>
  113. <ColumnDefinition Width="auto"></ColumnDefinition>
  114. </Grid.ColumnDefinitions>
  115. <CheckBox x:Name="NameChk" FontSize="14" Click="NameChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_Name}"></CheckBox>
  116. <CheckBox x:Name="DateChk" FontSize="14" Grid.Row="1" Click="DateChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_Date}"></CheckBox>
  117. <CheckBox x:Name="LogoChk" FontSize="14" Grid.Row="2" Click="LogoChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_Logo}"></CheckBox>
  118. <CheckBox x:Name="ReasonChk" FontSize="14" Grid.Row="3" Click="ReasonChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_Reason}"></CheckBox>
  119. <CheckBox x:Name="DistinguishableNameChk" FontSize="14" Grid.Column="2" Click="DistinguishableNameChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_DN}"></CheckBox>
  120. <CheckBox x:Name="ComPDFKitVersionChk" FontSize="14" Grid.Column="2" Grid.Row="1" Click="ComPDFKitVersionChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_Version}"></CheckBox>
  121. <CheckBox x:Name="PositionChk" FontSize="14" Grid.Column="2" Grid.Row="2" Click="PositionChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Chk_Position}"></CheckBox>
  122. <CheckBox x:Name="TabChk" FontSize="14" Grid.Column="2" Grid.Row="3" Click="TabChk_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Tip_Tab}"></CheckBox>
  123. <StackPanel x:Name="Reasonstp" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="4" Margin="30,0,0,0" Grid.RowSpan="2" Height="30" Width="280">
  124. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter}, ConverterParameter=Cmb_Reason}" VerticalAlignment="Center" Width="50"></TextBlock>
  125. <ComboBox x:Name="ReasonCmb" SelectionChanged="ReasonCmb_SelectionChanged" Width="220" VerticalContentAlignment="Center">
  126. <ComboBoxItem Content="{Binding Converter={StaticResource SigResourceConverter}, ConverterParameter=Reason_None}"></ComboBoxItem>
  127. <ComboBoxItem Content="{Binding Converter={StaticResource SigResourceConverter}, ConverterParameter=Reason_Owner}" IsSelected="True"></ComboBoxItem>
  128. <ComboBoxItem Content="{Binding Converter={StaticResource SigResourceConverter}, ConverterParameter=Reason_Approving}"></ComboBoxItem>
  129. <ComboBoxItem Content="{Binding Converter={StaticResource SigResourceConverter}, ConverterParameter=Reason_Reviewed}"></ComboBoxItem>
  130. </ComboBox>
  131. </StackPanel>
  132. <StackPanel x:Name="PositionStp" Visibility="Collapsed" Orientation="Horizontal" Grid.Column="4" Grid.Row="1" Margin="30,10,0,0" Grid.RowSpan="2" Height="30" Width="280">
  133. <TextBlock Text="{Binding Converter={StaticResource SigResourceConverter}, ConverterParameter=Tip_Position}" VerticalAlignment="Center" Width="50"></TextBlock>
  134. <TextBox Width="220" x:Name="PositionTbx" TextChanged="PositionTbx_TextChanged"></TextBox>
  135. </StackPanel>
  136. </Grid>
  137. <StackPanel Name="ReasonPanel" Grid.Column="1" Orientation="Horizontal" Margin="15,10,0,0" VerticalAlignment="Top"
  138. Visibility="Collapsed">
  139. <TextBlock VerticalAlignment="Center" Margin="0,0,5,0">Reason</TextBlock>
  140. </StackPanel>
  141. </Grid>
  142. <Grid Grid.Row="5" Margin="25,10,0,0">
  143. <Grid.ColumnDefinitions>
  144. <ColumnDefinition Width="auto"></ColumnDefinition>
  145. <ColumnDefinition Width="auto"></ColumnDefinition>
  146. <ColumnDefinition Width="*"></ColumnDefinition>
  147. <ColumnDefinition Width="auto"></ColumnDefinition>
  148. <ColumnDefinition Width="auto"></ColumnDefinition>
  149. </Grid.ColumnDefinitions>
  150. <Button x:Name="CancelBtn" Grid.Column="3" Height="32" Width="82" Style="{StaticResource LightButtonStyle}"
  151. Background="#DFE9FF" BorderThickness="0" Click="CancelBtn_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Cancel}"></Button>
  152. <Button x:Name="ContinueBtn" Grid.Column="4" Margin="10,0,25,0" Height="32" Width="97" Style="{StaticResource ButtonStyle}" Click="ContinueBtn_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Save}"></Button>
  153. </Grid>
  154. </Grid>
  155. <Border Name="KeyboardPopup" Background="#A0000000" Visibility="Visible">
  156. <Grid Background="White" Width="528" Height="412">
  157. <Grid.RowDefinitions>
  158. <RowDefinition Height="auto" />
  159. <RowDefinition Height="*" />
  160. <RowDefinition Height="auto" />
  161. <RowDefinition Height="auto" />
  162. </Grid.RowDefinitions>
  163. <Button HorizontalAlignment="Right" Margin="0,8,10,0" Style="{StaticResource LightButtonStyle}" BorderThickness="0"
  164. Background="White" Width="24" Height="24" Click="KeyboardPopupClose_Click">
  165. <Button.Content>
  166. <Path Fill="#43474D" Width="16" Height="16">
  167. <Path.Data>
  168. M12.6466 13.2531L13.0001 13.6066L13.7072 12.8995L13.3537 12.546L8.7072 7.8995L13.2532 3.35352L13.6067 2.99997L12.8996
  169. 2.29286L12.5461 2.64642L8.00009 7.19239L3.45418 2.64648L3.10063 2.29292L2.39352 3.00003L2.74708 3.35358L7.29299
  170. 7.8995L2.64657 12.5459L2.29302 12.8995L3.00013 13.6066L3.35368 13.253L8.0001 8.6066L12.6466 13.2531Z
  171. </Path.Data>
  172. </Path>
  173. </Button.Content>
  174. </Button>
  175. <TextBox x:Name="KeyboardInPutTextBox" MaxLength="50" Grid.Row="1" BorderThickness="0" Background="#F2F3F5" Margin="10,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="45"/>
  176. <StackPanel Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,10,20,10">
  177. <common:ColorPickerControl x:Name="TextColorPickerControl" Loaded="TextColorPickerControl_Loaded" ColorChanged="TextColorPickerControl_ColorChanged" TransparentBtnProperty="Collapsed"></common:ColorPickerControl>
  178. </StackPanel>
  179. <Grid Grid.Row="3" Margin="25,0,0,20" VerticalAlignment="Top">
  180. <Button Height="32" Width="82" Style="{StaticResource LightButtonStyle}" Background="#DFE9FF"
  181. BorderThickness="0" HorizontalAlignment="Left" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Clear}" Click="KeyboardClear_Click"/>
  182. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  183. <Button Height="32" Width="82" Style="{StaticResource LightButtonStyle}" Background="#DFE9FF"
  184. BorderThickness="0" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Cancel}" Click="KeyboardCancel_Click"/>
  185. <Button x:Name="SaveBtn" Margin="10,0,25,0" Height="32" Width="97" Style="{StaticResource ButtonStyle}" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Save}" Click="KeyboardSave_Click"/>
  186. </StackPanel>
  187. </Grid>
  188. </Grid>
  189. </Border>
  190. <Border Name="CanvaDrawPopup" Background="#A0000000" Visibility="Collapsed">
  191. <Grid Background="White" Width="528" Height="412">
  192. <Grid.RowDefinitions>
  193. <RowDefinition Height="auto"></RowDefinition>
  194. <RowDefinition Height="*"></RowDefinition>
  195. <RowDefinition Height="auto"></RowDefinition>
  196. </Grid.RowDefinitions>
  197. <Button HorizontalAlignment="Right" Margin="0,8,10,0" Style="{StaticResource LightButtonStyle}" BorderThickness="0"
  198. Background="White" Width="24" Height="24" Click="CanvasPopupClose_Click">
  199. <Button.Content>
  200. <Path Fill="#43474D" Width="16" Height="16">
  201. <Path.Data>
  202. M12.6466 13.2531L13.0001 13.6066L13.7072 12.8995L13.3537 12.546L8.7072 7.8995L13.2532 3.35352L13.6067 2.99997L12.8996
  203. 2.29286L12.5461 2.64642L8.00009 7.19239L3.45418 2.64648L3.10063 2.29292L2.39352 3.00003L2.74708 3.35358L7.29299
  204. 7.8995L2.64657 12.5459L2.29302 12.8995L3.00013 13.6066L3.35368 13.253L8.0001 8.6066L12.6466 13.2531Z
  205. </Path.Data>
  206. </Path>
  207. </Button.Content>
  208. </Button>
  209. <InkCanvas Name="DrawInkCanvas" Grid.Row="1" Width="580" Height="292" Background="#F2F3F5">
  210. </InkCanvas>
  211. <Grid Grid.Row="2" Margin="25,0,0,20">
  212. <Grid.ColumnDefinitions>
  213. <ColumnDefinition Width="auto"></ColumnDefinition>
  214. <ColumnDefinition Width="*"></ColumnDefinition>
  215. <ColumnDefinition Width="auto"></ColumnDefinition>
  216. <ColumnDefinition Width="auto"></ColumnDefinition>
  217. </Grid.ColumnDefinitions>
  218. <Button Height="32" Width="82" Style="{StaticResource LightButtonStyle}" Background="#DFE9FF"
  219. BorderThickness="0" Click="CanvasClearBtn_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Clear}"></Button>
  220. <Button Grid.Column="2" Height="32" Width="82" Style="{StaticResource LightButtonStyle}" Background="#DFE9FF"
  221. BorderThickness="0" Click="CanvasPopupClose_Click" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Cancel}"></Button>
  222. <Button Grid.Column="3" Click="CanvasPopupConfirm_Click" Margin="10,0,25,0" Height="32" Width="97" Style="{StaticResource ButtonStyle}" Content="{Binding Converter={StaticResource SigResourceConverter},ConverterParameter=Button_Save}"></Button>
  223. </Grid>
  224. </Grid>
  225. </Border>
  226. </Grid>
  227. </UserControl>