private void method_1(IFeatureLayer featureLayer) { IFeatureClass featureClass = featureLayer.FeatureClass; ISpatialFilter spatialFilterClass = new SpatialFilter(); spatialFilterClass.Geometry = (this.m_pBufferGeo); spatialFilterClass.SpatialRel = (esriSpatialRelEnum)(1); IFeatureCursor featureCursor = featureClass.Search(spatialFilterClass, false); IFeature feature = featureCursor.NextFeature(); int count = this.dataGridView3.Columns.Count; while (feature != null) { int length = "esriGeometry".Length; featureClass.Fields.FindField(featureLayer.FeatureClass.ShapeFieldName); string str = featureLayer.FeatureClass.ShapeType.ToString(); string str1 = str.Remove(0, length); bool flag = false; this.dataGridView3.Rows.Add(new object[] { "" }); this.dataGridView3[0, this.m_nRow].Value = featureLayer.Name; for (int i = 1; i < count; i++) { if (this.dataGridView3.Columns[i].Name != featureLayer.FeatureClass.ShapeFieldName) { int num = featureClass.Fields.FindField(this.dataGridView3.Columns[i].Name); if (num != -1) { string name = feature.Fields.get_Field(num).Name; if (!(name != "起点管顶高程" ? true : !flag)) { this.dataGridView3.Rows[this.m_nRow].Cells[name].Value = ""; this.dataGridView3.Rows[this.m_nRow].Cells["起点管底高程"].Value = feature.get_Value(num).ToString(); } else if ((name != "终点管顶高程" ? true : !flag)) { this.dataGridView3.Rows[this.m_nRow].Cells[name].Value = feature.get_Value(num).ToString(); } else { this.dataGridView3.Rows[this.m_nRow].Cells[name].Value = ""; this.dataGridView3.Rows[this.m_nRow].Cells["终点管底高程"].Value = feature.get_Value(num).ToString(); } } } else { this.dataGridView3[i, this.m_nRow].Value = str1; } } ResultDialog mNRow = this; mNRow.m_nRow = mNRow.m_nRow + 1; feature = featureCursor.NextFeature(); } }
private void timer_0_Tick(object obj, EventArgs eventArg) { ResultDialog mNTimerCounter = this; mNTimerCounter.m_nTimerCounter = mNTimerCounter.m_nTimerCounter + 1; if (this.m_nTimerCounter <= 20) { this.FlashDstItem(); } else { this.timer_0.Stop(); this.m_nTimerCounter = 0; } }