/// <summary> /// Flashes a single feature. /// </summary> /// <param name="feature">Feature to flash in the map.</param> /// <param name="display">Use this map to flash.</param> public static void FlashFeature(IFeature feature, IScreenDisplay display) { IFeatureIdentifyObj featureIdentifyObj = new FeatureIdentifyObjectClass(); featureIdentifyObj.Feature = feature; (featureIdentifyObj as IIdentifyObj).Flash(display); }
/// <summary> /// Flashes the given feature on the hook's active view /// </summary> /// <param name="msPause">Pause between flashes</param> /// <param name="times">Number of times to flash</param> /// <param name="feature">Feature to flash</param> public void FlashFeature(ESRI.ArcGIS.Geodatabase.IFeature feature, int times, int msPause) { if (null == feature) { throw new ArgumentNullException("feature"); } if (null != this.ActiveView) { ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = this.ActiveView.ScreenDisplay; if (null != screenDisplay) { ESRI.ArcGIS.Carto.IIdentifyObj obj = new FeatureIdentifyObjectClass(); ((ESRI.ArcGIS.Carto.IFeatureIdentifyObj)obj).Feature = feature; for (int i = 0; i < times; i++) { obj.Flash(screenDisplay); System.Threading.Thread.Sleep(msPause); } } } }
private void FlashFeature(IQueryFilter queryFilter) { if (_pipeData == null) _pipeData = new List<string>(); else _pipeData.Clear(); try { ICursor cursor; _hluFeatureSelection = (IFeatureSelection)_hluLayer; _hluFeatureSelection.SelectionSet.Search(queryFilter, true, out cursor); IFeatureCursor featCursor = (IFeatureCursor)cursor; IFeature feature = featCursor.NextFeature(); if (feature != null) { IFeatureIdentifyObj featureIdObj = new FeatureIdentifyObjectClass(); featureIdObj.Feature = feature; IIdentifyObj idObj = (IIdentifyObj)featureIdObj; idObj.Flash(((IMxApplication)_application).Display); } Marshal.ReleaseComObject(featCursor); Marshal.ReleaseComObject(cursor); } catch { } }
/// <summary> /// Flashes the given feature on the hook's active view /// </summary> /// <param name="msPause">Pause between flashes</param> /// <param name="times">Number of times to flash</param> /// <param name="feature">Feature to flash</param> public void FlashFeature(ESRI.ArcGIS.Geodatabase.IFeature feature, int times, int msPause) { if (null == feature) { throw new ArgumentNullException("feature"); } if (null != this.ActiveView) { ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = this.ActiveView.ScreenDisplay; if (null != screenDisplay) { ESRI.ArcGIS.Carto.IIdentifyObj obj = new FeatureIdentifyObjectClass(); ((ESRI.ArcGIS.Carto.IFeatureIdentifyObj)obj).Feature = feature; for (int i = 0; i < times; i++) { obj.Flash(screenDisplay); System.Threading.Thread.Sleep(msPause); } } } }