public LoginServerDLG() { KODatabase db = new KODatabase(); foreach (VERSION lstVersion in db.VERSION) { version = version > lstVersion.sVersion ? version : lstVersion.sVersion; PatchList.Add(lstVersion); } Console.WriteLine("Login Versiyon : " + version); INIReader ini = new INIReader(Environment.CurrentDirectory + "/LogInServer.ini"); FTP_URL = ini.Read("DOWNLOAD", "URL"); FTP_PATH = ini.Read("DOWNLOAD", "PATH"); int ServerCount = ini.GetInt("SERVER_LIST", "COUNT"); for (int i = 0; i < ServerCount; i++) { SERVER_INFO info = new SERVER_INFO(); info.strServerIP = ini.GetString("SERVER_LIST", string.Format("SERVER_{0}", i.ToString("00"))); info.strLanIP = ini.GetString("SERVER_LIST", string.Format("LANIP_{0}", i.ToString("00"))); info.strServerName = ini.GetString("SERVER_LIST", string.Format("NAME_{0}", i.ToString("00"))); info.sServerID = ini.GetShort("SERVER_LIST", string.Format("ID_{0}", i.ToString("00"))); info.sGroupID = ini.GetShort("SERVER_LIST", string.Format("GROUPID_{0}", i.ToString("00"))); info.sPlayerCap = ini.GetShort("SERVER_LIST", string.Format("PREMLIMIT_{0}", i.ToString("00"))); info.sFreePlayerCap = ini.GetShort("SERVER_LIST", string.Format("FREELIMIT_{0}", i.ToString("00"))); info.strKarusKingName = ini.GetString("SERVER_LIST", string.Format("KING1_{0}", i.ToString("00"))); info.strElMoradKingName = ini.GetString("SERVER_LIST", string.Format("KING2_{0}", i.ToString("00"))); info.strKarusNotice = ini.GetString("SERVER_LIST", string.Format("KINGMSG1_{0}", i.ToString("00"))); info.strElMoradNotice = ini.GetString("SERVER_LIST", string.Format("KINGMSG2_{0}", i.ToString("00"))); ServerList.Add(info); } }
public LoginServerDLG() { KODatabase db = new KODatabase(); foreach(VERSION lstVersion in db.VERSION) { version = version > lstVersion.sVersion ? version : lstVersion.sVersion; PatchList.Add(lstVersion); } Console.WriteLine("Login Versiyon : " + version); INIReader ini = new INIReader(Environment.CurrentDirectory + "/LogInServer.ini"); FTP_URL = ini.Read("DOWNLOAD", "URL"); FTP_PATH = ini.Read("DOWNLOAD", "PATH"); int ServerCount = ini.GetInt("SERVER_LIST", "COUNT"); for(int i=0; i<ServerCount; i++) { SERVER_INFO info = new SERVER_INFO(); info.strServerIP = ini.GetString("SERVER_LIST", string.Format("SERVER_{0}", i.ToString("00"))); info.strLanIP = ini.GetString("SERVER_LIST", string.Format("LANIP_{0}", i.ToString("00"))); info.strServerName = ini.GetString("SERVER_LIST", string.Format("NAME_{0}", i.ToString("00"))); info.sServerID = ini.GetShort("SERVER_LIST", string.Format("ID_{0}", i.ToString("00"))); info.sGroupID = ini.GetShort("SERVER_LIST", string.Format("GROUPID_{0}", i.ToString("00"))); info.sPlayerCap = ini.GetShort("SERVER_LIST", string.Format("PREMLIMIT_{0}", i.ToString("00"))); info.sFreePlayerCap = ini.GetShort("SERVER_LIST", string.Format("FREELIMIT_{0}", i.ToString("00"))); info.strKarusKingName = ini.GetString("SERVER_LIST", string.Format("KING1_{0}", i.ToString("00"))); info.strElMoradKingName = ini.GetString("SERVER_LIST", string.Format("KING2_{0}", i.ToString("00"))); info.strKarusNotice = ini.GetString("SERVER_LIST", string.Format("KINGMSG1_{0}", i.ToString("00"))); info.strElMoradNotice = ini.GetString("SERVER_LIST", string.Format("KINGMSG2_{0}", i.ToString("00"))); ServerList.Add(info); } }