static BmclCore() { BmclVersion = Application.ResourceAssembly.GetName().Version.ToString(); Logger.Log("BMCLNG Ver." + BmclVersion + "正在启动"); if (!Directory.Exists(MinecraftDirectory)) { Logger.Log($"{MinecraftDirectory}不存在,正在创建"); Directory.CreateDirectory(MinecraftDirectory); } if (!Directory.Exists(TempDirectory)) { Directory.CreateDirectory(TempDirectory); } GameManager = new GameManager(); Config = Config.Load(Cfgfile); if (Config.Passwd == null) { Config.Passwd = new byte[0]; //V2的密码存储兼容 } Logger.Log($"加载{Cfgfile}文件"); Logger.Log(Config); LangManager.LoadLanguage(); LangManager.ChangeLanguage(Config.Lang); Logger.Log("加载默认配置"); if (!Directory.Exists(BaseDirectory + ".minecraft")) { Directory.CreateDirectory(BaseDirectory + ".minecraft"); } if (Config.Javaw == "autosearch") { Config.Javaw = Config.GetJavaDir(); } if (Config.Javaxmx == "autosearch") { Config.Javaxmx = (Config.GetMemory() / 4).ToString(CultureInfo.InvariantCulture); } LangManager.UseLanguage(Config.Lang); if (!App.SkipPlugin) { PluginManager.LoadOldAuthPlugin(LangManager.GetLangFromResource("LangName")); } ServicePointManager.DefaultConnectionLimit = int.MaxValue; ReleaseCheck(); }
static BmclCore() { BmclVersion = Application.ResourceAssembly.FullName.Split('=')[1]; BmclVersion = BmclVersion.Substring(0, BmclVersion.IndexOf(',')); Logger.Log("BMCLNG Ver." + BmclVersion + "正在启动"); if (!Directory.Exists(MinecraftDirectory)) { Logger.Log($"{MinecraftDirectory}不存在,正在创建"); Directory.CreateDirectory(MinecraftDirectory); } GameManager = new GameManager(); Config = Config.Load(Cfgfile); if (Config.Passwd == null) { Config.Passwd = new byte[0]; //V2的密码存储兼容 } Logger.Log($"加载{Cfgfile}文件"); Logger.Log(Config); LangManager.LoadLanguage(); LangManager.ChangeLanguage(Config.Lang); Logger.Log("加载默认配置"); if (!Directory.Exists(BaseDirectory + ".minecraft")) { Directory.CreateDirectory(BaseDirectory + ".minecraft"); } if (Config.Javaw == "autosearch") { Config.Javaw = Config.GetJavaDir(); } if (Config.Javaxmx == "autosearch") { Config.Javaxmx = (Config.GetMemory() / 4).ToString(CultureInfo.InvariantCulture); } LangManager.UseLanguage(Config.Lang); if (!App.SkipPlugin) { PluginManager.LoadOldAuthPlugin(LangManager.GetLangFromResource("LangName")); } #if DEBUG #else ReleaseCheck(); #endif }
static BmclCore() { BmclVersion = Application.ResourceAssembly.FullName.Split('=')[1]; BmclVersion = BmclVersion.Substring(0, BmclVersion.IndexOf(',')); Logger.log("BMCL V3 Ver." + BmclVersion + "正在启动"); if (File.Exists(Cfgfile)) { Config = Config.Load(Cfgfile); if (Config.Passwd == null) { Config.Passwd = new byte[0]; //V2的密码存储兼容 } Logger.log(String.Format("加载{0}文件", Cfgfile)); Logger.log(Config); LoadLanguage(); ChangeLanguage(Config.Lang); } else { Config = new Config(); Logger.log("加载默认配置"); } if (Config.Javaw == "autosearch") { Config.Javaw = Config.GetJavaDir(); } if (Config.Javaxmx == "autosearch") { Config.Javaxmx = (Config.GetMemory() / 4).ToString(CultureInfo.InvariantCulture); } LangManager.UseLanguage(Config.Lang); if (!App.SkipPlugin) { LoadPlugin(LangManager.GetLangFromResource("LangName")); } #if DEBUG #else ReleaseCheck(); #endif }