Пример #1
0
        public frmQuery(string dbConnection, IMap map)
        {
            InitializeComponent();

            connString = dbConnection;
            mainMap = map;

            SpatiaLiteHelper slh = new SpatiaLiteHelper();
            List<GeometryColumnInfo> geometryColumnList = slh.GetGeometryColumns(dbConnection);

            //get names of tables
            List<string> tableNameList = slh.GetTableNames(connString);
            foreach (string tableName in tableNameList)
            {
                try
                {
                    List<string> colNames = slh.GetColumnNames(connString, tableName);
                    TreeNode nTableName = treeTables.Nodes.Add(tableName);
                    foreach (string cn in colNames)
                    {
                        nTableName.Nodes.Add(cn);
                    }
                }
                catch { }
            }
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FrmQuery"/> class.
        /// </summary>
        /// <param name="slh">The SpatiaLiteHelper that is connected to the database.</param>
        /// <param name="map">The map layers get added to.</param>
        public FrmQuery(SpatiaLiteHelper slh, IMap map)
        {
            InitializeComponent();

            _slh     = slh;
            _mainMap = map;

            List <GeometryColumnInfo> geometryColumnList = _slh.GetGeometryColumns();

            // get names of tables
            List <string> tableNameList = slh.GetTableNames();

            foreach (string tableName in tableNameList)
            {
                try
                {
                    List <string> colNames   = slh.GetColumnNames(tableName);
                    TreeNode      nTableName = treeTables.Nodes.Add(tableName);
                    foreach (string cn in colNames)
                    {
                        nTableName.Nodes.Add(cn);
                    }
                }
                catch { }
            }
        }
Пример #3
0
        public frmQuery(string dbConnection, IMap map)
        {
            InitializeComponent();

            connString = dbConnection;
            mainMap    = map;

            SpatiaLiteHelper          slh = new SpatiaLiteHelper();
            List <GeometryColumnInfo> geometryColumnList = slh.GetGeometryColumns(dbConnection);

            //get names of tables
            List <string> tableNameList = slh.GetTableNames(connString);

            foreach (string tableName in tableNameList)
            {
                try
                {
                    List <string> colNames   = slh.GetColumnNames(connString, tableName);
                    TreeNode      nTableName = treeTables.Nodes.Add(tableName);
                    foreach (string cn in colNames)
                    {
                        nTableName.Nodes.Add(cn);
                    }
                }
                catch { }
            }
        }
Пример #4
0
        public frmAddLayer(string dbConnection, IMap map)
        {
            InitializeComponent();

            label2.Text = "Database: " + SQLiteHelper.GetSQLiteFileName(dbConnection);

            connString = dbConnection;
            mainMap = map;

            SpatiaLiteHelper slh = new SpatiaLiteHelper();
            List<GeometryColumnInfo> geometryColumnList = slh.GetGeometryColumns(dbConnection);
            dgGeometryColumns.DataSource = geometryColumnList;
        }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FrmAddLayer"/> class.
        /// </summary>
        /// <param name="slh">The SpatiaLiteHelper that is connected to the SQLite database.</param>
        /// <param name="map">The map the layer will be added to.</param>
        public FrmAddLayer(SpatiaLiteHelper slh, IMap map)
        {
            InitializeComponent();

            label2.Text = string.Format(Resources.Database0, SqLiteHelper.GetSqLiteFileName(slh.ConnectionString));

            _slh     = slh;
            _mainMap = map;

            List <GeometryColumnInfo> geometryColumnList = _slh.GetGeometryColumns();

            dgGeometryColumns.DataSource = geometryColumnList;
        }
Пример #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FrmAddLayer"/> class.
        /// </summary>
        /// <param name="dbConnection">The connectionstring to the SQLite database.</param>
        /// <param name="map">The map the layer will be added to.</param>
        public FrmAddLayer(string dbConnection, IMap map)
        {
            InitializeComponent();

            label2.Text = string.Format(Resources.Database0, SqLiteHelper.GetSqLiteFileName(dbConnection));

            _connString = dbConnection;
            _mainMap    = map;

            SpatiaLiteHelper          slh = new SpatiaLiteHelper();
            List <GeometryColumnInfo> geometryColumnList = slh.GetGeometryColumns(dbConnection);

            dgGeometryColumns.DataSource = geometryColumnList;
        }
Пример #7
0
        public frmAddLayer(string dbConnection, IMap map)
        {
            InitializeComponent();

            label2.Text = "Database: " + SQLiteHelper.GetSQLiteFileName(dbConnection);

            connString = dbConnection;
            mainMap    = map;

            SpatiaLiteHelper          slh = new SpatiaLiteHelper();
            List <GeometryColumnInfo> geometryColumnList = slh.GetGeometryColumns(dbConnection);

            dgGeometryColumns.DataSource = geometryColumnList;
        }