private void BandingToPolygon(GeoDisplayVector vector) { this.txtPolygonArea.Text = (vector as GeoDisplayPolygonRegion).Region.RegionArea.ToString(); this.txtPolygonName.Text = vector.Name; this.comboBoxLinesType.SelectedIndex = this.m_LineStyleIndexDict[(vector.Style as GeoLineStyle).LineDashStyle]; this.pcbLineColor.SelectedColor = vector.Style.Color; this.txtPolygonLinesScale.Text = (vector.Style as GeoLineStyle).LineWidth.ToString(); this.txtPolygonRemark.Text = vector.Comments; List<List<GeoXYPoint>> pointList = new List<List<GeoXYPoint>>(); GeoPolygonRegion region = this.m_CurrentDisplayRegion.Region; foreach (GeoPolygon polygon in region) { List<GeoXYPoint> item = new List<GeoXYPoint>(); foreach (GeoXYPoint point in polygon.Points) { item.Add(point); } pointList.Add(item); } this.BandingToDgv(pointList); }
private static void ParseFieldOfRecord(GeoDisplayVector vectorData, BinaryReader recReader, ArrayList fields) { int num3 = 0; string valueOfProperty = ""; Dictionary<string, string> dictionary = new Dictionary<string, string>(); foreach (FieldDescriptor descriptor in fields) { string str; switch (descriptor.fieldType) { case 'C': valueOfProperty = valueOfProperty + Encoding.Default.GetString(recReader.ReadBytes(descriptor.fieldLen)); break; case 'D': string str2; string str3; string str4; valueOfProperty = ParseData(recReader, valueOfProperty, out str2, out str3, out str4); break; case 'F': str = ParseFloat(recReader, ref valueOfProperty, descriptor); break; case 'L': valueOfProperty = ParseBoolean(recReader, valueOfProperty); break; case 'N': str = ParseNumber(recReader, ref valueOfProperty, descriptor); break; case 'T': { long lJDN = recReader.ReadInt32(); long num2 = recReader.ReadInt32() * 0x2710L; valueOfProperty = valueOfProperty + JulianToDateTime(lJDN).AddTicks(num2); break; } } dictionary.Add(descriptor.fieldName, valueOfProperty); valueOfProperty = ""; num3++; } vectorData.AddFeature("DBFProperties", dictionary); }