perf: update all png by iconfont

dev_deconstruction
DESKTOP-3BO4HSG\ksat 2 years ago
parent 948876bc1c
commit 27ffc11026

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

@ -37,8 +37,8 @@
<Button x:Name="TopmostBtn" <Button x:Name="TopmostBtn"
Template="{DynamicResource ButtonTemplateUnTopmost}" Template="{DynamicResource ButtonTemplateUnTopmost}"
Click="Top_Click"/> Click="Top_Click"/>
<Button Template="{DynamicResource ButtonTemplate}" <Button Width="auto"
Width="30" Template="{DynamicResource ButtonTemplateTheme}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Margin="0,0,100,0" Margin="0,0,100,0"

@ -61,82 +61,12 @@ namespace STranslate.Properties {
} }
/// <summary> /// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// 查找 System.Byte[] 类型的本地化资源。
/// </summary> /// </summary>
internal static System.Drawing.Bitmap copy_default { internal static byte[] iconfont {
get { get {
object obj = ResourceManager.GetObject("copy_default", resourceCulture); object obj = ResourceManager.GetObject("iconfont", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_large_hump {
get {
object obj = ResourceManager.GetObject("copy_large_hump", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_small_hump {
get {
object obj = ResourceManager.GetObject("copy_small_hump", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_snake {
get {
object obj = ResourceManager.GetObject("copy_snake", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon crossword {
get {
object obj = ResourceManager.GetObject("crossword", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon input {
get {
object obj = ResourceManager.GetObject("input", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon screenshot {
get {
object obj = ResourceManager.GetObject("screenshot", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap topmost {
get {
object obj = ResourceManager.GetObject("topmost", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
} }
} }
@ -149,25 +79,5 @@ namespace STranslate.Properties {
return ((System.Drawing.Icon)(obj)); return ((System.Drawing.Icon)(obj));
} }
} }
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap untopmost {
get {
object obj = ResourceManager.GetObject("untopmost", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon window {
get {
object obj = ResourceManager.GetObject("window", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
} }
} }

@ -118,37 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="copy_default" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="iconfont" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_default.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\images\iconfont.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="copy_large_hump" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_large_hump.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="copy_small_hump" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_small_hump.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="copy_snake" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_snake.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="crossword" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\crossword.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="input" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\input.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="screenshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\screenshot.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="topmost" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\topmost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="translate" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="translate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\translate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\images\translate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="untopmost" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\untopmost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\window.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

@ -165,39 +165,9 @@
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None> </None>
<Resource Include="Images\Tray\crossword.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Tray\input.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Tray\screenshot.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Tray\window.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\untopmost.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\topmost.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\translate.ico"> <Resource Include="Images\translate.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource> </Resource>
<Resource Include="Images\Button_Default\copy_default.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_small_hump.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_large_hump.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_snake.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />

@ -1,5 +1,37 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>
</Style>
<!--主题切换-->
<ControlTemplate x:Key="ButtonTemplateTheme"
TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="5"
HorizontalAlignment="Left"
Margin="8,5,0,0"
Width="30"
Height="30">
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe994;"
Foreground="WhiteSmoke"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="#47484c"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="#35333c"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--置顶-->
<ControlTemplate x:Key="ButtonTemplateTopmost" <ControlTemplate x:Key="ButtonTemplateTopmost"
TargetType="Button"> TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
@ -8,8 +40,11 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="8,5,0,0" Margin="8,5,0,0"
MaxHeight="30"> MaxHeight="30">
<Image Height="20" <TextBlock Style="{StaticResource IconStyle}"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/topmost.png"/> FontSize="21"
VerticalAlignment="Center"
Text="&#xe637;"
Foreground="#3478f6"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -20,6 +55,8 @@
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--取消置顶-->
<ControlTemplate x:Key="ButtonTemplateUnTopmost" <ControlTemplate x:Key="ButtonTemplateUnTopmost"
TargetType="Button"> TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
@ -28,8 +65,11 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="8,5,0,0" Margin="8,5,0,0"
MaxHeight="30"> MaxHeight="30">
<Image Height="20" <TextBlock Style="{StaticResource IconStyle}"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/untopmost.png"/> FontSize="22"
VerticalAlignment="Center"
Text="&#xe9ba;"
Foreground="WhiteSmoke"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -40,12 +80,18 @@
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--普通复制-->
<ControlTemplate x:Key="ButtonTemplate" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_default.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe692;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -57,12 +103,17 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--蛇形复制-->
<ControlTemplate x:Key="ButtonTemplateSnakeCopy" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplateSnakeCopy" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_snake.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe602;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -74,12 +125,17 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--小驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateSmallHumpCopy" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplateSmallHumpCopy" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_small_hump.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe603;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -91,12 +147,17 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--大驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateLargeHumpCopy" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplateLargeHumpCopy" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_large_hump.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe601;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">

@ -1,6 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件--> <!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock"> <Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/> <Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>

@ -25,7 +25,7 @@
<!--光标颜色--> <!--光标颜色-->
<Setter Property="CaretBrush" Value="WhiteSmoke"/> <Setter Property="CaretBrush" Value="WhiteSmoke"/>
<!--选区颜色--> <!--选区颜色-->
<Setter Property="SelectionBrush" Value="#2d445c"/> <Setter Property="SelectionBrush" Value="#404856"/>
<Setter Property="Margin" Value="10,10,5,35"/> <Setter Property="Margin" Value="10,10,5,35"/>
<Setter Property="FontSize" Value="16"/> <Setter Property="FontSize" Value="16"/>
<Setter Property="MinHeight" Value="70"/> <Setter Property="MinHeight" Value="70"/>

@ -1,5 +1,9 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>
</Style>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/STranslate;component/Style/Default/DictionaryButtonDefault.xaml"/> <ResourceDictionary Source="pack://application:,,,/STranslate;component/Style/Default/DictionaryButtonDefault.xaml"/>

@ -1,5 +1,37 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>
</Style>
<!--主题切换-->
<ControlTemplate x:Key="ButtonTemplateTheme"
TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="5"
HorizontalAlignment="Left"
Margin="8,5,0,0"
Width="30"
Height="30">
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe994;"
Foreground="#787a7f"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="#eaeaea"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="#dddddd"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--置顶-->
<ControlTemplate x:Key="ButtonTemplateTopmost" <ControlTemplate x:Key="ButtonTemplateTopmost"
TargetType="Button"> TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
@ -7,9 +39,12 @@
Padding="5" Padding="5"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="8,5,0,0" Margin="8,5,0,0"
MaxHeight="30"> Height="30">
<Image Height="20" <TextBlock Style="{StaticResource IconStyle}"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/topmost.png"/> FontSize="21"
VerticalAlignment="Center"
Text="&#xe637;"
Foreground="#3478f6"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -20,6 +55,8 @@
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--取消置顶-->
<ControlTemplate x:Key="ButtonTemplateUnTopmost" <ControlTemplate x:Key="ButtonTemplateUnTopmost"
TargetType="Button"> TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
@ -28,8 +65,11 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="8,5,0,0" Margin="8,5,0,0"
MaxHeight="30"> MaxHeight="30">
<Image Height="20" <TextBlock Style="{StaticResource IconStyle}"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/untopmost.png"/> FontSize="22"
VerticalAlignment="Center"
Text="&#xe9ba;"
Foreground="#787a7f"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -40,12 +80,18 @@
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--普通复制-->
<ControlTemplate x:Key="ButtonTemplate" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_default.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe692;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -57,12 +103,17 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--蛇形复制-->
<ControlTemplate x:Key="ButtonTemplateSnakeCopy" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplateSnakeCopy" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_snake.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe602;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -74,12 +125,17 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--小驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateSmallHumpCopy" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplateSmallHumpCopy" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_small_hump.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe603;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">
@ -91,12 +147,17 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<!--大驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateLargeHumpCopy" TargetType="Button"> <ControlTemplate x:Key="ButtonTemplateLargeHumpCopy" TargetType="Button">
<Border x:Name="border" <Border x:Name="border"
CornerRadius="5" CornerRadius="5"
Padding="4" Padding="4"
MaxHeight="25"> MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_large_hump.png"/> <TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe601;"
Foreground="#515151"/>
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true"> <Trigger Property="IsMouseOver" Value="true">

@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Media;
namespace STranslate.ViewModel namespace STranslate.ViewModel
{ {
@ -48,7 +49,9 @@ namespace STranslate.ViewModel
{ {
Clipboard.SetText(LargeHumpRet); Clipboard.SetText(LargeHumpRet);
}); });
ThemeConvertCmd = new RelayCommand((_) => true, (_) =>
//主题切换
ThemeConvertCmd = new RelayCommand((_) => true, (o) =>
{ {
Application.Current.Resources.MergedDictionaries[0].Source = Application.Current.Resources.MergedDictionaries[0].Source =
Application.Current.Resources.MergedDictionaries[0].Source Application.Current.Resources.MergedDictionaries[0].Source

Loading…
Cancel
Save