コード例 #1
0
ファイル: frmQuery.cs プロジェクト: ExRam/DotSpatial-PCL
        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
ファイル: frmQuery.cs プロジェクト: sprashant80/DotSpatial-1
        /// <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
ファイル: frmQuery.cs プロジェクト: vahidarr/DotSpatial
        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 { }
            }
        }