Ejemplo n.º 1
0
        async public override Task <bool> Refresh()
        {
            await base.Refresh();

            SdeDataset dataset = new SdeDataset();
            await dataset.SetConnectionString(_connectionString);

            await dataset.Open();

            List <IDatasetElement> elements = await dataset.Elements();

            if (elements == null)
            {
                return(false);
            }

            foreach (IDatasetElement element in elements)
            {
                if (element.Class is IFeatureClass)
                {
                    base.AddChildObject(new MsSql2008SpatialSdeFeatureClassExplorerObject(this, element));
                }
            }

            return(true);
        }
Ejemplo n.º 2
0
        public override void Dispose()
        {
            base.Dispose();

            if (_dataset != null)
            {
                _dataset.Dispose();
                _dataset = null;
            }
        }
Ejemplo n.º 3
0
        public override void Refresh()
        {
            base.Refresh();

            if (_dataset == null)
            {
                _dataset = new SdeDataset();
                _dataset.ConnectionString = this.ConnectionString;
                if (!_dataset.Open())
                {
                    MessageBox.Show(_dataset.lastErrorMsg);
                    return;
                }
            }
            foreach (IDatasetElement element in _dataset.Elements)
            {
                base.AddChildObject(new SdeFeatureClassExplorerObject(this, element));
            }

            base.SortChildObjects(new ExplorerObjectCompareByName());
            //dataset.Dispose(); // Connection gleich wieder löschen...
        }
Ejemplo n.º 4
0
        public override void Refresh()
        {
            base.Refresh();
            SdeDataset dataset = new SdeDataset();

            dataset.ConnectionString = _connectionString;
            dataset.Open();

            List <IDatasetElement> elements = dataset.Elements;

            if (elements == null)
            {
                return;
            }
            foreach (IDatasetElement element in elements)
            {
                if (element.Class is IFeatureClass)
                {
                    base.AddChildObject(new MsSql2008SpatialSdeFeatureClassExplorerObject(this, element));
                }
            }
        }