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 { } } }
/// <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 { } } }
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 { } } }