public static DashStyle DashStyle(IExportGraphics exportGraphics)
        {
            var dashStyle = DashStyles.Solid;

            switch (exportGraphics.DashStyle)
            {
            case System.Drawing.Drawing2D.DashStyle.Solid:
                dashStyle = DashStyles.Solid;
                break;

            case System.Drawing.Drawing2D.DashStyle.Dash:
                dashStyle = DashStyles.Dash;
                break;

            case System.Drawing.Drawing2D.DashStyle.Dot:
                dashStyle = DashStyles.Dot;
                break;

            case System.Drawing.Drawing2D.DashStyle.DashDot:
                dashStyle = DashStyles.DashDot;
                break;

            case System.Drawing.Drawing2D.DashStyle.DashDotDot:
                dashStyle = DashStyles.DashDotDot;
                break;

            case System.Drawing.Drawing2D.DashStyle.Custom:
                dashStyle = DashStyles.Solid;
                break;

            default:
                throw new Exception("Invalid value for DashStyle");
            }
            return(dashStyle);
        }
Пример #2
0
        public static XDashStyle DashStyle(IExportGraphics column)
        {
            XDashStyle style = XDashStyle.Solid;

            switch (column.DashStyle) {
                case System.Drawing.Drawing2D.DashStyle.Solid:
                    style = XDashStyle.Solid;
                    break;
                case System.Drawing.Drawing2D.DashStyle.Dash:
                    style  = XDashStyle.Dash;
                    break;
                case System.Drawing.Drawing2D.DashStyle.Dot:
                    style = XDashStyle.Dot;
                    break;
                case System.Drawing.Drawing2D.DashStyle.DashDot:
                    style = XDashStyle.DashDot;
                    break;
                case System.Drawing.Drawing2D.DashStyle.DashDotDot:
                    style = XDashStyle.DashDotDot;
                    break;
                case System.Drawing.Drawing2D.DashStyle.Custom:

                    break;
                default:
                    throw new Exception("Invalid value for DashStyle");
            }
            return style;
        }
Пример #3
0
        public static XDashStyle DashStyle(IExportGraphics column)
        {
            XDashStyle style = XDashStyle.Solid;

            switch (column.DashStyle)
            {
            case System.Drawing.Drawing2D.DashStyle.Solid:
                style = XDashStyle.Solid;
                break;

            case System.Drawing.Drawing2D.DashStyle.Dash:
                style = XDashStyle.Dash;
                break;

            case System.Drawing.Drawing2D.DashStyle.Dot:
                style = XDashStyle.Dot;
                break;

            case System.Drawing.Drawing2D.DashStyle.DashDot:
                style = XDashStyle.DashDot;
                break;

            case System.Drawing.Drawing2D.DashStyle.DashDotDot:
                style = XDashStyle.DashDotDot;
                break;

            case System.Drawing.Drawing2D.DashStyle.Custom:

                break;

            default:
                throw new Exception("Invalid value for DashStyle");
            }
            return(style);
        }
Пример #4
0
        public static XPen CreateDashedPen(IExportGraphics exportRectangle)
        {
            var pen = PdfHelper.PdfPen(exportRectangle);

            pen.DashStyle = PdfHelper.DashStyle(exportRectangle);
            return(pen);
        }
Пример #5
0
 public static XLineCap LineCap(IExportGraphics column)
 {
     return XLineCap.Round;
 }
Пример #6
0
 public static XPen CreatePen(IExportGraphics exportRectangle)
 {
     var pen = PdfHelper.PdfPen(exportRectangle);
     pen.DashStyle = PdfHelper.DashStyle(exportRectangle);
     return pen;
 }
Пример #7
0
 public static XPen PdfPen(IExportGraphics column)
 {
     return new XPen(ToXColor(column.ForeColor),column.Thickness);
 }
        public static DashStyle DashStyle(IExportGraphics exportGraphics)
        {
            var dashStyle = DashStyles.Solid;

            switch (exportGraphics.DashStyle) {
                case System.Drawing.Drawing2D.DashStyle.Solid:
                    dashStyle = DashStyles.Solid;
                    break;
                case System.Drawing.Drawing2D.DashStyle.Dash:
                    dashStyle = DashStyles.Dash;
                    break;
                case System.Drawing.Drawing2D.DashStyle.Dot:
                    dashStyle = DashStyles.Dot;
                    break;
                case System.Drawing.Drawing2D.DashStyle.DashDot:
                    dashStyle = DashStyles.DashDot;
                    break;
                case System.Drawing.Drawing2D.DashStyle.DashDotDot:
                    dashStyle = DashStyles.DashDotDot;
                    break;
                case System.Drawing.Drawing2D.DashStyle.Custom:
                    dashStyle = DashStyles.Solid;
                    break;
                default:
                    throw new Exception("Invalid value for DashStyle");
            }
            return dashStyle;
        }
Пример #9
0
 public static XLineCap LineCap(IExportGraphics column)
 {
     return(XLineCap.Round);
 }
Пример #10
0
 public static XPen PdfPen(IExportGraphics column)
 {
     return(new XPen(ToXColor(column.ForeColor), column.Thickness));
 }