Esempio n. 1
0
        private void LoadSubCatalogItems()
        {
            SpatialDatabaseConn conn = _tag as SpatialDatabaseConn;

            if (conn == null)
            {
                return;
            }
            //datasets
            ICatalogEntity[] datasets = conn.GetSpatialFeatureDatasets();
            if (datasets != null && datasets.Length > 0)
            {
                foreach (SpatialFeatureDataset ds in datasets)
                {
                    CatalogFeatureDataset dsIt = new CatalogFeatureDataset(ds.Name, ds, ds.Description);
                    AddChild(dsIt);
                }
            }
            //fetclass
            ICatalogEntity[] fetclasses = conn.GetSpatialFeatureClasses();
            if (fetclasses != null && fetclasses.Length > 0)
            {
                foreach (SpatialFeatureClass fetc in fetclasses)
                {
                    CatalogFeatureClass fetcIt = new CatalogFeatureClass(fetc.Name, fetc, fetc.Description);
                    AddChild(fetcIt);
                }
            }
            //
            Refresh();
        }
Esempio n. 2
0
        private static FeatureDataSourceBase GetDataSource(CatalogFeatureClass catalogFeatureClass)
        {
            FeatureDataSourceBase ds = null;
            string name = catalogFeatureClass.Name;
            SpatialFeatureClass fetc = catalogFeatureClass.Tag as SpatialFeatureClass;

            ds = new SpatialDbDataSource(name, fetc._connString + "@" + fetc.DataTable);
            return(ds);
        }