예제 #1
0
        public ServerProperties(string source)
        {
            try
            {
                ServerProperties temp = JsonConvert.DeserializeObject <ServerProperties>(File.ReadAllText(source));

                clientLocation = temp.clientLocation;
            }
            catch (Exception exc)
            {
                Logger.Error("Could not read server properties: ", exc);
            }
        }
예제 #2
0
        private void ReadProperties()
        {
            //Read properties

            properties = new ServerProperties(serverLocation + "/properties.json");

            //Check if the client location is valid

            if (!Directory.Exists(ClientLocation))
            {
                Logger.Error(
                    "The client location \"" + ClientLocation + "\" is invalid! " +
                    "Please make sure the client location in the server properties file is valid."
                    );
            }
        }