Beispiel #1
0
        /// <summary>
        /// This builds the _drawnStates based on the current label scheme.
        /// </summary>
        protected void CreateIndexedLabels()
        {
            if (FeatureSet == null)
            {
                return;
            }
            FastDrawnStates = new FastLabelDrawnState[FeatureSet.ShapeIndices.Count];

            //DataTable dt = _featureSet.DataTable; // if working correctly, this should auto-populate
            if (Symbology == null)
            {
                return;
            }

            foreach (ILabelCategory category in Symbology.Categories)
            {
                if (category.FilterExpression != null)
                {
                    List <int> features = FeatureSet.SelectIndexByAttribute(category.FilterExpression);
                    foreach (int feature in features)
                    {
                        FastDrawnStates[feature] = new FastLabelDrawnState(category);
                    }
                }
                else
                {
                    for (int i = 0; i < FastDrawnStates.Length; i++)
                    {
                        FastDrawnStates[i] = new FastLabelDrawnState(category);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// This builds the _drawnStates based on the current label scheme.
        /// </summary>
        protected void CreateIndexedLabels()
        {
            if (_featureSet == null) return;
            _fastDrawnStates = new FastLabelDrawnState[_featureSet.ShapeIndices.Count];

            //DataTable dt = _featureSet.DataTable; // if working correctly, this should auto-populate
            if (Symbology == null) return;

            foreach (ILabelCategory category in Symbology.Categories)
            {
                if (category.FilterExpression != null)
                {
                    List<int> features = FeatureSet.SelectIndexByAttribute(category.FilterExpression);
                    foreach (int feature in features)
                    {
                        _fastDrawnStates[feature] = new FastLabelDrawnState(category);
                    }
                }
                else
                {
                    for (int i = 0; i < _fastDrawnStates.Length; i++)
                    {
                        _fastDrawnStates[i] = new FastLabelDrawnState(category);
                    }
                }
            }
        }