Exemplo n.º 1
0
 public void Emulator()
 {
     NewGPSData += new SharpGPS.SerialPort.NewGPSDataHandler(gpsdatahandler);
     file        = new System.IO.StreamReader(GPSHandler._NMEAInputFile);
     while (file != null)
     {
         if (file.EndOfStream)
         {
             //Start from beginning of file
             file.BaseStream.Seek(0, System.IO.SeekOrigin.Begin);
         }
         string line = file.ReadLine();
         SharpGPS.SerialPort.GPSEventArgs e = new SharpGPS.SerialPort.GPSEventArgs();
         e.TypeOfEvent = GPSHandler.String2Eventtype(line);
         e.Sentence    = line;
         NewGPSData(this, e);
         System.Threading.Thread.Sleep(150);
     }
 }
Exemplo n.º 2
0
 public void Emulator()
 {
     NewGPSData += new SharpGPS.SerialPort.NewGPSDataHandler(gpsdatahandler);
     file = new System.IO.StreamReader(GPSHandler._NMEAInputFile);
     while (file!=null)
     {
         if (file.EndOfStream)
         {
             //Start from beginning of file
             file.BaseStream.Seek(0, System.IO.SeekOrigin.Begin);
         }
         string line = file.ReadLine();
         SharpGPS.SerialPort.GPSEventArgs e = new SharpGPS.SerialPort.GPSEventArgs();
         e.TypeOfEvent = GPSHandler.String2Eventtype(line);
         e.Sentence = line;
         NewGPSData(this, e);
         System.Threading.Thread.Sleep(150);
     }
 }