Skip to content

Commit

Permalink
update frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
jevonsflash committed Oct 19, 2023
1 parent 87ad250 commit 9f9c39a
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 37 deletions.
Binary file removed EPT/ept.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion ExcelPatternTool.Core/Excel/Core/BaseWriter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;

using System.Linq;
using System.Reflection;
using System.Text;
Expand Down
10 changes: 7 additions & 3 deletions ExcelPatternTool.Core/Excel/Core/XlsStyleBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.Drawing;

using NPOI.HSSF.UserModel;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
using ExcelPatternTool.Core.Excel.Core.Interfaces;
using ExcelPatternTool.Core.Excel.Services;
using ExcelPatternTool.Core.Helper;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;

namespace ExcelPatternTool.Core.Excel.Core
{
Expand Down Expand Up @@ -124,13 +126,15 @@ public IColor GetColor(string htmlColor)
{
return new HSSFColor.Automatic();
}
Color color = ColorTranslator.FromHtml(htmlColor);

var color = Rgba32.ParseHex(htmlColor);


IColor result;
HSSFPalette customPalette = (Workbook as HSSFWorkbook).GetCustomPalette();
if (_palleteColorSize >= 63)
{
HSSFColor hSSFColor = customPalette.FindColor(color.R, color.G, color.B);
HSSFColor hSSFColor = customPalette.FindColor (color.R, color.G, color.B);
if (hSSFColor == null)
{
hSSFColor = customPalette.FindSimilarColor(color.R, color.G, color.B);
Expand Down
4 changes: 2 additions & 2 deletions ExcelPatternTool.Core/Excel/Core/XlsxStyleBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using SixLabors.ImageSharp;
using NPOI.SS.UserModel;
using NPOI.XSSF.Model;
using NPOI.XSSF.UserModel;
Expand Down Expand Up @@ -106,7 +106,7 @@ public IColor GetColor(string htmlColor)
{
return new XSSFColor(IndexedColors.Automatic);
}
var result = new XSSFColor(ColorTranslator.FromHtml(htmlColor));
var result = new XSSFColor(Color.ParseHex(htmlColor));
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion ExcelPatternTool.Core/Excel/Core/XlsxWriter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;

using System.IO;
using System.Linq;
using System.Reflection;
Expand Down
24 changes: 12 additions & 12 deletions ExcelPatternTool.Core/ExcelPatternTool.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Version>0.1.1</Version>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Authors>LinXiao</Authors>
<Company>MatoApp</Company>
Expand All @@ -12,23 +12,23 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.2.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.7">
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.7">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NPOI" Version="2.5.6" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NPOI" Version="2.6.2" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions ExcelPatternTool.Tests/ExcelPatternTool.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
</ItemGroup>

Expand Down
Binary file not shown.
30 changes: 16 additions & 14 deletions ExcelPatternTool/ExcelPatternTool.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>0.1.1</Version>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
<PropertyGroup>
<Version>0.1.1</Version>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>full</TrimMode>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ExcelPatternTool.Core\ExcelPatternTool.Core.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ExcelPatternTool.Core\ExcelPatternTool.Core.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Date | Version | Content
:----------: | :-----------: | :-----------
V0.1.0 | 2022-7-29 | 初始版本
V0.1.1 | 2022-8-3 | 1. 新增数据库导入 2. 减小程序包体积
V0.1.2 | 2023-10-19 | 1. 更新引用库,使用SixLabors.ImageSharp替换System.Drawing以兼容Linux 2. 升级项目框架到 .Net 7.0

## 快速开始

Expand Down

0 comments on commit 9f9c39a

Please sign in to comment.