mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-22 03:49:35 +08:00
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using System.Globalization;
|
|
using System.Reflection;
|
|
using Oshima.Core.Configs;
|
|
|
|
namespace Oshima.Core
|
|
{
|
|
public class OSMCore
|
|
{
|
|
public const string version = "v1.0";
|
|
public const string version2 = "Rebirth";
|
|
|
|
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt on {GetBuiltTime(Assembly.GetExecutingAssembly().Location)}\r\nSee: https://github.com/milimoe";
|
|
|
|
public static string GetBuiltTime(string dll_name)
|
|
{
|
|
DateTime lastWriteTime = File.GetLastWriteTime(dll_name);
|
|
|
|
string month = lastWriteTime.ToString("MMM", CultureInfo.InvariantCulture);
|
|
int day = lastWriteTime.Day;
|
|
string time = lastWriteTime.ToString("HH:mm:ss", CultureInfo.InvariantCulture);
|
|
|
|
return $"{month}. {day}, {lastWriteTime.Year} {time}";
|
|
}
|
|
|
|
public static void InitOSMCore()
|
|
{
|
|
GeneralSettings.LoadSetting();
|
|
GeneralSettings.SaveConfig();
|
|
QQOpenID.LoadConfig();
|
|
QQOpenID.SaveConfig();
|
|
Daily.InitDaily();
|
|
SayNo.InitSayNo();
|
|
Ignore.InitIgnore();
|
|
}
|
|
}
|
|
}
|