Ejemplo n.º 1
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            if (_etconn == null)
            {
                return;
            }

            FormEventTableConnection dlg = new FormEventTableConnection();

            dlg.DbConnectionString = _etconn.DbConnectionString;
            dlg.TableName          = _etconn.TableName;
            dlg.IdField            = _etconn.IdFieldName;
            dlg.XField             = _etconn.XFieldName;
            dlg.YField             = _etconn.YFieldName;
            dlg.SpatialReference   = _etconn.SpatialReference;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                EventTableConnection etcon = new EventTableConnection(
                    dlg.DbConnectionString,
                    dlg.TableName,
                    dlg.IdField, dlg.XField, dlg.YField,
                    dlg.SpatialReference);

                ConfigConnections connStream = new ConfigConnections("eventtable", "546B0513-D71D-4490-9E27-94CD5D72C64A");
                connStream.Add(dlg.TableName, etcon.ToXmlString());
                _etconn = etcon;
            }
        }
Ejemplo n.º 2
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormConnectionString dlg = new FormConnectionString();

            dlg.ProviderID = "postgre";
            dlg.UseProviderInConnectionString = false;

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                DbConnectionString dbConnStr  = dlg.DbConnectionString;
                ConfigConnections  connStream = new ConfigConnections("postgis", "546B0513-D71D-4490-9E27-94CD5D72C64A");

                string connectionString = dbConnStr.ConnectionString;
                string id = ConfigTextStream.ExtractValue(connectionString, "database");
                id = connStream.GetName(id);
                connStream.Add(id, dbConnStr.ToString());

                e.NewExplorerObject = new PostGISExplorerObject(this.ParentExplorerObject, id, dbConnStr);

                //string connStr = dlg.ConnectionString;
                //ConfigTextStream stream = new ConfigTextStream("postgis_connections", true, true);
                //string id = ConfigTextStream.ExtractValue(connStr, "Database");
                //id += "@" + ConfigTextStream.ExtractValue(connStr, "Server");
                //if (id == "@") id = "PostGIS Connection";
                //stream.Write(connStr, ref id);
                //stream.Close();

                //e.NewExplorerObject = new PostGISExplorerObject(id, dlg.ConnectionString);
            }
        }
Ejemplo n.º 3
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            FormNewOgrDataset dlg = new FormNewOgrDataset(_connectionString);


            if (dlg.ShowDialog() == DialogResult.OK)
            {
                ConfigConnections connStream = new ConfigConnections("OGR", "ca7011b3-0812-47b6-a999-98a900c4087d");
                connStream.Add(_name, this.ConnectionString = dlg.ConnectionString);
            }
        }
Ejemplo n.º 4
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            FormTileCacheConnection dlg = new FormTileCacheConnection();

            dlg.ConnectionString = _connectionString;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                ConfigConnections connStream = new ConfigConnections("TileCache", "b9d6ae5b-9ca1-4a52-890f-caa4009784d4");
                connStream.Add(_name, this.ConnectionString = dlg.ConnectionString);
            }
        }
Ejemplo n.º 5
0
        private void addNetworkDirectory_Click(object sender, EventArgs e)
        {
            gView.Framework.UI.Dialogs.FormAddNetworkDirectory dlg = new gView.Framework.UI.Dialogs.FormAddNetworkDirectory();
            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK && !String.IsNullOrEmpty(dlg.Path))
            {
                ConfigConnections connStream = new ConfigConnections("directories");
                connStream.Add(dlg.Path, dlg.Path);

                _tree.SelectRootNode();
                RefreshContents();
            }
        }
Ejemplo n.º 6
0
        public void OnEvent(object MapEvent)
        {
            gView.Framework.UI.Dialogs.FormAddNetworkDirectory dlg = new gView.Framework.UI.Dialogs.FormAddNetworkDirectory();
            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK && !String.IsNullOrEmpty(dlg.Path))
            {
                ConfigConnections connStream = new ConfigConnections("directories");
                connStream.Add(dlg.Path, dlg.Path);

                if (_exapp != null)
                {
                    //_tree.SelectRootNode();
                    _exapp.RefreshContents();
                }
            }
        }
Ejemplo n.º 7
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormMongoDbConnection dlg = new FormMongoDbConnection();

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string connectionString = dlg.ConnectionString;
                string name             = connectionString.ExtractConnectionStringParameter("database");

                ConfigConnections connStream = new ConfigConnections("MongoDb", "546B0513-D71D-4490-9E27-94CD5D72C64A");
                connStream.Add(name, connectionString);

                e.NewExplorerObject = new MongoDbExplorerObject(this.ParentExplorerObject, name, connectionString);
            }
        }
Ejemplo n.º 8
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormGeoJsonConnection dlg = new FormGeoJsonConnection();

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string connectionString = dlg.ConnectionString;
                string name             = connectionString.ExtractConnectionStringParameter("target");

                ConfigConnections connStream = new ConfigConnections(GeoJsonServiceGroupObject.ConfigName, GeoJsonServiceGroupObject.EncKey);
                connStream.Add(name, connectionString);

                e.NewExplorerObject = new GeoJsonServiceExplorerObject(this.ParentExplorerObject, name, connectionString);
            }
        }
Ejemplo n.º 9
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormNewOgrDataset dlg = new FormNewOgrDataset();

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ConfigConnections connStream = new ConfigConnections("OGR", "ca7011b3-0812-47b6-a999-98a900c4087d");

                string connectionString = dlg.ConnectionString;
                string id = "OGR Connection";
                id = connStream.GetName(id);

                connStream.Add(id, connectionString);
                //e.NewExplorerObject = new OGRExplorerObject(this.ParentExplorerObject, id, dbConnStr);
            }
        }
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            var dlg = new FormVectorTileCacheConnection();

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ConfigConnections connStream = new ConfigConnections("VectorTileCache", "b9d6ae5b-9ca1-4a52-890f-caa4009784d4");

                string connectionString = dlg.ConnectionString;
                string id = dlg.VectorTileCacheName;
                id = connStream.GetName(id);

                connStream.Add(id, connectionString);
                e.NewExplorerObject = new VectorTileCacheDatasetExplorerObject(this.ParentExplorerObject, id, connectionString);
            }
        }
Ejemplo n.º 11
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            if (_connectionString == null)
            {
                return;
            }

            FormMongoDbConnection dlg = new FormMongoDbConnection();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string connectionString = dlg.ConnectionString;

                ConfigConnections connStream = new ConfigConnections("MongoDb", "546B0513-D71D-4490-9E27-94CD5D72C64A");
                connStream.Add(_name, connectionString);

                _connectionString = connectionString;
            }
        }
Ejemplo n.º 12
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormEventTableConnection dlg = new FormEventTableConnection();

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ConfigConnections connStream = new ConfigConnections("eventtable", "546B0513-D71D-4490-9E27-94CD5D72C64A");

                EventTableConnection etconn = new EventTableConnection(
                    dlg.DbConnectionString,
                    dlg.TableName,
                    dlg.IdField, dlg.XField, dlg.YField,
                    dlg.SpatialReference);

                string id = connStream.GetName(dlg.TableName);
                connStream.Add(id, etconn.ToXmlString());

                e.NewExplorerObject = new EventTableObject(this.ParentExplorerObject, id, etconn);
            }
        }
Ejemplo n.º 13
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormConnectionString dlg = new FormConnectionString();

            dlg.ProviderID = "oracle";
            dlg.UseProviderInConnectionString = false;

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                DbConnectionString dbConnStr  = dlg.DbConnectionString;
                ConfigConnections  connStream = new ConfigConnections("oracle", "546B0513-D71D-4490-9E27-94CD5D72C64A");

                string connectionString = dbConnStr.ConnectionString;
                string id = ConfigTextStream.ExtractOracleValue(connectionString, "service_name") + "@" + ConfigTextStream.ExtractOracleValue(connectionString, "host");
                id = connStream.GetName(id);
                connStream.Add(id, dbConnStr.ToString());

                e.NewExplorerObject = new OracleExplorerObject(this.ParentExplorerObject, id, dbConnStr);
            }
        }
Ejemplo n.º 14
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            if (_connectionString == null)
            {
                return;
            }

            FormGeoJsonConnection dlg = new FormGeoJsonConnection();

            dlg.ConnectionString = _connectionString;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string connectionString = dlg.ConnectionString;

                ConfigConnections connStream = new ConfigConnections(GeoJsonServiceGroupObject.ConfigName, GeoJsonServiceGroupObject.EncKey);
                connStream.Add(_name, connectionString);

                _connectionString = connectionString;
            }
        }
Ejemplo n.º 15
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            if (_connectionString == null)
            {
                return;
            }

            FormConnectionString dlg = new FormConnectionString(_connectionString);

            dlg.ProviderID = "oracle";
            dlg.UseProviderInConnectionString = false;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                DbConnectionString dbConnStr = dlg.DbConnectionString;

                ConfigConnections connStream = new ConfigConnections("oracle", "546B0513-D71D-4490-9E27-94CD5D72C64A");
                connStream.Add(_server, dbConnStr.ToString());

                _connectionString = dbConnStr;
            }
        }