From 9211ec11c112e18cd99e77f889a01110a70031ce Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 24 十一月 2025 17:47:15 +0800
Subject: [PATCH] 优化项目结构

---
 HMI.Core/Util/SqliteHelper.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/HMI.Core/Util/SqliteHelper.cs b/HMI.Core/Util/SqliteHelper.cs
index 5541091..02c0dbb 100644
--- a/HMI.Core/Util/SqliteHelper.cs
+++ b/HMI.Core/Util/SqliteHelper.cs
@@ -5,7 +5,7 @@
 
 namespace HMI.Core.Util
 {
-    public class SqliteHelper
+    public class SqliteHelper:IDisposable
     {
         public string DataBaseFile { get; private set; } = string.Empty;
 
@@ -18,7 +18,7 @@
         public SqliteHelper(string DBFile)
         {
             DataBaseFile = DBFile;
-            ConnectString = "DataSource=" + DataBaseFile + ";Version=3;Pooling=False;Max Pool Size=100";
+            ConnectString = "DataSource=" + DataBaseFile + ";Version=3;Pooling=False;Max Pool Size=100;";
             conn = new SQLiteConnection(ConnectString);
             cmd = new SQLiteCommand(conn);
         }
@@ -229,5 +229,10 @@
                 conn.Close();
             }
         }
+
+        public void Dispose()
+        {
+            this.Close();
+        }
     }
 }

--
Gitblit v1.9.1