コード例 #1
0
ファイル: FeatureLayer.cs プロジェクト: joelmuzz/DotSpatial
        /// <summary>
        /// Occurs when setting symbology to a new scheme and allows adding event handlers
        /// </summary>
        /// <param name="scheme">
        /// </param>
        protected virtual void OnIncludeScheme(IFeatureScheme scheme)
        {
            if (scheme == null)
            {
                return;
            }

            scheme.ItemChanged += SchemeItemChanged;
            scheme.SetParentItem(this);
            scheme.SelectFeatures += OnSelectFeatures;
            scheme.DeselectFeatures += OnDeselectFeatures;
        }
コード例 #2
0
 /// <summary>
 /// Occurs when setting the symbology to a new scheme and allows removing event handlers
 /// </summary>
 /// <param name="scheme"></param>
 protected virtual void OnExcludeScheme(IFeatureScheme scheme)
 {
     if (scheme == null) return;
     scheme.ItemChanged -= SchemeItemChanged;
     scheme.SetParentItem(null);
     scheme.SelectFeatures -= OnSelectFeatures;
 }