Пример #1
0
        private async void Next_Click(object sender, RoutedEventArgs e)
        {
            EMapLayersList = new List <EMapLayers>();

            foreach (EngineeringMap emap in _projDef.EngineeringMaps)
            {
                string file = _projDef.LocalFilePath + "\\" + emap.LocalGeoDbFileName;
                if (File.Exists(file))
                {
                    EMapLayers eMapLayers = new EMapLayers();
                    eMapLayers.EMapName = emap.MapID;

                    // Open geodatabase
                    Geodatabase gdb = await Geodatabase.OpenAsync(file);

                    IEnumerable <GeodatabaseFeatureTable> featureTables =
                        gdb.FeatureTables;
                    foreach (var table in featureTables)
                    {
                        eMapLayers.EMapLayerNameList.Add(table.Name);
                    }

                    EMapLayersList.Add(eMapLayers);
                }
            }
            // finish
            DialogResult = true;
            Close();
        }
        private void EMapListLB_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            EMapLayers eMapLayers = EMapListLB.SelectedItem as EMapLayers;

            LayerListLB.ItemsSource = eMapLayers.EMapLayerNameList;
        }