예제 #1
0
        private async Task ReadSelectedLayers()
        {
            LLOS_ObserversInExtent.Clear();
            LLOS_ObserversOutOfExtent.Clear();
            LLOS_TargetsInExtent.Clear();
            LLOS_TargetsOutOfExtent.Clear();

            var surfaceEnvelope = await GetSurfaceEnvelope();

            var selectedFeatures = await QueuedTask.Run(() => { return(MapView.Active.Map.GetSelection()); });

            await QueuedTask.Run(() =>
            {
                var selectedFeaturesCollections = selectedFeatures.Where(x => x.Key.Name == SelectedLLOS_ObserverLyrName)
                                                  .Select(x => x.Value).FirstOrDefault();
                ReadPointFromLayer(surfaceEnvelope, LLOS_ObserversInExtent, LLOS_ObserversOutOfExtent, SelectedLLOS_ObserverLyrName, selectedFeaturesCollections);
            });

            await QueuedTask.Run(() =>
            {
                var selectedFeaturesCollections = selectedFeatures.Where(x => x.Key.Name == SelectedLLOS_TargetLyrName)
                                                  .Select(x => x.Value).FirstOrDefault();
                ReadPointFromLayer(surfaceEnvelope, LLOS_TargetsInExtent, LLOS_TargetsOutOfExtent, SelectedLLOS_TargetLyrName, selectedFeaturesCollections, "target");
            });
        }
예제 #2
0
 internal void ClearLLOSCollections()
 {
     LLOS_TargetsInExtent.Clear();
     LLOS_TargetsOutOfExtent.Clear();
     LLOS_ObserversInExtent.Clear();
     LLOS_ObserversOutOfExtent.Clear();
 }
예제 #3
0
        internal void ValidateLLOS_LayerSelection()
        {
            if (SelectedLLOS_ObserverLyrName == EnterManullyOption)
            {
                LLOS_ObserversInExtent.Clear();
                LLOS_ObserversOutOfExtent.Clear();
            }
            if (SelectedLLOS_TargetLyrName == EnterManullyOption)
            {
                LLOS_TargetsInExtent.Clear();
                LLOS_TargetsOutOfExtent.Clear();
            }

            IsLLOSValidSelection = (
                ((SelectedLLOS_ObserverLyrName == EnterManullyOption || string.IsNullOrWhiteSpace(SelectedLLOS_ObserverLyrName)) &&
                 LLOS_ObserversInExtent.Count == 0 && LLOS_ObserversOutOfExtent.Count == 0 && ObserverAddInPoints.Count == 0)
                ||
                ((SelectedLLOS_TargetLyrName == EnterManullyOption || string.IsNullOrWhiteSpace(SelectedLLOS_TargetLyrName)) &&
                 LLOS_TargetsInExtent.Count == 0 && LLOS_TargetsOutOfExtent.Count == 0 && TargetAddInPoints.Count == 0)
                ) ? false : true;
        }
예제 #4
0
        private void ReadSelectedLayerPoints()
        {
            LLOS_ObserversInExtent.Clear();
            LLOS_ObserversOutOfExtent.Clear();
            LLOS_TargetsInExtent.Clear();
            LLOS_TargetsOutOfExtent.Clear();

            var observerColor = new RgbColor()
            {
                Blue = 255
            } as IColor;

            ReadSelectedLyrPoints(LLOS_ObserversInExtent, LLOS_ObserversOutOfExtent, SelectedLLOS_ObserverLyrName, observerColor);

            var targetColor = new RgbColor()
            {
                Red = 255
            } as IColor;

            ReadSelectedLyrPoints(LLOS_TargetsInExtent, LLOS_TargetsOutOfExtent, SelectedLLOS_TargetLyrName, observerColor);
        }