Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
|
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmart.Model
- {
- public class FileConfigModel
- {
- public static string ConstPath { get; set; } = string.Empty;
-
- /// <summary>
- /// 变量配置路径
- /// </summary>
- public static string VarConfigPath
- {
- get
- {
- string ReturnValue = null;
- if (Directory.Exists(ConstPath))
- {
- string path = $"{ConstPath}\\{ConfigDirName}\\JSON";
- Directory.CreateDirectory(path);
- ReturnValue = $"{ConstPath}\\{ConfigDirName}\\JSON\\CommunicationPar.json";
- }
- return ReturnValue;
- }
- }
-
- /// <summary>
- /// 获取二进制文件配置路径
- /// </summary>
- /// <returns></returns>
- public static string GetBinConfigPath
- {
- get
- {
- string ReturnValue = null;
- if (Directory.Exists(ConstPath))
- {
- string path = $"{ConstPath}\\{ConfigDirName}\\{BaseConfig}";
- Directory.CreateDirectory(path);
- ReturnValue = $"{ConstPath}\\{ConfigDirName}\\{BaseConfig}\\{BinConfigFileName}";
- }
- return ReturnValue;
- }
- }
-
- /// <summary>
- /// 变量管理器路径
- /// </summary>
- public static string VarManagerPath => $"{AppDomain.CurrentDomain.BaseDirectory}BPASmart.VariableManager.exe";
-
- /// <summary>
- /// 页面文件夹名称
- /// </summary>
- public const string PageDirName = "Layouts";
-
- /// <summary>
- /// 配置文件文件夹名称
- /// </summary>
- public const string ConfigDirName = "AccessFile";
-
- /// <summary>
- /// 基本配置文件夹名称
- /// </summary>
- public const string BaseConfig = "Bin";
-
- /// <summary>
- /// 二进制配置文件名
- /// </summary>
- public const string BinConfigFileName = "BinConfigFile.ser";
-
- /// <summary>
- /// 图片文件夹名称
- /// </summary>
- public const string ImageDirName = "Images";
- }
- }
|