diff --git a/DB/DB.csproj b/DB/DB.csproj index 8c649f5..21ca4ec 100644 --- a/DB/DB.csproj +++ b/DB/DB.csproj @@ -32,13 +32,13 @@ - 5.33.0 + 5.38.0 - 5.33.0 + 5.38.0 - 5.33.0 + 5.38.0 8.0.0 @@ -47,13 +47,13 @@ 1.1.1 - 8.0.0 + 8.0.1 - 8.0.0 + 8.0.1 - 8.0.3 + 8.0.4 @@ -64,7 +64,7 @@ - 8.0.0 + 8.0.1 4.5.5 @@ -80,7 +80,7 @@ 8.0.0 - 8.0.0 + 8.0.4 8.0.0 diff --git a/RfidWeb/Form1.cs b/RfidWeb/Form1.cs index c2a491a..9465715 100644 --- a/RfidWeb/Form1.cs +++ b/RfidWeb/Form1.cs @@ -1,4 +1,6 @@ -using System; +using HslCommunication.LogNet; + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -14,11 +16,26 @@ namespace RfidWeb { public partial class Form1 : Form { + private ILogNet logNet = ILogNetFactory.GetLogNet; + public Form1() { InitializeComponent(); + logNet.ConsoleOutput = true; + + logNet.WriteInfo("nihao"); + + + + + // 如果所有的日志在记录之前需要在控制台显示出来 + logNet.BeforeSaveToFile += (object sender, HslEventArgs e) => + { + Console.WriteLine(e.HslMessage.ToString()); + }; + } } } diff --git a/RfidWeb/RfidWeb.csproj b/RfidWeb/RfidWeb.csproj index 6dac8c6..9e037f4 100644 --- a/RfidWeb/RfidWeb.csproj +++ b/RfidWeb/RfidWeb.csproj @@ -33,15 +33,15 @@ 4 - - ..\packages\Chloe.5.33.0\lib\net46\Chloe.dll - - - ..\packages\Chloe.Extension.5.33.0\lib\net46\Chloe.Extension.dll - - - ..\packages\Chloe.PostgreSQL.5.33.0\lib\net46\Chloe.PostgreSQL.dll - + + 5.38.0 + + + 5.38.0 + + + 5.38.0 + False ..\Src\HslCommunication.dll @@ -49,66 +49,63 @@ ..\Src\HslControls.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll - + + 8.0.0 + + + 1.1.1 + + + 8.0.1 + + + 8.0.1 + - - ..\packages\NewLife.Core.10.10.2024.902\lib\net461\NewLife.Core.dll - - - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Npgsql.8.0.3\lib\netstandard2.0\Npgsql.dll - + + 13.0.3 + + + 8.0.4 + - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll - + + 4.5.1 + + + 8.0.0 + - - ..\packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll - + + 8.0.1 + - - ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - + + 4.5.5 + - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll - - - ..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll - - - ..\packages\System.Threading.Channels.8.0.0\lib\net462\System.Threading.Channels.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - + + 4.5.0 + + + 6.0.0 + + + 8.0.0 + + + 8.0.4 + + + 8.0.0 + + + 4.5.4 + + + 4.5.0 + @@ -142,7 +139,6 @@ Resources.resx True - SettingsSingleFileGenerator Settings.Designer.cs diff --git a/RfidWeb/packages.config b/RfidWeb/packages.config deleted file mode 100644 index 456ed8b..0000000 --- a/RfidWeb/packages.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tool/ILogNetFactory.cs b/Tool/ILogNetFactory.cs new file mode 100644 index 0000000..e9cd0e9 --- /dev/null +++ b/Tool/ILogNetFactory.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using HslCommunication.LogNet; + +namespace Tool +{ + public static class ILogNetFactory + { + public static ILogNet GetLogNet { get; }=new LogNetFileSize("D:\\Logs", 2 * 1024 * 1024*20); + } +} diff --git a/Tool/Tool.csproj b/Tool/Tool.csproj index 7b8e9e0..db2e9c4 100644 --- a/Tool/Tool.csproj +++ b/Tool/Tool.csproj @@ -37,10 +37,10 @@ - 10.10.2024.902 + 11.0.2024.1001 - 13.0.1 + 13.0.3 @@ -60,6 +60,7 @@ +