示例#1
0
文件: Robot.cs 项目: florianbaer/CSA
        public bool InitLogger(Drive ReferenceDrive)
        {
            //Falls schon ein Logger lauft -> false
            if (singleton)
            {
                return(false);
            }
            //hier der else Teil
            Console.WriteLine("Starte TimerInit");
            // InitTrackLogger example = new InitTrackLogger();
            TrackLogger TrackLog1 = new TrackLogger(ReferenceDrive);

            //timer = new System.Threading.Timer(TrackLog1.writeEntry, null, 150, 85);


            //***Alternative Logger***
            //Logger akitiveren
            TrackLogger.LogYes = true;
            Thread SimpleTrackLog = new Thread(new ThreadStart(TrackLog1.runLogger));

            SimpleTrackLog.Start();
            //******

            return(true);
        }
示例#2
0
        public void StartTimer(TrackLogger TrackReference)
        {
            Console.WriteLine("Timer wird erstellt");

            timer = new System.Threading.Timer(TrackReference.writeEntry, null, 100, 250);
            Thread.Sleep(8000);
        }