Пример #1
0
        /// <summary>
        /// Ensures that a persistent field has been associated with a spatial feature.
        /// </summary>
        /// <param name="field">A tag associated with the item</param>
        /// <param name="feature">The feature to assign to the field (not null).</param>
        /// <returns>
        /// True if a matching field was processed. False if the field is not known to this
        /// class (may be known to another class in the type hierarchy).
        /// </returns>
        public bool ApplyFeatureRef(DataField field, Feature feature)
        {
            if (field == DataField.Center)
            {
                PointFeature center = (PointFeature)feature;
                m_Circle = new Circle(center, 0.0);
                center.AddReference(m_Circle);
                return(true);
            }

            if (field == DataField.FirstArc)
            {
                ArcFeature firstArc = (ArcFeature)feature;
                m_Circle = firstArc.Circle;
                return(true);
            }

            return(false);
        }
Пример #2
0
 /// <summary>
 /// Adds references to the features that this dependent is dependent on.
 /// </summary>
 internal void AddReferences()
 {
     m_Center.AddReference(this);
 }