From c0f9915265878e56e91ee97f7f8d925db1e12626 Mon Sep 17 00:00:00 2001 From: cloudflight <cloudflight@126.com> Date: 星期六, 02 十二月 2023 18:50:45 +0800 Subject: [PATCH] 2023年12月2日_3 --- Hydro.CommonBase/Helper/DbHelper.cs | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Hydro.CommonBase/Helper/DbHelper.cs b/Hydro.CommonBase/Helper/DbHelper.cs index bc5a7a0..22c0094 100644 --- a/Hydro.CommonBase/Helper/DbHelper.cs +++ b/Hydro.CommonBase/Helper/DbHelper.cs @@ -1,4 +1,5 @@ -锘縰sing System; +锘縰sing CommonBase.Properties; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -22,8 +23,8 @@ path = AppDomain.CurrentDomain.BaseDirectory + "config.wdb"; //妫�鏌ユ暟鎹簱鏄惁瀛樺湪锛屼笉鍦ㄥ垯鏂板缓 - //if (!File.Exists(path)) - // File.WriteAllBytes(path, Resources.Db); + if (!File.Exists(path)) + File.WriteAllBytes(path, Resources.Db); //鍒濆鍖栨暟鎹簱杩炴帴涓� Connection = new SQLiteConnection($"Data Source={path};Pooling=true;FailIfMissing=false"); @@ -119,8 +120,8 @@ //妫�鏌ユ暟鎹簱鏄惁瀛樺湪锛屼笉鍦ㄥ垯鏂板缓 - //if (!File.Exists(path)) - // File.WriteAllBytes(path, Resources.Db); + if (!File.Exists(path)) + File.WriteAllBytes(path, Resources.Db); // 绉婚櫎鍙灞炴�� FileAttributes attributes = File.GetAttributes(path); -- Gitblit v1.9.3