基线:全量源码首提(D1 版本控制落地,含第一轮优化 B1-B4/A1/A4/缩放修复)

This commit is contained in:
dqb-dev
2026-10-01 22:15:22 +08:00
commit 1e65792b09
499 changed files with 204579 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
/*
* pdfbt:PDF 扒图报价工具(由 cadbt 改造,CAD 查看器 → PDF 查看 + 框选 OCR)
*/
using System;
using System.Windows.Forms;
namespace pdfbt
{
internal sealed class Program
{
[STAThread]
private static int Main(string[] args)
{
// 自检模式:pdfbt.exe --selftest <pdf路径> [输出目录]
if (args != null && args.Length >= 2 && args[0] == "--selftest")
{
return SelfTest.Run(args);
}
// 单实例保护:重复启动时激活已有实例并退出
bool createdNew;
using (var mutex = new System.Threading.Mutex(true, "pdfbt_SingleInstance", out createdNew))
{
if (!createdNew)
{
MessageBox.Show("pdfbt 已在运行中。", "pdfbt",
MessageBoxButtons.OK, MessageBoxIcon.Information);
return 0;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
GC.KeepAlive(mutex);
}
return 0;
}
}
}