SettingsDialog.xaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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="580" 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="106"></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 Height="32">
  117. <TextBlock Text="{Binding ConverterParameter=Setting_Language, Converter={StaticResource ResourceConverter}}" FontSize="14" FontWeight="DemiBold" FontFamily="Microsoft YaHei" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  118. <ComboBox x:Name="LanguageCmb" SelectionChanged="LanguageCmb_SelectionChanged" Style="{StaticResource ComboBoxStyle1}" HorizontalAlignment="Right" Width="130">
  119. <ComboBoxItem Tag="en-US">English</ComboBoxItem>
  120. <ComboBoxItem Tag="zh-CN">简体中文</ComboBoxItem>
  121. </ComboBox>
  122. </Grid>
  123. </StackPanel>
  124. <Border Grid.Row="1" BorderThickness="1" BorderBrush="#1A000000" Margin="0,0,0,10">
  125. <StackPanel Margin="10">
  126. <Grid Margin="0,0,0,8" Height="32">
  127. <TextBlock Text="{Binding ConverterParameter=Setting_HighlightLinks, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  128. <ToggleButton x:Name="HighlightLinkTog" Click="HighlightLinkTog_Click" Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
  129. </Grid>
  130. <Grid Margin="0,0,0,8" Height="32">
  131. <TextBlock Text="{Binding ConverterParameter=Setting_HighlightForms, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  132. <ToggleButton x:Name="HighlightFormTog" Click="HighlightFormTog_Click" Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
  133. </Grid>
  134. <Grid Margin="0,0,0,8" Height="32">
  135. <TextBlock Text="{Binding ConverterParameter=Setting_Divisor, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  136. <common:NumericUpDownControl x:Name="DivisorTxb" Unit="%" Minimum="1" Maximum="100" Width="118" Height="32" HorizontalAlignment="Right"></common:NumericUpDownControl>
  137. </Grid>
  138. </StackPanel>
  139. </Border>
  140. <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>
  141. <Border BorderBrush="#1A000000" BorderThickness="1" Grid.Row="2" Grid.RowSpan="2" Margin="0,10,0,10">
  142. <StackPanel Margin="10">
  143. <Grid Margin="0,0,0,8" Height="32">
  144. <TextBlock Text="{Binding ConverterParameter=Subtitle_Version, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  145. <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Text="V1.11.0"></TextBlock>
  146. </Grid>
  147. </StackPanel>
  148. </Border>
  149. <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>
  150. <Border BorderBrush="#1A000000" BorderThickness="1" Grid.Row="4" Margin="0,10,0,10">
  151. <StackPanel Margin="10">
  152. <Grid Margin="0,0,0,8" Height="20">
  153. <TextBlock Text="{Binding ConverterParameter=Subtitle_Website, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  154. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="https://www.compdf.com/" Content="https://www.compdf.com/"></Button>
  155. </Grid>
  156. <Grid Margin="0,0,0,8" Height="20">
  157. <TextBlock Text="{Binding ConverterParameter=Subtitle_About, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  158. <Button Style="{StaticResource UnderlinedButtonStyle}" Tag="https://www.compdf.com/company/about" Content="https://www.compdf.com/company/about" HorizontalAlignment="Right"></Button>
  159. </Grid>
  160. <Grid Margin="0,0,0,8" Height="20">
  161. <TextBlock Text="{Binding ConverterParameter=Subtitle_Sales, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  162. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="https://www.compdf.com/contact-sales" Content="https://www.compdf.com/contact-sales"></Button>
  163. </Grid>
  164. <Grid Margin="0,0,0,8" Height="20">
  165. <TextBlock Text="{Binding ConverterParameter=Subtitle_Email, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  166. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="mailto:support@compdf.com" Content="support@compdf.com"></Button>
  167. </Grid>
  168. <Grid Margin="0,0,0,8" Height="20">
  169. <TextBlock Text="{Binding ConverterParameter=Subtitle_Support, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  170. <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Tag="https://www.compdf.com/support" Content="https://www.compdf.com/support"></Button>
  171. </Grid>
  172. </StackPanel>
  173. </Border>
  174. <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>
  175. <Grid Grid.Row="5" Margin="0,0,0,40">
  176. <Grid.RowDefinitions>
  177. <RowDefinition Height="auto"></RowDefinition>
  178. <RowDefinition></RowDefinition>
  179. </Grid.RowDefinitions>
  180. <TextBlock Text="{Binding ConverterParameter=Link_CopyRight, Converter={StaticResource ResourceConverter}}" HorizontalAlignment="Center" Foreground="#999999" FontFamily="Microsoft YaHei"></TextBlock>
  181. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="2" Orientation="Horizontal">
  182. <Button Style="{StaticResource UnderlinedButtonStyle}" Tag="https://www.compdf.com/privacy-policy/" Content="{Binding ConverterParameter=Link_Policy, Converter={StaticResource ResourceConverter}}"></Button>
  183. <Rectangle Width="1" Height="15" Fill="#1A000000" Margin="10,0,10,0"></Rectangle>
  184. <Button Style="{StaticResource UnderlinedButtonStyle}" Tag="https://www.compdf.com/terms-of-service" Content="{Binding ConverterParameter=Link_Service, Converter={StaticResource ResourceConverter}}"></Button>
  185. </StackPanel>
  186. </Grid>
  187. </Grid>
  188. </Window>