/// <summary> /// 初始化启动器 /// </summary> /// <param name="javaPath"></param> /// <param name="javaXmx"></param> /// <param name="userName"></param> /// <param name="name"></param> /// <param name="info"></param> /// <param name="extarg"></param> /// <param name="li"></param> public Launcher(string javaPath, string javaXmx, string userName, string name, Gameinfo info, string extarg, LoginInfo li) { OnStateChangeEvent(LangManager.GetLangFromResource("LauncherCheckJava")); if (!File.Exists(javaPath)) { BMCLV4.Logger.Log("找不到java",BMCLV4.Logger.LogType.Error); throw new NoJavaException(); } OnStateChangeEvent(LangManager.GetLangFromResource("LauncherCheckMem")); _javaxmx = javaXmx; _username = userName; _version = info.id; this._name = name; _game.StartInfo.FileName = javaPath; if (BMCLV4.Logger.Debug) { _game.StartInfo.CreateNoWindow = true; _game.StartInfo.RedirectStandardOutput = true; _game.StartInfo.RedirectStandardError = true; } _info = info; this._li = li; this.Extarg = extarg; this._info = info; }
protected void OnLoginFinishEvent(LoginInfo logininfo) { LoginFinishEventHandler handler = LoginFinishEvent; if (handler != null) BmclCore.Invoke(new Action(() => handler(logininfo))); }