Example #1
0
 private void EnsureThreeDeeCaptureCoordinatesAreLoaded(int vehicleACD)
 {
     if (ThreeDeeCaptureCoordinatesAreEmpty || vehicleACD != _lastVehicleACD)
     {
         _threeDeeCaptureCoordinateUpdater.Update3DCoordinatesFromCurrentBmsDatFile(vehicleACD);
         _lastVehicleACD = vehicleACD;
     }
 }
Example #2
0
 private byte[] GetMFDImage(Rectangle sourceRectangle)
 {
     CreateTexSharedMemReaderIfNotExists();
     if (_texSharedMemReader != null && _texSharedMemReader.IsDataAvailable)
     {
         var latestSharedMem = ReadF4SharedMem();
         if (latestSharedMem != null)
         {
             var vehicleAcd = latestSharedMem.vehicleACD;
             if (vehicleAcd != _lastVehicleAcd)
             {
                 _threeDeeCaptureCoordinateUpdater.Update3DCoordinatesFromCurrentBmsDatFile(vehicleAcd);
                 _lastVehicleAcd = vehicleAcd;
             }
             using (var image = _texSharedMemReader.GetImage(sourceRectangle))
             {
                 return(Common.Imaging.Util.BytesFromBitmap(image, "RLE", "PNG"));
             }
         }
     }
     return(null);
 }