예제 #1
0
        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();
        }
예제 #2
0
        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();
        }