Exemplo n.º 1
0
        static void Init()
        {
            var set = new XmlDocument();

            try
            {
                set.Load("ClientConfig.xml");
                Net.Init(ref set);
            }
            catch (XmlException)
            {
                Console.WriteLine("Config file error");
                IsStop = true;
            }
            catch (FileNotFoundException)
            {
                Console.WriteLine("Config file not found");
                IsStop = true;
            }
            catch
            {
                Console.WriteLine("Config data error (port,ip or delay");
                IsStop = true;
            }
        }