功能更新
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<LangVersion>13.0</LangVersion>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NeoUI\Melskin\Melskin.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
20
KeyGen/App.xaml
Normal file
20
KeyGen/App.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<Application
|
||||
StartupUri="MainWindow.xaml"
|
||||
x:Class="KeyGen.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:local="clr-namespace:KeyGen"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!--<ms:ThemesDictionary Mode="Dark" Palette="Blue"/>
|
||||
<ms:ControlsDictionary/>-->
|
||||
<ResourceDictionary Source="pack://application:,,,/Melskin;component/Themes/Light.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/Melskin;component/Themes/Accents/LightBlue.xaml" />
|
||||
<!--<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/ColorPalette/DarkBlue.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Dark.xaml" />-->
|
||||
<ResourceDictionary Source="pack://application:,,,/Melskin;component/Themes/Generic.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
12
KeyGen/App.xaml.cs
Normal file
12
KeyGen/App.xaml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Windows;
|
||||
|
||||
namespace KeyGen;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
10
KeyGen/AssemblyInfo.cs
Normal file
10
KeyGen/AssemblyInfo.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
20
KeyGen/KeyGen.csproj
Normal file
20
KeyGen/KeyGen.csproj
Normal file
@@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Melskin\Melskin.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Management" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -46,7 +46,7 @@ public class ColorPanel : Control
|
||||
/// </summary>
|
||||
public ICommand SelectPresetColorCommand { get; }
|
||||
|
||||
private void ExecuteSelectPresetColor(object parameter)
|
||||
private void ExecuteSelectPresetColor(object? parameter)
|
||||
{
|
||||
if (parameter is Color color)
|
||||
{
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:assists="clr-namespace:Melskin.Assists"
|
||||
xmlns:controls="clr-namespace:Melskin.Controls"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:controls="clr-namespace:Melskin.Controls">
|
||||
|
||||
<Style TargetType="{x:Type controls:Hyperlink}">
|
||||
<Setter Property="Background" Value="{x:Null}" />
|
||||
@@ -12,8 +12,6 @@
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextLinkBrush}" />
|
||||
<Setter Property="assists:ColorAssist.MouseOverForeground" Value="{DynamicResource PrimaryHoverBrush}" />
|
||||
<Setter Property="assists:ColorAssist.FocusedForeground" Value="{DynamicResource PrimaryFocusedBrush}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:Hyperlink}">
|
||||
@@ -23,29 +21,27 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:IconElement
|
||||
Foreground="{DynamicResource TextLinkBrush}"
|
||||
x:Name="Icon"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Symbol="Link"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
x:Name="Icon" />
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Symbol="Link" />
|
||||
<ContentPresenter
|
||||
x:Name="Content"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
x:Name="Content" />
|
||||
TextBlock.Foreground="{TemplateBinding Foreground}" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Foreground" TargetName="Icon" Value="{Binding Path=(assists:ColorAssist.MouseOverForeground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Setter Property="TextElement.Foreground" TargetName="Content" Value="{Binding Path=(assists:ColorAssist.MouseOverForeground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryHoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Foreground" TargetName="Icon" Value="{Binding Path=(assists:ColorAssist.FocusedForeground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Setter Property="TextElement.Foreground" TargetName="Content" Value="{Binding Path=(assists:ColorAssist.FocusedForeground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryPressedBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsVisited" Value="True">
|
||||
<Setter Property="Foreground" TargetName="Icon" Value="{Binding Path=(assists:ColorAssist.FocusedForeground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Setter Property="TextElement.Foreground" TargetName="Content" Value="{Binding Path=(assists:ColorAssist.FocusedForeground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Setter Property="Foreground" Value="RoyalBlue" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -9,7 +9,6 @@ namespace Melskin.Controls;
|
||||
public class Hyperlink : ButtonBase
|
||||
{
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// 已经浏览过的依赖属性。
|
||||
/// </summary>
|
||||
@@ -22,13 +21,11 @@ public class Hyperlink : ButtonBase
|
||||
/// <summary>
|
||||
/// 定义私有的 Key:这是“写入权限”的钥匙,只有在这个类内部才能拿到
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsVisitedProperty =
|
||||
IsVisitedPropertyKey.DependencyProperty;
|
||||
public static readonly DependencyProperty IsVisitedProperty;
|
||||
/// <summary>
|
||||
/// 表示已经浏览过的依赖属性。
|
||||
/// </summary>
|
||||
public static readonly DependencyPropertyKey IsVisitedPropertyKey =
|
||||
DependencyProperty.RegisterReadOnly(nameof(IsVisited), typeof(bool), typeof(Hyperlink), new PropertyMetadata(false));
|
||||
public static readonly DependencyPropertyKey IsVisitedPropertyKey;
|
||||
/// <summary>
|
||||
/// 外部调用此方法来将超链接标记为已访问。
|
||||
/// </summary>
|
||||
@@ -53,7 +50,11 @@ public class Hyperlink : ButtonBase
|
||||
|
||||
#region Constructors
|
||||
static Hyperlink()
|
||||
{ DefaultStyleKeyProperty.OverrideMetadata(typeof(Hyperlink), new FrameworkPropertyMetadata(typeof(Hyperlink))); }
|
||||
{
|
||||
IsVisitedPropertyKey = DependencyProperty.RegisterReadOnly(nameof(IsVisited), typeof(bool), typeof(Hyperlink), new PropertyMetadata(false));
|
||||
IsVisitedProperty = IsVisitedPropertyKey.DependencyProperty;
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(Hyperlink), new FrameworkPropertyMetadata(typeof(Hyperlink)));
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 点击后的事件
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user