Пример #1
0
        /// <summary>
        /// Fires the ChangesApplied event.
        /// </summary>
        protected virtual void OnChangesApplied()
        {
            //_activeCategory.Expression = sqlExpression.ExpressionText;
            _activeCategory.Expression = expressionDialog1.Expression;
            //CGX save masks
            _activeCategory.UseMask           = maskControl1.UseMask;
            _activeCategory.MaskedLayers      = maskControl1.MaskedLayers;
            _activeCategory.MaskMargin_Top    = maskControl1.MaskMargin_Top;
            _activeCategory.MaskMargin_Bottom = maskControl1.MaskMargin_Bottom;
            _activeCategory.MaskMargin_Left   = maskControl1.MaskMargin_Left;
            _activeCategory.MaskMargin_Right  = maskControl1.MaskMargin_Right;
            if (ChangesApplied != null)
            {
                ChangesApplied(this, EventArgs.Empty);
            }

            if (_original != null)
            {
                _original.CopyProperties(_layer);
                _original.CreateLabels();

                // We have no guarantee that the MapFrame property is set, but redrawing the map is important.
                if (_original.FeatureLayer.MapFrame != null)
                {
                    _original.FeatureLayer.MapFrame.Invalidate();
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Fires the ChangesApplied event.
        /// </summary>
        protected virtual void OnChangesApplied()
        {
            _activeCategory.Expression = sqlExpression.ExpressionText;

            ChangesApplied?.Invoke(this, EventArgs.Empty);

            if (_original != null)
            {
                _original.CopyProperties(_layer);
                _original.CreateLabels();

                // We have no guarantee that the MapFrame property is set, but redrawing the map is important.
                _original.FeatureLayer.MapFrame?.Invalidate();
            }
        }
Пример #3
0
        /// <summary>
        /// Fires the ChangesApplied event.
        /// </summary>
        protected virtual void OnChangesApplied()
        {
            if (ChangesApplied != null)
            {
                ChangesApplied(this, EventArgs.Empty);
            }

            if (_original != null)
            {
                _original.CopyProperties(_layer);
                _original.CreateLabels();

                // We have no guarantee that the MapFrame property is set, but redrawing the map is important.
                if (_original.FeatureLayer.MapFrame != null)
                {
                    _original.FeatureLayer.MapFrame.Invalidate();
                }
            }
        }
Пример #4
0
        public override void Run()
        {
            ILegendItem selectedItem = (GIS.FrameWork.Application.App.Legend as GIS.Common.Dialogs.Legend).SelectedLegendMenuItem;

            if (selectedItem != null)
            {
                if (_labelLayer == null)
                {
                    _labelLayer = new MapLabelLayer(selectedItem as IFeatureLayer);
                    (selectedItem as FeatureLayer).LabelLayer = _labelLayer;
                    (selectedItem as FeatureLayer).ShowLabels = true;
                }

                _labelLayer.CreateLabels();

                FeatureLayerActions fla = new FeatureLayerActions();
                if (fla != null)
                {
                    fla.LabelSetup(_labelLayer);
                }
            }
        }