forked from cyq1162/cyqdata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppConst.cs
105 lines (100 loc) · 3.56 KB
/
AppConst.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace CYQ.Data
{
/// <summary>
/// 内部常量类
/// </summary>
internal static class AppConst
{
#region License 常量
//internal const string Lic_Error_Contact = "\r\nContact email:[email protected];QQ:272657997\r\n site : http://www.cyqdata.com/cyqdata";
////internal const string Lic_Error_AtNight = "Sorry ! You need to get a license key when you run it at night!";
//internal const string Lic_Error_NotBuyProvider = "Sorry ! Your license key not contains this provider function : ";
//internal const string Lic_Error_InvalidVersion = "Sorry ! Your license key version invalid!";
//internal const string Lic_Error_InvalidKey = "Sorry ! Your license key is invalid!";
//internal const string Lic_PublicKey = "CYQ.Data.License";
//internal const string Lic_UseKeyFileName = "cyq.data.keys";
////internal const string Lic_DevKeyFileName = "/cyq.data.dev.keys";
//internal const string Lic_MacKeyType = "mac";
//internal const string Lic_DllKeyType = "dll";
//internal const string Lic_AriesCore = "Aries.Core";
//internal const string Lic_AriesLogic = "Aries.Logic";
#endregion
#region 全局
internal const string FilePre = "file:\\";
internal const string Global_NotImplemented = "The method or operation is not implemented.";
#endregion
#region 静态常量
/// <summary>
/// 无效的文件路径字符
/// </summary>
internal static char[] InvalidFileNameChars = System.IO.Path.GetInvalidFileNameChars();
private static string _HR;
internal static string HR
{
get
{
if (string.IsNullOrEmpty(_HR))
{
_HR = AppConfig.IsWeb ? "<hr>" : NewLine + "<---END--->" + NewLine;
}
return _HR;
}
set
{
_HR = value;
}
}
private static string _BR;
internal static string BR
{
get
{
if (string.IsNullOrEmpty(_BR))
{
_BR = AppConfig.IsWeb ? "<br />" : NewLine;
}
return _BR;
}
set
{
_BR = value;
}
}
internal static string NewLine
{
get
{
return Environment.NewLine;
}
}
internal static string SplitChar = "$,$";
/// <summary>
/// 框架程序集名称
/// </summary>
internal static string _DLLFullName = string.Empty;
static string _RunfolderPath;
/// <summary>
/// 框架的运行路径
/// </summary>
internal static string RunFolderPath
{
get
{
if (string.IsNullOrEmpty(_RunfolderPath))
{
Assembly ass = System.Reflection.Assembly.GetExecutingAssembly();
_DLLFullName = ass.FullName;
_RunfolderPath = ass.CodeBase;
_RunfolderPath = System.IO.Path.GetDirectoryName(_RunfolderPath).Replace(AppConst.FilePre, string.Empty) + "\\";
ass = null;
}
return _RunfolderPath;
}
}
#endregion
}
}