private void Form1_Load(object sender, EventArgs e) { if (File.Exists("local_servers.dat")) { serverContainer.addServers(ServerReader.readMultiple("local_servers.dat")); updateServerList(); } }
public void addServer(string file) { Server?server = ServerReader.readSingle(file); if (server == null) { Console.WriteLine("COULD NOT LOAD SERVER"); return; } servers.Add((Server)server); form.updateServerList(); }
public void addServer(string file, string directoryPath) { ServerReader reader = new ServerReader(); Server? server = ServerReader.readSingle(file); if (server == null) { return; } Server srv = (Server)server; srv.clientDirectory = directoryPath; srv.locale = ClientHelper.localeVersion(srv); servers.Add(srv); form.updateServerList(); }