private void btnProperties_Click(object sender, EventArgs e)
        {
            if (_selectedItem == null ||
                _selectedItem.Rule == null)
            {
                return;
            }

            SLDRenderer.Rule rule = _selectedItem.Rule;
            FormNewSLDRule   dlg  = new FormNewSLDRule(_layer, rule);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                RendererBox.Refresh();
            }
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            geometryType geomType = geometryType.Unknown;

            if (_layer != null && _layer.FeatureClass != null)
            {
                geomType = _layer.FeatureClass.GeometryType;
            }

            if (geomType == geometryType.Unknown)
            {
                FormGeometrySelector geomSel = new FormGeometrySelector();
                if (geomSel.ShowDialog() != DialogResult.OK ||
                    geomSel.GeometryType == geometryType.Unknown)
                {
                    return;
                }

                geomType = geomSel.GeometryType;
            }

            ISymbol symbol = null;

            switch (geomType)
            {
            case geometryType.Point:
                symbol = new SimplePointSymbol();
                break;

            case geometryType.Polyline:
                symbol = new SimpleLineSymbol();
                break;

            case geometryType.Polygon:
                symbol = new SimpleFillSymbol();
                break;
            }

            FormNewSLDRule newRule = new FormNewSLDRule(_layer,
                                                        new SLDRenderer.Rule(new gView.Framework.OGC.WFS.Filter(GmlVersion.v1), symbol));

            if (newRule.ShowDialog() == DialogResult.OK)
            {
                _renderer.Rules.Add(newRule.Rule);
                RendererBox.Items.Add(new RuleItem(newRule.Rule));
            }
        }