Files
lserp_cs_6.0/其他程序/Lskj.TxtFileRead/PubUtil.cs
T
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

231 lines
7.2 KiB
C#

/******************************
* 说明:程序通用方法管理类
* 创建人:龚宇超
* 创建日期:2017-08-16
* 修改人:
* 修改日期:
* 修改备注:
* 版本:1.0.0.0
******************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Lskj.TxtFileRead
{
/// <summary>
/// 程序通用方法管理类
/// </summary>
public sealed class PubUtil
{
/// <summary>
/// <para>说明:获取应用程序启动目录</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-21 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns>System.String.</returns>
public static string AbsolutelyPath
{
get { return Application.StartupPath + "\\"; }
}
/// <summary>
/// 获取应用程序启动目录下的Lib目录
/// </summary>
/// <value>The absolutely library path.</value>
public static string AbsolutelyLibPath
{
get { return AbsolutelyPath + "Lib/"; }
}
/// <summary>
/// 获取应用程序启动目录下的Browser目录
/// </summary>
/// <value>The absolutely browser path.</value>
public static string AbsolutelyBrowserPath
{
get { return AbsolutelyPath + "Browser/"; }
}
/// <summary>
/// 获取应用程序启动目录下的小平台目录
/// </summary>
/// <value>The absolutely small client path.</value>
public static string AbsolutelySmallClientPath
{
get { return AbsolutelyPath + "Client.exe"; }
}
/// <summary>
/// <para>说明:获取附件下载存放临时目录</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11-01 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns>System.String.</returns>
public static string FileDownLoadTempPath
{
get
{
string path = AbsolutelyPath + "TempFiles/";
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
return path;
}
}
/// <summary>
/// 获取打印文件路径
/// </summary>
/// <value>The print file absolutely path.</value>
public static string PrintFileAbsolutelyPath
{
get { return AbsolutelyPath + "Lib/P_PubPrint.lsp"; }
}
/// <summary>
/// 获取新版打印文件路径
/// </summary>
/// <value>The print file absolutely path.</value>
public static string PrintFileAbsolutelyPath70
{
get { return AbsolutelyPath + "Lib/p_pubprint70.lsp"; }
}
/// <summary>
/// 附件exe文件路径
/// </summary>
/// <value>The name of the file executable.</value>
public static string AbsolutelyFileUploadPath
{
get { return AbsolutelyPath + "Attach/LSTest.exe"; }
}
/// <summary>
/// 主界面模块图片加载路径
/// </summary>
/// <value>The main menu default image.</value>
public static string MainMenuDefaultImage
{
get { return BitMapPath + "Main/Module/"; }
}
public static string MesItemImage
{
get { return BitMapPath + "MesItem/"; }
}
/// <summary>
/// 主界面、登录界面、子系统图片存放位置
/// </summary>
/// <value>The bit map path.</value>
public static string BitMapPath
{
get { return AbsolutelyPath + "Images/"; }
}
/// <summary>
/// 身份证阅读器图片存放位置
/// </summary>
/// <value>The identifier card bit map path.</value>
public static string IDCardBitMapPath
{
get
{
string filePath = AbsolutelyPath + "Card\\";
if (!Directory.Exists(filePath))
Directory.CreateDirectory(filePath);
return filePath;
}
}
/// <summary>
/// 串口通过ini本地设置
/// </summary>
/// <value>The main menu configuration path.</value>
public static string TextPath
{
get { return AbsolutelyPath + "text.ini"; }
}
/// <summary>
/// 模块配置文件存放路径
/// </summary>
/// <value>The main menu configuration path.</value>
public static string MainMenuConfigPath
{
get { return AbsolutelyPath + "MenuConfig.ini"; }
}
/// <summary>
/// 控件缓存数据源
/// </summary>
/// <value>The identifier card bit map path.</value>
public static string ControlCacheData
{
get
{
string filePath = AbsolutelyPath + "ControlData\\";
if (!Directory.Exists(filePath))
Directory.CreateDirectory(filePath);
return filePath;
}
}
/// <summary>
/// Excel模板路径
/// </summary>
/// <value>The menu excel path.</value>
public static string MenuExcelPath
{
get
{
string filePath = AbsolutelyPath + "Templete/";
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
return filePath;
}
}
/// <summary>
/// 打印模板 repx文件存放地址
/// </summary>
public static string PrintModePath
{
get
{
string filePath = AbsolutelyPath + "Reports\\";
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
return filePath;
}
}
/// <summary>
/// 打印模板语言包存放位置
/// </summary>
public static string PrintModeResourcePath
{
get
{
return AbsolutelyPath + "Localization\\Chinese (Simplified).frl";
}
}
/// <summary>
/// 软件升级日志
/// </summary>
/// <value>The system update log path.</value>
public static string SystemUpdateLogPath
{
get { return AbsolutelyPath + "\\Log.txt"; }
}
/// <summary>
/// WebView2
/// </summary>
/// <value>The system update log path.</value>
public static string WebViewPath
{
get { return AbsolutelyPath + "\\Browser2\\"; }
}
}
}