SettingsDialog.xaml 14 KB

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