feat: 增强便携版支持与配置管理
- 更新 .gitignore 文件,添加便携版分发目录和 Fody 生成的配置文件。 - 修改 README.md,详细说明便携版的构建与分发流程,强调单文件分发的优势。 - 在 Config.cs 中实现便携配置管理,优先使用 exe 同目录的 config.json,提升用户体验。 - 更新 ExcelService.cs,优化默认模板的导出逻辑,支持现场替换模板文件。 - 在 MainForm.cs 中加载应用图标,提升界面一致性。 - 调整 Program.cs,确保在单文件分发时正确加载 native DLL。
This commit is contained in:
@@ -23,6 +23,7 @@ namespace TfsExcelImporter
|
||||
using (var g = Graphics.FromHwnd(IntPtr.Zero))
|
||||
Theme.Scale = g.DpiX / 96f;
|
||||
_cfg = AppConfig.Load();
|
||||
Icon = AppIcon.Load();
|
||||
BuildUi();
|
||||
LoadConfigToUi();
|
||||
WireEvents();
|
||||
@@ -306,7 +307,7 @@ namespace TfsExcelImporter
|
||||
标题 = r.Title,
|
||||
状态 = r.State,
|
||||
指派 = r.AssignedTo,
|
||||
财务项目 = r.FinancialProject,
|
||||
项目 = r.FinancialProject,
|
||||
完成量 = r.Completed,
|
||||
日期 = r.LogDate,
|
||||
父PBI = r.PbiId,
|
||||
@@ -588,10 +589,9 @@ namespace TfsExcelImporter
|
||||
}
|
||||
catch (Exception ex) { Log("写报告失败: " + FirstLine(ex.Message)); }
|
||||
_pbar.Value = _pbar.Maximum;
|
||||
// 成功/跳过/失败的分布已在右侧三个胶囊里,这里只补胶囊没有的「总数」,明细仍写日志
|
||||
_lblStatus.Text = $"完成 {ok + skip + fail}/{_rows.Count}";
|
||||
var summary = $"汇总: 成功 {ok} / 跳过 {skip} / 失败 {fail}";
|
||||
_lblStatus.Text = summary;
|
||||
Log(summary);
|
||||
Log($"汇总: 成功 {ok} / 跳过 {skip} / 失败 {fail}");
|
||||
SetChips(ok, skip, fail, false);
|
||||
RefreshSummaries();
|
||||
if (fail == 0 && ok > 0) OpenDetail(_cardLog);
|
||||
|
||||
Reference in New Issue
Block a user