private void ClearGraphicsContainer(IMap map)
        {
            var graphicsContainer = map as IGraphicsContainer;

            if (graphicsContainer != null)
            {
                //graphicsContainer.DeleteAllElements();
                // now we have a collection feature and need to not clear those related graphics
                graphicsContainer.Reset();
                var g = graphicsContainer.Next();
                while (g != null)
                {
                    if (!CoordinateAddInPoints.Any(aiPoint => aiPoint.GUID == ((IElementProperties)g).Name))
                    {
                        graphicsContainer.DeleteElement(g);
                    }
                    g = graphicsContainer.Next();
                }
            }
        }
 /// <summary>
 /// Notify if collection list has any items
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CoordinateAddInPoints_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     Mediator.NotifyColleagues(CoordinateConversionLibrary.Constants.CollectListHasItems, CoordinateAddInPoints.Any());
 }
예제 #3
0
 private void ClearListBoxSelection()
 {
     UpdateHighlightedGraphics(true);
     Mediator.NotifyColleagues(CoordinateConversionLibrary.Constants.CollectListHasItems, CoordinateAddInPoints.Any());
 }