增加项目,分层

This commit is contained in:
chfei committed 2026-09-11 19:11:12 +08:00
1 parent 6e995a5bdb
commit 0a3e5af6a9
234 files changed
+26994 -1

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
using MAX.Framework.Helpers;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Store.Framework;
public static class Config
{
public const string AppVersion = "1312";
public static bool IsRelease
{
get
{
#if RELEASE
return true;
#else
return false;
#endif
}
}
public static Guid SessionID { get; }
public static DateTime AppStartTime { get; }
public static string Version => AppVersion;
static Config()
{
SessionID = Guid.NewGuid();
AppStartTime = DateTime.Now;
//FileVersionInfo info = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
//Version = new VersionStruct(info.FileMajorPart, info.ProductMinorPart, info.FileBuildPart, info.FilePrivatePart);
}
public static string GetFullVersionString()
{
static IEnumerable<string> GetStrings()
{
yield return Version.ToString();
yield return IsRelease ? "Release" : "Debug";
if (SystemHelper.IsAdministratorSafe)
{
yield return "管理员权限";
}
}
return string.Join(" - ", GetStrings());
}
}