private List <ISpatialElement> GetElementViewSpatialElements(MapElementView mapView)
        {
            MapBindingFieldPairCollection mapBindingFieldPairs = mapView.MapBindingFieldPairs;

            if (mapBindingFieldPairs == null)
            {
                return(null);
            }
            SpatialElementKey      obj  = VectorLayerMapper.CreateDataRegionSpatialElementKey(mapBindingFieldPairs);
            List <ISpatialElement> list = null;

            foreach (KeyValuePair <SpatialElementKey, SpatialElementInfoGroup> item in this.m_spatialElementsDictionary)
            {
                foreach (SpatialElementInfo element in item.Value.Elements)
                {
                    if (SpatialDataMapper.CreateCoreSpatialElementKey(element.CoreSpatialElement, mapView.MapBindingFieldPairs, this.m_mapVectorLayer.MapDef.Name, this.m_mapVectorLayer.Name).Equals(obj))
                    {
                        if (list == null)
                        {
                            list = new List <ISpatialElement>();
                        }
                        list.Add(element.CoreSpatialElement);
                    }
                }
            }
            return(list);
        }
        private string GetElementViewLayerName(MapElementView mapView)
        {
            ReportStringProperty layerName = mapView.LayerName;

            if (!layerName.IsExpression)
            {
                return(layerName.Value);
            }
            return(mapView.Instance.LayerName);
        }
 private void AddSpatialElementToView(MapElementView mapView)
 {
     if (!(this.GetElementViewLayerName(mapView) != this.m_mapVectorLayer.Name))
     {
         List <ISpatialElement> elementViewSpatialElements = this.GetElementViewSpatialElements(mapView);
         if (elementViewSpatialElements != null)
         {
             foreach (ISpatialElement item in elementViewSpatialElements)
             {
                 this.m_mapMapper.AddSpatialElementToView(item);
             }
         }
         else
         {
             foreach (KeyValuePair <SpatialElementKey, SpatialElementInfoGroup> item2 in this.m_spatialElementsDictionary)
             {
                 this.AddSpatialElementGroupToView(item2.Value);
             }
         }
     }
 }
 public MapElementViewInstance(MapElementView defObject)
     : base(defObject)
 {
     this.m_defObject = defObject;
 }