Ejemplo n.º 1
0
        private void Timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            timer.Stop();

            if (CmdQueue.Count == 0)
            {
                if (Program.IsRecording == false)
                {
                    Program.ForcedShortCaptureCtrl(false);
                }
            }
            else
            {
                while (CmdQueue.Count > 0)
                {
                    Program.ForcedShortCaptureCtrl(true);//안전빵

                    Console.WriteLine("Queue_Timer_Elapsed");
                    QueueObj queueObj = CmdQueue.Dequeue();
                    switch (queueObj.motion)
                    {
                    case CmdMotion.SearchAndReadYN:
                        Program.ChromeHandler.SearchAndReadYN(queueObj.s1);
                        break;

                    case CmdMotion.ReadSearchList:
                        Program.ChromeHandler.ReadSearchList(queueObj.n1);
                        break;

                    default:
                        break;
                    }
                }
                if (Program.IsRecording == false)
                {
                    Program.ForcedShortCaptureCtrl(false);
                }
            }

            timer.Start();
        }
Ejemplo n.º 2
0
 public void AddCmdOnQueue(QueueObj queueObj)
 {
     CmdQueue.Enqueue(queueObj);
 }