Esempio n. 1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (File.Exists("local_servers.dat"))
     {
         serverContainer.addServers(ServerReader.readMultiple("local_servers.dat"));
         updateServerList();
     }
 }
Esempio n. 2
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();
        }
Esempio n. 3
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();
        }