Пример #1
0
 public PolygonLineLayerSymbologyForm(LayerPropertyForm parent, MapLayer mapLayer)
 {
     InitializeComponent();
     _parentForm  = parent;
     _mapLayer    = mapLayer;
     _options     = ((Shapefile)_mapLayer.LayerObject).DefaultDrawingOptions;
     _shpFileType = ((Shapefile)_mapLayer.LayerObject).ShapefileType;
     LineWidthFix.FixLineWidth((Shapefile)_mapLayer.LayerObject);
 }
Пример #2
0
        private void GUI2Options(object sender, EventArgs e)
        {
            if (_noEvents)
            {
                return;
            }

            // fill
            _options.FillVisible = chkFill.Checked;
            _options.FillType    = (tkFillType)cboFillType.SelectedIndex;
            _options.FillColor   = Colors.ColorToUInteger(clpFillColor.Color);

            // hatch
            _options.FillHatchStyle    = (tkGDIPlusHatchStyle)icbHatchType.SelectedIndex;
            _options.FillBgTransparent = chkTransparentBackground.Checked;
            _options.FillBgColor       = Colors.ColorToUInteger(clpHatchBack.Color);

            // gradient
            _options.FillGradientType   = (tkGradientType)cboGradientType.SelectedIndex;
            _options.FillColor2         = Colors.ColorToUInteger(clpGradient2.Color);
            _options.FillRotation       = (double)udGradientRotation.Value;
            _options.FillGradientBounds = (tkGradientBounds)cboGradientBounds.SelectedIndex;

            // outline
            _options.LineStipple = (tkDashStyle)icbLineStyle.SelectedIndex;
            _options.LineWidth   = (float)icbLineWidth.SelectedIndex + 1;
            LineWidthFix.FixLineWidth((Shapefile)_mapLayer.LayerObject);

            _options.LineVisible = chkOutline.Checked;
            _options.LineColor   = Colors.ColorToUInteger(clpOutline.Color);

            // vertices
            _options.VerticesVisible     = chkVertices.Checked;
            _options.VerticesFillVisible = chkVerticesFillVisible.Checked;
            _options.VerticesSize        = (int)udVerticesSize.Value;
            _options.VerticesColor       = Colors.ColorToUInteger(clpVertexColor.Color);
            _options.VerticesType        = (tkVertexType)cboVerticesType.SelectedIndex;

            // transparency
            _options.LineTransparency = (float)transpOutline.Value;
            _options.FillTransparency = (float)transpFill.Value;

            btnApply.Enabled = true;

            DrawPreview();
        }