示例#1
0
        private static void CopyPhotosWithoutGPS()
        {
            while (photoQueueWithoutGPS.Count > 0)
            {
                PhotoMetadata meta;
                if (photoQueueWithoutGPS.TryDequeue(out meta))
                {
                    GoogleAddressInfo address;
                    if (TripSpanCache.TryGetAddress(meta, out address))
                    {
                        meta.Address = address;
                    }

                    GenerateNewFilePath(meta);
                    CopyPhoto(meta);
                }
            }
        }
示例#2
0
        private static void CopyPhotosWithoutGPSTask()
        {
            while (photoWithGPSInProgress)
            {
                PhotoMetadata meta;
                if (photoQueueWithoutGPS.TryPeek(out meta))
                {
                    GoogleAddressInfo address;
                    if (TripSpanCache.TryGetAddress(meta, out address))
                    {
                        meta.Address = address;
                        GenerateNewFilePath(meta);
                        CopyPhoto(meta);
                        photoQueueWithoutGPS.TryDequeue(out meta);
                    }
                }

                Task.Delay(500);
            }
        }