private void btnAdd_Click(object sender, EventArgs e)
        {
            if (_renderer == null)
            {
                return;
            }

            FormFeatureRenderers dlg = new FormFeatureRenderers(_layer, FormFeatureRenderers.RendererType.labelRenderer);

            if (dlg.ShowDialog() == DialogResult.OK && dlg.SelectedLabelRenderer != null)
            {
                _renderer.Renderers.Add(dlg.SelectedLabelRenderer);
            }
            BuildList();
        }
Exemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (_renderer == null)
            {
                return;
            }

            FormFeatureRenderers dlg = new FormFeatureRenderers(_layer);

            if (dlg.ShowDialog() == DialogResult.OK && dlg.SelectedFeatureRenderer != null)
            {
                IFeatureRenderer renderer = dlg.SelectedFeatureRenderer;
                if (renderer is SimpleRenderer && _layer != null && _layer.FeatureClass != null)
                {
                    ((SimpleRenderer)renderer).Symbol =
                        ((SimpleRenderer)renderer).CreateStandardSymbol(_layer.LayerGeometryType /*_layer.FeatureClass.GeometryType*/);
                }
                _renderer.Renderers.Add(dlg.SelectedFeatureRenderer);
            }
            BuildList();
        }