private void ResetLayerNameCollections(List <string> layerNames)
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                LLOS_ObserverLyrNames.Clear();
                LLOS_TargetLyrNames.Clear();
                RLOS_ObserverLyrNames.Clear();

                LLOS_ObserverLyrNames.Add(EnterManullyOption);
                LLOS_TargetLyrNames.Add(EnterManullyOption);
                RLOS_ObserverLyrNames.Add(EnterManullyOption);

                foreach (var name in layerNames)
                {
                    LLOS_ObserverLyrNames.Add(name);
                    LLOS_TargetLyrNames.Add(name);
                    RLOS_ObserverLyrNames.Add(name);
                }
            });
        }
        private void ResetSelectedLyrName(string tempSelectedLLOS_ObserverLyr, string tempLLOS_TargetLyrNames, string tempRLOS_ObserverLyrNames)
        {
            if (LLOS_ObserverLyrNames.Contains(tempSelectedLLOS_ObserverLyr))
            {
                SelectedLLOS_ObserverLyrName = tempSelectedLLOS_ObserverLyr;
            }
            else if (LLOS_ObserverLyrNames.Any())
            {
                SelectedLLOS_ObserverLyrName = LLOS_ObserverLyrNames[0];
            }
            else
            {
                SelectedLLOS_ObserverLyrName = string.Empty;
            }

            if (LLOS_TargetLyrNames.Contains(tempLLOS_TargetLyrNames))
            {
                SelectedLLOS_TargetLyrName = tempLLOS_TargetLyrNames;
            }
            else if (LLOS_TargetLyrNames.Any())
            {
                SelectedLLOS_TargetLyrName = LLOS_TargetLyrNames[0];
            }
            else
            {
                SelectedLLOS_TargetLyrName = string.Empty;
            }

            if (RLOS_ObserverLyrNames.Contains(tempRLOS_ObserverLyrNames))
            {
                SelectedRLOS_ObserverLyrName = tempRLOS_ObserverLyrNames;
            }
            else if (RLOS_ObserverLyrNames.Any())
            {
                SelectedRLOS_ObserverLyrName = RLOS_ObserverLyrNames[0];
            }
            else
            {
                SelectedRLOS_ObserverLyrName = string.Empty;
            }
        }
Example #3
0
        private void ResetLayerCollectionNames(ObservableCollection <string> layerNames)
        {
            LLOS_ObserverLyrNames.Clear();
            LLOS_TargetLyrNames.Clear();
            RLOS_ObserverLyrNames.Clear();

            if (!LLOS_ObserverLyrNames.Contains(EnterManullyOption))
            {
                LLOS_ObserverLyrNames.Add(EnterManullyOption);
                LLOS_TargetLyrNames.Add(EnterManullyOption);
                RLOS_ObserverLyrNames.Add(EnterManullyOption);
            }

            foreach (var layerName in layerNames)
            {
                if (!LLOS_ObserverLyrNames.Contains(layerName))
                {
                    LLOS_ObserverLyrNames.Add(layerName);
                    LLOS_TargetLyrNames.Add(layerName);
                    RLOS_ObserverLyrNames.Add(layerName);
                }
            }
        }