Пример #1
0
        public static void readProperties()
        {
            string line;

            locks.WaitOne();
            properties.Clear();
            try
            {
                System.IO.StreamReader file = new System.IO.StreamReader("C://Users//12703//Documents//tkdz//Tank_Data//Boxconfig");
                while ((line = file.ReadLine()) != null)
                {
                    string[] m = line.Split(' ');
                    if (m.Length != 2)
                    {
                        continue;
                    }
                    uint k = 0u;
                    if (uint.TryParse(m[1], out k))
                    {
                        properties.Add(m[0], k);
                    }
                }
            }
            catch (Exception e) {
                Console.WriteLine(e.Message);
            }
            if (ExternTask.advance)
            {
                ExternTask.setProperties("lock_tank", 1u);
                ExternTask.setProperties("leave_battle", 1u);
            }
            else
            {
                ExternTask.setProperties("lock_tank", 0u);
                ExternTask.setProperties("leave_battle", 0u);
            }
            locks.Release();
        }
Пример #2
0
 static void Main(string[] args)
 {
     ExternTask.setAdvanced(true);
     ExternTask.print();
     Thread.Sleep(20000);
 }