This commit is contained in:
Sunny 2022-06-15 23:25:35 +08:00
parent 0544f4cd61
commit a10e87f85a
4 changed files with 13 additions and 8 deletions

View File

@ -57,6 +57,11 @@ namespace Sunny.UI
}
}
public static bool IsLightColor(this Color color)
{
return (0.299 * color.R + 0.587 * color.G + 0.114 * color.B) / 255 > 0.5;
}
/// <summary>
/// 根据背景色判断前景色
/// </summary>

View File

@ -222,7 +222,7 @@ namespace Sunny.UI
return null;
PropertyDescriptor descriptor = dataManager.GetItemProperties().Find(ValueMemberBindingMemberInfo.BindingField, true);
if (descriptor is not null)
if (descriptor != null)
{
return descriptor.GetValue(item);
}

View File

@ -29,7 +29,7 @@ namespace Sunny.UI
/// <summary>
/// 版本
/// </summary>
public const string Version = "SunnyUI.Net V3.1.9";
public const string Version = "SunnyUI.Net V3.2.0";
public const int EditorMinHeight = 20;
public const int EditorMaxHeight = 60;

View File

@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0-windows;net472;net40</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<TargetFrameworks>net6.0-windows;net472;net40</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<ProjectGuid>{AB1CB247-E20B-4CBE-B269-570ADDD96C53}</ProjectGuid>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>Sunny.UI</RootNamespace>
<Description>SunnyUI.Net 是基于.Net Framework 4.0+、.Net 5、.Net 6 框架的 C# WinForm 开源控件库、工具类库、扩展类库、多页面开发框架。</Description>
<Description>SunnyUI.Net 是基于.Net Framework 4.0~4.8、.Net 6 框架的 C# WinForm 开源控件库、工具类库、扩展类库、多页面开发框架。</Description>
<Copyright>CopyRight © SunnyUI.Net 2012-2022</Copyright>
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
<Version>3.1.9</Version>
<Version>3.2.0</Version>
<Authors>ShenYonghua</Authors>
<Company>SunnyUI.Net</Company>
<PackageId>SunnyUI</PackageId>
@ -20,7 +20,7 @@
<SignAssembly>False</SignAssembly>
<AssemblyOriginatorKeyFile>D:\MyDocuments\SunnyUI.pfx</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -67,7 +67,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SunnyUI.Common" Version="3.1.*" />
<PackageReference Include="SunnyUI.Common" Version="3.2.*" />
</ItemGroup>
<ItemGroup>