private void Run()
 {
     _serialPortConnector = new SerialPortConnector(_parser.ComPort);
     _serialPortConnector.TurnOff();
     var endTime = DateTime.Now.AddMinutes(_parser.RunTimeMinutes);
     while (DateTime.Now.Ticks < endTime.Ticks)
         DoRun();
     _serialPortConnector.TurnOff();
 }
示例#2
0
        private void Run()
        {
            _serialPortConnector = new SerialPortConnector(_parser.ComPort);
            _serialPortConnector.TurnOff();
            var endTime = DateTime.Now.AddMinutes(_parser.RunTimeMinutes);

            while (DateTime.Now.Ticks < endTime.Ticks)
            {
                DoRun();
            }
            _serialPortConnector.TurnOff();
        }