添加项目文件。

This commit is contained in:
xyy
2026-01-16 20:53:33 +08:00
parent a75be0a011
commit a254118c27
92 changed files with 36090 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using System;
using System.IO;
using System.Windows.Forms;
using _定制款.;
namespace
{
internal static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
CopySqliteDll();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frm_Login());
}
public static void CopySqliteDll()
{
// 获取当前程序运行的位数32位/64位
bool is64Bit = Environment.Is64BitProcess;
string dllFolder = is64Bit ? "x64" : "x86";
// 源DLL路径项目中的x86/x64文件夹
string sourcePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, dllFolder, "sqlite3.dll");
// 目标路径(与程序同目录)
string targetPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "sqlite3.dll");
// 如果目标路径没有DLL或源DLL更新则复制
if (!File.Exists(targetPath) || File.GetLastWriteTime(sourcePath) > File.GetLastWriteTime(targetPath))
{
File.Copy(sourcePath, targetPath, overwrite: true);
}
}
}
}