Beispiel #1
0
        static void DebugAllRead(string path)
        {
            DateTime localDate = DateTime.Now;

            List <TJobject> TJList = new List <TJobject>();
            int             count  = 0;


            TJ.ReadTJ(path, ref TJList);
            count = TJList.Count;

            string debstr = "";

            foreach (TJobject TJ in TJList)
            {
                debstr = debstr + TJ.date.ToString() + "." + TJ.mks + Environment.NewLine;
            }

            for (int i = 0; i < TJList.Count; i++)
            {
                if (TJList[i].tjevent == @"ADMIN")
                {
                    Console.WriteLine("beep");
                }
            }

            DateTime localDateEnd = DateTime.Now;

            Console.WriteLine("Count = " + count);
            Console.WriteLine(localDateEnd - localDate);
            Console.ReadKey();
        }
Beispiel #2
0
        private static void OnTimedEvent(Object source, ElapsedEventArgs e)
        {
            int count = 0;

            //приостанавливаем таймер на время чтения
            aTimer.Enabled = false;
            while (TJ.ReadTJ(pathTimer, ref TJList, 1000, ref coord, ref coordFin))
            {
                count = TJList.Count + count;
                TJList.Clear();
                Console.WriteLine(coord.filename);
            }
            aTimer.Enabled = true;

            Console.WriteLine("timer");
            Console.WriteLine("Count = " + count);
        }
Beispiel #3
0
        static void DebugCountRead(string path)
        {
            DateTime localDate = DateTime.Now;

            List <TJobject> TJList = new List <TJobject>();
            int             count  = 0;

            TJCoord coord = new TJCoord();

            while (TJ.ReadTJ(path, ref TJList, 1000, ref coord))
            {
                count = TJList.Count + count;
                TJList.Clear();
                Console.WriteLine(coord.filename);
            }

            count = TJList.Count + count;

            DateTime localDateEnd = DateTime.Now;

            Console.WriteLine("Count = " + count);
            Console.WriteLine(localDateEnd - localDate);
            Console.ReadKey();
        }