diff --git a/EPT/ept.exe b/EPT/ept.exe
deleted file mode 100644
index 779eb90..0000000
Binary files a/EPT/ept.exe and /dev/null differ
diff --git a/ExcelPatternTool.Core/Excel/Core/BaseWriter.cs b/ExcelPatternTool.Core/Excel/Core/BaseWriter.cs
index 7588d9d..ed3d5e5 100644
--- a/ExcelPatternTool.Core/Excel/Core/BaseWriter.cs
+++ b/ExcelPatternTool.Core/Excel/Core/BaseWriter.cs
@@ -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;
diff --git a/ExcelPatternTool.Core/Excel/Core/XlsStyleBuilder.cs b/ExcelPatternTool.Core/Excel/Core/XlsStyleBuilder.cs
index 4778377..187c415 100644
--- a/ExcelPatternTool.Core/Excel/Core/XlsStyleBuilder.cs
+++ b/ExcelPatternTool.Core/Excel/Core/XlsStyleBuilder.cs
@@ -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
{
@@ -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);
diff --git a/ExcelPatternTool.Core/Excel/Core/XlsxStyleBuilder.cs b/ExcelPatternTool.Core/Excel/Core/XlsxStyleBuilder.cs
index 92a5026..072fa60 100644
--- a/ExcelPatternTool.Core/Excel/Core/XlsxStyleBuilder.cs
+++ b/ExcelPatternTool.Core/Excel/Core/XlsxStyleBuilder.cs
@@ -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;
@@ -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;
}
diff --git a/ExcelPatternTool.Core/Excel/Core/XlsxWriter.cs b/ExcelPatternTool.Core/Excel/Core/XlsxWriter.cs
index e039ff9..8211fe4 100644
--- a/ExcelPatternTool.Core/Excel/Core/XlsxWriter.cs
+++ b/ExcelPatternTool.Core/Excel/Core/XlsxWriter.cs
@@ -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;
diff --git a/ExcelPatternTool.Core/ExcelPatternTool.Core.csproj b/ExcelPatternTool.Core/ExcelPatternTool.Core.csproj
index eb8377b..4f83008 100644
--- a/ExcelPatternTool.Core/ExcelPatternTool.Core.csproj
+++ b/ExcelPatternTool.Core/ExcelPatternTool.Core.csproj
@@ -2,7 +2,7 @@
0.1.1
- net6.0
+ net7.0
True
LinXiao
MatoApp
@@ -12,23 +12,23 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
+
+
+
+
+
diff --git a/ExcelPatternTool.Tests/ExcelPatternTool.Tests.csproj b/ExcelPatternTool.Tests/ExcelPatternTool.Tests.csproj
index 12df87f..5e67d10 100644
--- a/ExcelPatternTool.Tests/ExcelPatternTool.Tests.csproj
+++ b/ExcelPatternTool.Tests/ExcelPatternTool.Tests.csproj
@@ -1,15 +1,15 @@
- net6.0
+ net7.0
false
-
-
-
+
+
+
diff --git "a/ExcelPatternTool.Tests/case/\345\233\275\345\256\266\350\215\257\345\223\201\344\276\233\345\272\224\344\277\235\351\232\234\347\273\274\345\220\210\347\256\241\347\220\206\344\277\241\346\201\257\345\271\263\345\217\260\350\215\257\345\223\201\347\233\256\345\275\225YPID(V190715).xlsx" "b/ExcelPatternTool.Tests/case/\345\233\275\345\256\266\350\215\257\345\223\201\344\276\233\345\272\224\344\277\235\351\232\234\347\273\274\345\220\210\347\256\241\347\220\206\344\277\241\346\201\257\345\271\263\345\217\260\350\215\257\345\223\201\347\233\256\345\275\225YPID(V190715).xlsx"
deleted file mode 100644
index b20f216..0000000
Binary files "a/ExcelPatternTool.Tests/case/\345\233\275\345\256\266\350\215\257\345\223\201\344\276\233\345\272\224\344\277\235\351\232\234\347\273\274\345\220\210\347\256\241\347\220\206\344\277\241\346\201\257\345\271\263\345\217\260\350\215\257\345\223\201\347\233\256\345\275\225YPID(V190715).xlsx" and /dev/null differ
diff --git a/ExcelPatternTool/ExcelPatternTool.csproj b/ExcelPatternTool/ExcelPatternTool.csproj
index f45df88..84e38e4 100644
--- a/ExcelPatternTool/ExcelPatternTool.csproj
+++ b/ExcelPatternTool/ExcelPatternTool.csproj
@@ -1,19 +1,21 @@
-
- 0.1.1
- enable
- enable
- Exe
- net6.0
- true
- true
- win-x64
- true
-
+
+ 0.1.1
+ enable
+ enable
+ Exe
+ net7.0
+ true
+ true
+ win-x64
+ true
+ true
+ full
+
-
-
-
+
+
+
diff --git a/README.md b/README.md
index 032da80..564cec6 100644
--- a/README.md
+++ b/README.md
@@ -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
## 快速开始