コード例 #1
0
        private void InitLayerDescriptionTab()
        {
            this.lblGeometryTypeValue.Text     = this._mapLayer.shapeType.ToString();
            this.lblCoordinateSystemValue.Text = this._mapLayer.CoordinateSystem.ToString();
            this.lblFeaturesCountValue.Text    = this._mapLayer.Records.Count.ToString();
            this.numMinScale.Value             = decimal.Parse(this._mapLayer.Tag.Split('-')[0]);
            this.numMaxScale.Value             = decimal.Parse(this._mapLayer.Tag.Split('-')[1]);
            this.txtLayerAliasName.Text        = this._mapLayer.Name;

            LayerProperties.FieldsStructTableTemplate oDataSource = new MapConfigure.LayerProperties.FieldsStructTableTemplate();
            this.dgvFieldsStruct.DataSource = oDataSource;

            foreach (DataColumn col in oDataSource.Columns)
            {
                DataGridViewColumn oViewCol = dgvFieldsStruct.Columns[col.ColumnName];
                oViewCol.HeaderText = col.Caption;
            }

            short iColumnsCount = this._mapLayer.Records.TableDesc.FieldCount;

            for (short i = 0; i < iColumnsCount; i++)
            {
                DataRow drNew = oDataSource.NewRow();

                drNew["FieldName"]   = this._mapLayer.Records.TableDesc.get_FieldName(i);
                drNew["FieldLength"] = (int)this._mapLayer.Records.TableDesc.get_FieldLength(i);
                drNew["FieldType"]   = this._mapLayer.Records.TableDesc.get_FieldType(i).ToString();

                oDataSource.Rows.Add(drNew);
            }
        }
コード例 #2
0
ファイル: frmLayerProperties.cs プロジェクト: uwitec/gvms
        private void InitLayerDescriptionTab()
        {
            this.lblGeometryTypeValue.Text = this._mapLayer.shapeType.ToString();
            this.lblCoordinateSystemValue.Text = this._mapLayer.CoordinateSystem.ToString();
            this.lblFeaturesCountValue.Text = this._mapLayer.Records.Count.ToString();
            this.numMinScale.Value = decimal.Parse(this._mapLayer.Tag.Split('-')[0]);
            this.numMaxScale.Value = decimal.Parse(this._mapLayer.Tag.Split('-')[1]);
            this.txtLayerAliasName.Text = this._mapLayer.Name;

            LayerProperties.FieldsStructTableTemplate oDataSource = new MapConfigure.LayerProperties.FieldsStructTableTemplate();
            this.dgvFieldsStruct.DataSource = oDataSource;

            foreach (DataColumn col in oDataSource.Columns)
            {
                DataGridViewColumn oViewCol = dgvFieldsStruct.Columns[col.ColumnName];
                oViewCol.HeaderText = col.Caption;
            }

            short iColumnsCount = this._mapLayer.Records.TableDesc.FieldCount;

            for (short i = 0; i < iColumnsCount; i++)
            {
                DataRow drNew = oDataSource.NewRow();

                drNew["FieldName"] = this._mapLayer.Records.TableDesc.get_FieldName(i);
                drNew["FieldLength"] = (int)this._mapLayer.Records.TableDesc.get_FieldLength(i);
                drNew["FieldType"] = this._mapLayer.Records.TableDesc.get_FieldType(i).ToString();

                oDataSource.Rows.Add(drNew);
            }
        }