示例#1
0
        private void ReadLine(XRLine xtraControl, StiContainer parent)
        {
            StiShape shape = new StiShape();

            parent.Components.Add(shape);

            ReadComp(xtraControl, shape);

            ReadBrush(xtraControl, shape);
            ReadTextBrush(xtraControl, shape);
            ReadBorder(xtraControl, shape);

            #region LineDirection
            switch (xtraControl.LineDirection)
            {
            case LineDirection.BackSlant:
                shape.ShapeType = new StiDiagonalDownLineShapeType();
                break;

            case LineDirection.Slant:
                shape.ShapeType = new StiDiagonalUpLineShapeType();
                break;

            case LineDirection.Horizontal:
                shape.ShapeType = new StiHorizontalLineShapeType();
                break;

            case LineDirection.Vertical:
                shape.ShapeType = new StiVerticalLineShapeType();
                break;
            }
            #endregion

            shape.Style       = ConvertBorderDashStyle(xtraControl.LineStyle);
            shape.Size        = xtraControl.LineWidth;
            shape.BorderColor = xtraControl.ForeColor;
        }
示例#2
0
        private void ReadShape(XRShape xtraControl, StiContainer parent)
        {
            StiShape shape = new StiShape();

            parent.Components.Add(shape);

            ReadComp(xtraControl, shape);
            ReadBorder(xtraControl, shape);

            #region Shape
            if (xtraControl.Shape is ShapeRectangle)
            {
                shape.ShapeType = new StiRectangleShapeType();
            }
            else if (xtraControl.Shape is ShapeArrow)
            {
                shape.ShapeType = new StiArrowShapeType();
            }
            else if (xtraControl.Shape is ShapeCross)
            {
                shape.ShapeType = new StiPlusShapeType();
            }
            else if (xtraControl.Shape is ShapeEllipse)
            {
                shape.ShapeType = new StiOvalShapeType();
            }
            else if (xtraControl.Shape is ShapeLine)
            {
                shape.ShapeType = new StiHorizontalLineShapeType();
            }
            #endregion

            shape.Size        = xtraControl.LineWidth;
            shape.BorderColor = xtraControl.ForeColor;
            shape.Brush       = new StiSolidBrush(xtraControl.FillColor);
        }