private void FlashFeature_ItemClick(object sender, ItemClickEventArgs e) { IFeatureFindData2 tag = null; int num; new ArrayClass(); IEnvelope other = null; for (num = 0; num < this.listView1.SelectedItems.Count; num++) { tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2; if (num == 0) { other = tag.Feature.Shape.Envelope; } else { other.Union(tag.Feature.Shape.Envelope); } } IRelationalOperator extent = this.iactiveView_0.Extent as IRelationalOperator; if (!extent.Contains(other)) { this.iactiveView_0.Extent = other; this.iactiveView_0.Refresh(); this.iactiveView_0.ScreenDisplay.UpdateWindow(); } for (num = 0; num < this.listView1.SelectedItems.Count; num++) { tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2; Flash.FlashFeature(this.iactiveView_0.ScreenDisplay, tag.Feature); } }
private void SelectFeature_ItemClick(object sender, ItemClickEventArgs e) { IFeatureFindData2 tag = null; IArray array = new ArrayClass(); try { for (int i = 0; i < this.listView1.SelectedItems.Count; i++) { tag = this.listView1.SelectedItems[i].Tag as IFeatureFindData2; if (this.ibasicMap_0 is IMap) { (this.ibasicMap_0 as IMap).SelectFeature(tag.Layer, tag.Feature); } array.Add(tag.Feature); } IEnumFeature featureSelection = null; if (this.ibasicMap_0 is IMap) { featureSelection = (this.ibasicMap_0 as IMap).FeatureSelection as IEnumFeature; featureSelection.Reset(); IFeature feature2 = featureSelection.Next(); IEnvelope other = null; while (feature2 != null) { if (other == null) { other = feature2.Extent; } else { other.Union(feature2.Extent); } feature2 = featureSelection.Next(); } if (other != null) { IRelationalOperator extent = (this.ibasicMap_0 as IActiveView).Extent as IRelationalOperator; if (!extent.Contains(other)) { (this.ibasicMap_0 as IActiveView).Extent = other; } } (this.ibasicMap_0 as IActiveView).Refresh(); } } catch (Exception exception) { Logger.Current.Error("", exception, ""); } }
private void Identify_ItemClick(object sender, ItemClickEventArgs e) { IFeatureFindData2 tag = null; IArray array = new ArrayClass(); for (int i = 0; i < this.listView1.SelectedItems.Count; i++) { tag = this.listView1.SelectedItems[i].Tag as IFeatureFindData2; array.Add(tag.Feature); } frmInfo info = new frmInfo { FocusMap = this.iactiveView_0.FocusMap as IBasicMap }; info.SetInfo(null, array, array.get_Element(0) as IFeature); info.ShowDialog(); }
private void ZoomToFeature_ItemClick(object sender, ItemClickEventArgs e) { IFeatureFindData2 tag = null; int num; IArray array = new ArrayClass(); for (num = 0; num < this.listView1.SelectedItems.Count; num++) { tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2; array.Add(tag.Feature); } CommonHelper.Zoom2Features(this.iactiveView_0, array); this.iactiveView_0.ScreenDisplay.UpdateWindow(); for (num = 0; num < this.listView1.SelectedItems.Count; num++) { tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2; Flash.FlashFeature(this.iactiveView_0.ScreenDisplay, tag.Feature); } }
private void ZoomToFeature_ItemClick(object sender, ItemClickEventArgs e) { IFeatureFindData2 tag = null; int num; IArray array = new ArrayClass(); for (num = 0; num < this.listView1.SelectedItems.Count; num++) { tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2; array.Add(tag.Feature); } if (this.ibasicMap_0 is IActiveView) { Yutai.ArcGIS.Common.Helpers.CommonHelper.Zoom2Features(this.ibasicMap_0 as IActiveView, array); (this.ibasicMap_0 as IActiveView).ScreenDisplay.UpdateWindow(); for (num = 0; num < this.listView1.SelectedItems.Count; num++) { tag = this.listView1.SelectedItems[num].Tag as IFeatureFindData2; Flash.FlashFeature((this.ibasicMap_0 as IActiveView).ScreenDisplay, tag.Feature); } } }
private void UnSelectFeature_ItemClick(object sender, ItemClickEventArgs e) { if (this.ibasicMap_0 is IActiveView) { Exception exception; IFeatureFindData2 tag = null; IFeatureSelection layer = null; int[] numArray = new int[1]; (this.ibasicMap_0 as IActiveView).PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null); try { for (int i = 0; i < this.listView1.SelectedItems.Count; i++) { tag = this.listView1.SelectedItems[i].Tag as IFeatureFindData2; layer = tag.Layer as IFeatureSelection; if (layer != null) { numArray[0] = tag.Feature.OID; try { layer.SelectionSet.RemoveList(1, ref numArray[0]); } catch (Exception exception1) { exception = exception1; Logger.Current.Error("", exception, ""); } } } } catch (Exception exception2) { exception = exception2; Logger.Current.Error("", exception, ""); } (this.ibasicMap_0 as IActiveView).PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null); } }