SVN-Revision: r888
This commit is contained in:
wyf
2025-07-23 09:05:07 +00:00
parent 1e14ad49fb
commit 1efec78228
+335 -328
View File
@@ -1,328 +1,335 @@
/****************************** /******************************
* 说明:程序通用方法管理类 * 说明:程序通用方法管理类
* 创建人:龚宇超 * 创建人:龚宇超
* 创建日期:2017-08-16 * 创建日期:2017-08-16
* 修改人: * 修改人:
* 修改日期: * 修改日期:
* 修改备注: * 修改备注:
* 版本:1.0.0.0 * 版本:1.0.0.0
******************************/ ******************************/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.IO; using System.IO;
namespace Lskj.Util namespace Lskj.Util
{ {
/// <summary> /// <summary>
/// 程序通用方法管理类 /// 程序通用方法管理类
/// </summary> /// </summary>
public sealed class PubUtil public sealed class PubUtil
{ {
/// <summary> /// <summary>
/// productDynamic图标 /// productDynamic图标
/// </summary> /// </summary>
/// <value>The system update log path.</value> /// <value>The system update log path.</value>
public static string ProductDynamic public static string ProductDynamic
{ {
get { return AbsolutelyPath + "\\Images\\" + "ProductDynamic\\"; } get { return AbsolutelyPath + "\\Images\\" + "ProductDynamic\\"; }
} }
/// <summary> /// <summary>
/// <para>说明:获取应用程序启动目录</para> /// <para>说明:获取应用程序启动目录</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-21 </para> /// <para>创建日期:2017-08-21 </para>
/// <para>修改人:</para> /// <para>修改人:</para>
/// <para>修改日期:</para> /// <para>修改日期:</para>
/// <para>修改备注:</para> /// <para>修改备注:</para>
/// <para>版本:1.0</para> /// <para>版本:1.0</para>
/// </summary> /// </summary>
/// <returns>System.String.</returns> /// <returns>System.String.</returns>
public static string AbsolutelyPath public static string AbsolutelyPath
{ {
get { return Application.StartupPath + "\\"; } get { return Application.StartupPath + "\\"; }
} }
/// <summary> /// <summary>
/// 获取应用程序启动目录下的Lib目录 /// 获取应用程序启动目录下的Lib目录
/// </summary> /// </summary>
/// <value>The absolutely library path.</value> /// <value>The absolutely library path.</value>
public static string AbsolutelyLibPath public static string AbsolutelyLibPath
{ {
get { return AbsolutelyPath + "Lib/"; } get { return AbsolutelyPath + "Lib/"; }
} }
/// <summary> /// <summary>
/// 获取应用程序启动目录下的Browser目录 /// 获取应用程序启动目录下的Browser目录
/// </summary> /// </summary>
/// <value>The absolutely browser path.</value> /// <value>The absolutely browser path.</value>
public static string AbsolutelyBrowserPath public static string AbsolutelyBrowserPath
{ {
get { return AbsolutelyPath + "Browser/"; } get { return AbsolutelyPath + "Browser/"; }
} }
/// <summary> /// <summary>
/// 获取应用程序启动目录下的小平台目录 /// 获取应用程序启动目录下的小平台目录
/// </summary> /// </summary>
/// <value>The absolutely small client path.</value> /// <value>The absolutely small client path.</value>
public static string AbsolutelySmallClientPath public static string AbsolutelySmallClientPath
{ {
get { return AbsolutelyPath + "Client.exe"; } get { return AbsolutelyPath + "Client.exe"; }
} }
/// <summary> /// <summary>
/// <para>说明:获取附件下载存放临时目录</para> /// <para>说明:获取附件下载存放临时目录</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-01 </para> /// <para>创建日期:2017-11-01 </para>
/// <para>修改人:</para> /// <para>修改人:</para>
/// <para>修改日期:</para> /// <para>修改日期:</para>
/// <para>修改备注:</para> /// <para>修改备注:</para>
/// <para>版本:1.0</para> /// <para>版本:1.0</para>
/// </summary> /// </summary>
/// <returns>System.String.</returns> /// <returns>System.String.</returns>
public static string FileDownLoadTempPath public static string FileDownLoadTempPath
{ {
get get
{ {
string path = AbsolutelyPath + "TempFiles/"; string path = AbsolutelyPath + "TempFiles/";
if (!Directory.Exists(path)) if (!Directory.Exists(path))
{ {
Directory.CreateDirectory(path); Directory.CreateDirectory(path);
} }
return path; return path;
} }
} }
/// <summary> /// <summary>
/// 获取打印文件路径 /// 获取打印文件路径
/// </summary> /// </summary>
/// <value>The print file absolutely path.</value> /// <value>The print file absolutely path.</value>
public static string PrintFileAbsolutelyPath public static string PrintFileAbsolutelyPath
{ {
get { return AbsolutelyPath + "Lib/P_PubPrint.lsp"; } get { return AbsolutelyPath + "Lib/P_PubPrint.lsp"; }
} }
/// <summary> /// <summary>
/// 获取新版打印文件路径 /// 获取新版打印文件路径
/// </summary> /// </summary>
/// <value>The print file absolutely path.</value> /// <value>The print file absolutely path.</value>
public static string PrintFileAbsolutelyPath70 public static string PrintFileAbsolutelyPath70
{ {
get { return AbsolutelyPath + "Lib/p_pubprint70.lsp"; } get { return AbsolutelyPath + "Lib/p_pubprint70.lsp"; }
} }
/// <summary> /// <summary>
/// 附件exe文件路径 /// 附件exe文件路径
/// </summary> /// </summary>
/// <value>The name of the file executable.</value> /// <value>The name of the file executable.</value>
public static string AbsolutelyFileUploadPath public static string AbsolutelyFileUploadPath
{ {
get { return AbsolutelyPath + "Attach/LSTest.exe"; } get { return AbsolutelyPath + "Attach/LSTest.exe"; }
} }
/// <summary> /// <summary>
/// 主界面模块图片加载路径 /// 主界面模块图片加载路径
/// </summary> /// </summary>
/// <value>The main menu default image.</value> /// <value>The main menu default image.</value>
public static string MainMenuDefaultImage public static string MainMenuDefaultImage
{ {
get { return BitMapPath + "Main/Module/"; } get { return BitMapPath + "Main/Module/"; }
} }
public static string MesItemImage public static string MesItemImage
{ {
get { return BitMapPath + "MesItem/"; } get { return BitMapPath + "MesItem/"; }
} }
/// <summary> /// <summary>
/// 主界面、登录界面、子系统图片存放位置 /// 主界面、登录界面、子系统图片存放位置
/// </summary> /// </summary>
/// <value>The bit map path.</value> /// <value>The bit map path.</value>
public static string BitMapPath public static string BitMapPath
{ {
get { return AbsolutelyPath + "Images/"; } get { return AbsolutelyPath + "Images/"; }
} }
/// <summary> /// <summary>
/// 身份证阅读器图片存放位置 /// 身份证阅读器图片存放位置
/// </summary> /// </summary>
/// <value>The identifier card bit map path.</value> /// <value>The identifier card bit map path.</value>
public static string IDCardBitMapPath public static string IDCardBitMapPath
{ {
get get
{ {
string filePath = AbsolutelyPath + "Card\\"; string filePath = AbsolutelyPath + "Card\\";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// 串口通过ini本地设置 /// 串口通过ini本地设置
/// </summary> /// </summary>
/// <value>The main menu configuration path.</value> /// <value>The main menu configuration path.</value>
public static string TextPath public static string TextPath
{ {
get { return AbsolutelyPath + "text.ini"; } get { return AbsolutelyPath + "text.ini"; }
} }
/// <summary> /// <summary>
/// 模块配置文件存放路径 /// 模块配置文件存放路径
/// </summary> /// </summary>
/// <value>The main menu configuration path.</value> /// <value>The main menu configuration path.</value>
public static string MainMenuConfigPath public static string MainMenuConfigPath
{ {
get { return AbsolutelyPath + "MenuConfig.ini"; } get { return AbsolutelyPath + "MenuConfig.ini"; }
} }
/// <summary> /// <summary>
/// 控件缓存数据源 /// 控件缓存数据源
/// </summary> /// </summary>
/// <value>The identifier card bit map path.</value> /// <value>The identifier card bit map path.</value>
public static string ControlCacheData public static string ControlCacheData
{ {
get get
{ {
string filePath = AbsolutelyPath + "ControlData\\"; string filePath = AbsolutelyPath + "ControlData\\";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// Excel模板路径 /// Excel模板路径
/// </summary> /// </summary>
/// <value>The menu excel path.</value> /// <value>The menu excel path.</value>
public static string MenuExcelPath public static string MenuExcelPath
{ {
get get
{ {
string filePath = AbsolutelyPath + "Templete/"; string filePath = AbsolutelyPath + "Templete/";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// 打印模板 repx文件存放地址 /// 打印模板 repx文件存放地址
/// </summary> /// </summary>
public static string PrintModePath public static string PrintModePath
{ {
get get
{ {
string filePath = AbsolutelyPath + "Reports\\"; string filePath = AbsolutelyPath + "Reports\\";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// ppt模板 pptx文件存放地址 /// ppt模板 pptx文件存放地址
/// </summary> /// </summary>
public static string CreatePptPath public static string CreatePptPath
{ {
get get
{ {
string filePath = AbsolutelyPath + "Pptxs\\"; string filePath = AbsolutelyPath + "Pptxs\\";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// 发票扫描图片文件存放地址 /// 发票扫描图片文件存放地址
/// </summary> /// </summary>
public static string CreateInvoicePic public static string CreateInvoicePic
{ {
get get
{ {
string filePath = AbsolutelyPath + "InvoicePic\\"; string filePath = AbsolutelyPath + "InvoicePic\\";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// 打印所有模块xml生成地址 /// 打印所有模块xml生成地址
/// </summary> /// </summary>
public static string AllMethodXml public static string AllMethodXml
{ {
get get
{ {
string filePath = AbsolutelyPath + "AllMethodXml\\"; string filePath = AbsolutelyPath + "AllMethodXml\\";
if (!Directory.Exists(filePath)) if (!Directory.Exists(filePath))
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
return filePath; return filePath;
} }
} }
/// <summary> /// <summary>
/// 打印模板语言包存放位置 /// 打印模板语言包存放位置
/// </summary> /// </summary>
public static string PrintModeResourcePath public static string PrintModeResourcePath
{ {
get get
{ {
return AbsolutelyPath + "Localization\\Chinese (Simplified).frl"; return AbsolutelyPath + "Localization\\Chinese (Simplified).frl";
} }
} }
/// <summary> /// <summary>
/// 软件升级日志 /// 软件升级日志
/// </summary> /// </summary>
/// <value>The system update log path.</value> /// <value>The system update log path.</value>
public static string SystemUpdateLogPath public static string SystemUpdateLogPath
{ {
get { return AbsolutelyPath + "\\Log.txt"; } get { return AbsolutelyPath + "\\Log.txt"; }
} }
/// <summary> /// <summary>
/// WebView2 /// WebView2
/// </summary> /// </summary>
/// <value>The system update log path.</value> /// <value>The system update log path.</value>
public static string WebViewPath public static string WebViewPath
{ {
get { return AbsolutelyPath + "\\Browser3\\"; } get { return AbsolutelyPath + "\\Browser3\\"; }
} }
/// <summary> /// <summary>
/// GridControl操作列图标 /// GridControl操作列图标
/// </summary> /// </summary>
/// <value>The system update log path.</value> /// <value>The system update log path.</value>
public static string GridColumnIco public static string GridColumnIco
{ {
get { return AbsolutelyPath + "\\Images\\" + "ColumnIco\\"; } get { return AbsolutelyPath + "\\Images\\" + "ColumnIco\\"; }
} }
public static string TreeViewImagePath public static string TreeViewImagePath
{ {
get { return AbsolutelyPath + "\\Images\\" + "TreeViewImage\\"; } get { return AbsolutelyPath + "\\Images\\" + "TreeViewImage\\"; }
} }
public static string PdfSignImagePath public static string PdfSignImagePath
{ {
get get
{ {
if (!Directory.Exists(AbsolutelyPath + "\\PdfSign\\" + "PdfSignImage\\")) if (!Directory.Exists(AbsolutelyPath + "\\PdfSign\\" + "PdfSignImage\\"))
{ {
Directory.CreateDirectory(AbsolutelyPath + "\\PdfSign\\" + "PdfSignImage\\"); Directory.CreateDirectory(AbsolutelyPath + "\\PdfSign\\" + "PdfSignImage\\");
} }
return AbsolutelyPath + "\\PdfSign\\" + "PdfSignImage\\"; return AbsolutelyPath + "\\PdfSign\\" + "PdfSignImage\\";
} }
} }
public static string PdfSignTempPath public static string PdfSignTempPath
{ {
get get
{ {
if (!Directory.Exists(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTemp\\")) if (!Directory.Exists(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTemp\\"))
{ {
Directory.CreateDirectory(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTemp\\"); Directory.CreateDirectory(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTemp\\");
} }
return AbsolutelyPath + "\\PdfSign\\" + "PdfSignTemp\\"; return AbsolutelyPath + "\\PdfSign\\" + "PdfSignTemp\\";
} }
} }
public static string PdfSignTempSavePath public static string PdfSignTempSavePath
{ {
get get
{ {
if (!Directory.Exists(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTempSave\\")) if (!Directory.Exists(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTempSave\\"))
{ {
Directory.CreateDirectory(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTempSave\\"); Directory.CreateDirectory(AbsolutelyPath + "\\PdfSign\\" + "PdfSignTempSave\\");
} }
return AbsolutelyPath + "\\PdfSign\\" + "PdfSignTempSave\\"; return AbsolutelyPath + "\\PdfSign\\" + "PdfSignTempSave\\";
} }
} }
/// <summary> /// <summary>
/// 菜单默认 /// 菜单默认图标
/// </summary>
public static string ModuleDefaultPath
{
get
{
if (!Directory.Exists(AbsolutelyPath + "Images\\Main\\Module\\Default"))
{