SettingsDialog.xaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <Window x:Class="PDFViewer.SettingsDialog"
  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:local="clr-namespace:PDFViewer"
  7. xmlns:common="clr-namespace:Compdfkit_Tools.Common;assembly=ComPDFKit_Tools"
  8. mc:Ignorable="d"
  9. Title="Settings" Height="680" Width="440"
  10. ShowInTaskbar="False"
  11. WindowStartupLocation="CenterScreen"
  12. ResizeMode="NoResize"
  13. Window.Loaded="SettingsDialog_Loaded">
  14. <Window.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
  18. </ResourceDictionary.MergedDictionaries>
  19. <local:ResourceConverter x:Key="ResourceConverter" />
  20. <DropShadowEffect x:Key="HoverThumbEffect" BlurRadius="5" ShadowDepth="0" Opacity="0.5" Color="RoyalBlue"/>
  21. <SolidColorBrush x:Key="SecundaryBackgroundColor" Color="#ffffff"></SolidColorBrush>
  22. <SolidColorBrush x:Key="PrimaryBlueColor" Color="#1772b4"></SolidColorBrush>
  23. <SolidColorBrush x:Key="PrimaryGrayColor" Color="#606060"></SolidColorBrush>
  24. <SolidColorBrush x:Key="SecundaryBlueColor" Color="#2983bb"></SolidColorBrush>
  25. <SolidColorBrush x:Key="SecundaryGrayColor" Color="#cecece"></SolidColorBrush>
  26. <SolidColorBrush x:Key="TertiaryBlueColor" Color="#c2d1fc"></SolidColorBrush>
  27. <Style x:Key="SliderSwitchToggleButtonStyle" TargetType="ToggleButton">
  28. <Setter Property="Background" Value="{StaticResource SecundaryGrayColor}" />
  29. <Setter Property="BorderBrush" Value="{StaticResource PrimaryGrayColor }" />
  30. <Setter Property="Height" Value="20" />
  31. <Setter Property="Width" Value="35" />
  32. <Setter Property="MaxHeight" Value="20" />
  33. <Setter Property="MaxWidth" Value="35" />
  34. <Setter Property="Template">
  35. <Setter.Value>
  36. <ControlTemplate TargetType="{x:Type ToggleButton}">
  37. <Grid>
  38. <Border x:Name="Border"
  39. Background="{TemplateBinding Background}"
  40. CornerRadius="7"
  41. Height="14"
  42. Width="35"
  43. VerticalAlignment="Center"
  44. HorizontalAlignment="Center">
  45. <Border.Effect>
  46. <DropShadowEffect ShadowDepth="0.5" Opacity="0.3" />
  47. </Border.Effect>
  48. </Border>
  49. <Ellipse x:Name="Ellipse"
  50. Fill="{DynamicResource SecundaryBackgroundColor}"
  51. Height="20"
  52. Width="20"
  53. Stroke="{TemplateBinding BorderBrush}"
  54. StrokeThickness="1"
  55. HorizontalAlignment="Left">
  56. <Ellipse.Effect>
  57. <DropShadowEffect ShadowDepth="0.5" Opacity="0.3" />
  58. </Ellipse.Effect>
  59. </Ellipse>
  60. </Grid>
  61. <ControlTemplate.Triggers>
  62. <Trigger Property="IsChecked" Value="True">
  63. <Setter TargetName="Ellipse" Property="Stroke" Value="{DynamicResource PrimaryBlueColor}" />
  64. <Setter TargetName="Border" Property="Background" Value="{DynamicResource TertiaryBlueColor}" />
  65. <Setter TargetName="Ellipse" Property="Margin" Value="15 0 0 0" />
  66. </Trigger>
  67. <Trigger Property="IsMouseOver" Value="True">
  68. <Setter TargetName="Ellipse" Property="Stroke" Value="{DynamicResource PrimaryBlueColor}" />
  69. <Setter Property="Effect" Value="{StaticResource HoverThumbEffect}"></Setter>
  70. </Trigger>
  71. </ControlTemplate.Triggers>
  72. </ControlTemplate>
  73. </Setter.Value>
  74. </Setter>
  75. </Style>
  76. <Style x:Key="UnderlinedButtonStyle" TargetType="Button">
  77. <EventSetter Event="Click" Handler="EventSetter_ClickHandler"/>
  78. <Setter Property="Background" Value="Transparent"/>
  79. <Setter Property="Foreground" Value="#1460F3"/>
  80. <Setter Property="BorderBrush" Value="Transparent"/>
  81. <Setter Property="FontFamily" Value="Microsoft YaHei"></Setter>
  82. <Setter Property="Template">
  83. <Setter.Value>
  84. <ControlTemplate TargetType="Button">
  85. <Grid>
  86. <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4"/>
  87. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  88. <Rectangle Fill="#1460F3" Height="1" VerticalAlignment="Bottom"/>
  89. </Grid>
  90. <ControlTemplate.Triggers>
  91. <Trigger Property="IsMouseOver" Value="True">
  92. <Setter Property="Cursor" Value="Hand" />
  93. </Trigger>
  94. </ControlTemplate.Triggers>
  95. </ControlTemplate>
  96. </Setter.Value>
  97. </Setter>
  98. </Style>
  99. </ResourceDictionary>
  100. </Window.Resources>
  101. <Grid Margin="24,0,24,0">
  102. <Grid.RowDefinitions>
  103. <RowDefinition Height="166"></RowDefinition>
  104. <RowDefinition Height="150"></RowDefinition>
  105. <RowDefinition Height="35"></RowDefinition>
  106. <RowDefinition Height="45"/>
  107. <RowDefinition Height="180"></RowDefinition>
  108. <RowDefinition Height="84"></RowDefinition>
  109. </Grid.RowDefinitions>
  110. <StackPanel Margin="10,10,0,0">
  111. <Grid Margin="0,10,0,8" Height="32">
  112. <TextBlock Text="{Binding ConverterParameter=Setting_Author, Converter={StaticResource ResourceConverter}}" FontSize="14" FontWeight="DemiBold" FontFamily="Microsoft YaHei" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  113. <TextBox x:Name="AuthorTxb" Padding="5,0,5,0" TextChanged="AuthorTxb_TextChanged" HorizontalAlignment="Right" VerticalContentAlignment="Center" Width="130">
  114. </TextBox>
  115. </Grid>
  116. <Grid Margin="0,0,0,8" Height="32">
  117. <TextBlock Text="{Binding ConverterParameter=Setting_Author, Converter={StaticResource ResourceConverter}}" FontSize="14" FontWeight="DemiBold" FontFamily="Microsoft YaHei" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  118. <TextBox x:Name="AnnotatorTxb" Padding="5,0,5,0" TextChanged="AnnotatorTxb_TextChanged" HorizontalAlignment="Right" VerticalContentAlignment="Center" Width="130">
  119. </TextBox>
  120. </Grid>
  121. <Grid Height="32">
  122. <TextBlock Text="{Binding ConverterParameter=Setting_Language, Converter={StaticResource ResourceConverter}}" FontSize="14" FontWeight="DemiBold" FontFamily="Microsoft YaHei" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  123. <ComboBox x:Name="LanguageCmb" SelectionChanged="LanguageCmb_SelectionChanged" Style="{StaticResource ComboBoxStyle1}" HorizontalAlignment="Right" Width="130">
  124. <ComboBoxItem Tag="en-US">English</ComboBoxItem>
  125. <ComboBoxItem Tag="zh-CN">简体中文</ComboBoxItem>
  126. </ComboBox>
  127. </Grid>
  128. </StackPanel>
  129. <Border Grid.Row="1" BorderThickness="1" BorderBrush="#1A000000" Margin="0,0,0,10">
  130. <StackPanel Margin="10">
  131. <Grid Margin="0,0,0,8" Height="32">
  132. <TextBlock Text="{Binding ConverterParameter=Setting_HighlightLinks, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  133. <ToggleButton x:Name="HighlightLinkTog" Click="HighlightLinkTog_Click" Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
  134. </Grid>
  135. <Grid Margin="0,0,0,8" Height="32">
  136. <TextBlock Text="{Binding ConverterParameter=Setting_HighlightForms, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  137. <ToggleButton x:Name="HighlightFormTog" Click="HighlightFormTog_Click" Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
  138. </Grid>
  139. <Grid Margin="0,0,0,8" Height="32">
  140. <TextBlock Text="{Binding ConverterParameter=Setting_Divisor, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  141. <common:NumericUpDownControl x:Name="DivisorTxb" Unit="%" Minimum="1" Maximum="100" Width="118" Height="32" HorizontalAlignment="Right"></common:NumericUpDownControl>
  142. </Grid>
  143. </StackPanel>
  144. </Border>
  145. <TextBlock Text="{Binding ConverterParameter=Title_GlobalSettings, Converter={StaticResource ResourceConverter}}" Background="White" Grid.Row="1" Height="20" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Top" FontWeight="DemiBold" FontFamily="Microsoft YaHei" Margin="10,-10,0,0"></TextBlock>
  146. <Border BorderBrush="#1A000000" BorderThickness="1" Grid.Row="2" Grid.RowSpan="2" Margin="0,10,0,10">
  147. <StackPanel Margin="10">
  148. <Grid Margin="0,0,0,8" Height="32">
  149. <TextBlock Text="{Binding ConverterParameter=Subtitle_Version, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  150. <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding AppVersion}"></TextBlock>
  151. </Grid>
  152. </StackPanel>
  153. </Border>
  154. <TextBlock Text="{Binding ConverterParameter=Title_SDKInfo, Converter={StaticResource ResourceConverter}}" Grid.Row="2" Background="#ffffff" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" FontWeight="DemiBold" FontFamily="Microsoft YaHei" Margin="10,0,0,0"></TextBlock>
  155. <Border BorderBrush="#1A000000" BorderThickness="1" Grid.Row="4" Margin="0,10,0,10">
  156. <StackPanel Margin="10">
  157. <Grid Margin="0,0,0,8" Height="20">
  158. <TextBlock Text="{Binding ConverterParameter=Subtitle_Website, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  159. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="https://www.compdf.com/" Content="https://www.compdf.com/"></Button>
  160. </Grid>
  161. <Grid Margin="0,0,0,8" Height="20">
  162. <TextBlock Text="{Binding ConverterParameter=Subtitle_About, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  163. <Button Style="{StaticResource UnderlinedButtonStyle}" Tag="https://www.compdf.com/company/about" Content="https://www.compdf.com/company/about" HorizontalAlignment="Right"></Button>
  164. </Grid>
  165. <Grid Margin="0,0,0,8" Height="20">
  166. <TextBlock Text="{Binding ConverterParameter=Subtitle_Sales, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  167. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="https://www.compdf.com/contact-sales" Content="https://www.compdf.com/contact-sales"></Button>
  168. </Grid>
  169. <Grid Margin="0,0,0,8" Height="20">
  170. <TextBlock Text="{Binding ConverterParameter=Subtitle_Email, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  171. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="mailto:support@compdf.com" Content="support@compdf.com"></Button>
  172. </Grid>
  173. <Grid Margin="0,0,0,8" Height="20">
  174. <TextBlock Text="{Binding ConverterParameter=Subtitle_Support, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  175. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="https://www.compdf.com/support" Content="https://www.compdf.com/support"></Button>
  176. </Grid>
  177. </StackPanel>
  178. </Border>
  179. <TextBlock Text="{Binding ConverterParameter=Title_CompanyInfo, Converter={StaticResource ResourceConverter}}" FontSize="14" Grid.Row="4" Background="#ffffff" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" FontWeight="DemiBold" FontFamily="Microsoft YaHei" Margin="10,0,0,8"></TextBlock>
  180. <Grid Grid.Row="5" Margin="0,0,0,40">
  181. <Grid.RowDefinitions>
  182. <RowDefinition Height="auto"></RowDefinition>
  183. <RowDefinition></RowDefinition>
  184. </Grid.RowDefinitions>
  185. <TextBlock Text="{Binding ConverterParameter=Link_CopyRight, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Center" Foreground="#999999" FontFamily="Microsoft YaHei"></TextBlock>
  186. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="2" Orientation="Horizontal">
  187. <Button Style="{StaticResource UnderlinedButtonStyle}" Tag="https://www.compdf.com/privacy-policy/" Content="{Binding ConverterParameter=Link_Policy, Converter={StaticResource ResourceConverter}}"></Button>
  188. <Rectangle Width="1" Height="15" Fill="#1A000000" Margin="10,0,10,0"></Rectangle>
  189. <Button Style="{StaticResource UnderlinedButtonStyle}" Tag="https://www.compdf.com/terms-of-service" Content="{Binding ConverterParameter=Link_Service, Converter={StaticResource ResourceConverter}}"></Button>
  190. </StackPanel>
  191. </Grid>
  192. </Grid>
  193. </Window>