报告ReportEngineBase增加必要的设置和配置项目。

This commit is contained in:
QI Mingxuan
2026-05-13 17:35:06 +08:00
parent 6d4a662823
commit b1c5ab546b
5 changed files with 1399 additions and 1 deletions
File diff suppressed because it is too large Load Diff
+14
View File
@@ -122,6 +122,20 @@ namespace XP.ReportEngine.Configs
config.CompanyLogo = companyLogo;
}
// 读取软件名称 | Read software name
var softwareName = ConfigurationManager.AppSettings[$"{prefix}:SoftwareName"];
if (!string.IsNullOrEmpty(softwareName))
{
config.SoftwareName = softwareName;
}
// 读取软件 Logo 路径 | Read software logo path
var softwareLogo = ConfigurationManager.AppSettings[$"{prefix}:SoftwareLogo"];
if (!string.IsNullOrEmpty(softwareLogo))
{
config.SoftwareLogo = softwareLogo;
}
// 验证配置 | Validate configuration
ValidateConfig(config);
+10
View File
@@ -89,6 +89,16 @@ namespace XP.ReportEngine.Configs
/// </summary>
public string CompanyLogo { get; set; } = string.Empty;
/// <summary>
/// 报告中显示的软件名称 | Software name displayed in report
/// </summary>
public string SoftwareName { get; set; } = "XplorePlane";
/// <summary>
/// 软件 Logo 图片路径(可选,为空则不显示)| Software logo image path (optional, empty means no logo)
/// </summary>
public string SoftwareLogo { get; set; } = string.Empty;
/// <summary>
/// 获取解析后的模板绝对路径 | Get resolved absolute template path
/// 如果 TemplatePath 是相对路径,则基于应用程序目录解析
@@ -73,5 +73,16 @@
<!-- 公司 Logo 图片路径(可选,为空则不显示)| Company logo path (optional, empty = no logo) -->
<!-- 支持相对路径(基于应用程序目录)或绝对路径 | Supports relative (based on app dir) or absolute path -->
<add key="Report:CompanyLogo" value="Resources\company_logo.png" />
<!-- ============================================================ -->
<!-- 软件信息配置 | Software Information Configuration -->
<!-- ============================================================ -->
<!-- 报告中显示的软件名称 | Software name displayed in report -->
<add key="Report:SoftwareName" value="XplorePlane" />
<!-- 软件 Logo 图片路径(可选,为空则不显示)| Software logo path (optional, empty = no logo) -->
<!-- 支持相对路径(基于应用程序目录)或绝对路径 | Supports relative (based on app dir) or absolute path -->
<add key="Report:SoftwareLogo" value="Resources\software_logo.png" />
</appSettings>
</configuration>
+3
View File
@@ -187,6 +187,9 @@
<add key="Report:CompanyName" value="海克斯康制造智能技术(青岛)有限公司" />
<!-- 公司 Logo 图片路径(可选,为空则不显示)| Company logo path (optional, empty = no logo) -->
<add key="Report:CompanyLogo" value="Templates\Logo.png" />
<!-- 软件信息配置 | Software Information Configuration -->
<add key="Report:SoftwareName" value="XplorePlane" />
<add key="Report:SoftwareLogo" value="Templates\Logo2.png" />
</appSettings>
<startup>