Exemplo n.º 1
0
 protected void AddCellPosition(XRDataCellPosition position)
 {
     foreach (IDataCellBrick innerBrick in this.Bricks)
     {
         innerBrick.CellPosition |= position;
     }
 }
Exemplo n.º 2
0
 protected void RemoveCellPosition(XRDataCellPosition position)
 {
     foreach (IDataCellBrick innerBrick in this.Bricks)
     {
         innerBrick.CellPosition &= ~position;
     }
 }
Exemplo n.º 3
0
 public static void FillHtmlTableCellCore(IHtmlExportProvider exportProvider, BrickStyle style, XRDataCellPosition position)
 {
     using (BrickStyle curStyle = DataCellExportHelper.GetResultingStyle(exportProvider.HtmlExportContext.MainExportMode == HtmlExportMode.SingleFile, style, position))
     {
         DevExpress.XtraPrinting.Export.Web.HtmlBuilderBase.HtmlCellLayout areaLayout = new DevExpress.XtraPrinting.Export.Web.HtmlBuilderBase.HtmlCellLayout(curStyle);
         exportProvider.CurrentCell.Attributes["class"] = RegisterHtmlClassName(exportProvider.HtmlExportContext, curStyle, areaLayout.Borders, areaLayout.Padding);
     }
 }
Exemplo n.º 4
0
        public static BrickStyle GetResultingStyle(bool isSingleFileMode, BrickStyle originalStyle, XRDataCellPosition position)
        {
            BrickStyle style = new BrickStyle(originalStyle);

            style.StringFormat = BrickStringFormat.Create(style.TextAlignment, style.StringFormat.WordWrap);

            BorderSide sides = originalStyle.Sides;

            if (sides.HasFlag(BorderSide.Right) && !position.HasFlag(XRDataCellPosition.RightMost))
            {
                style.Sides &= ~BorderSide.Right;
            }

            if (sides.HasFlag(BorderSide.Bottom) && sides.HasFlag(BorderSide.Top) && !position.HasFlag(XRDataCellPosition.Header))
            {
                style.Sides &= ~BorderSide.Top;
            }

            if (position.HasFlag(XRDataCellPosition.HigherLevel) && sides.HasFlag(BorderSide.Top))
            {
                style.Sides |= BorderSide.Top;
            }
            if (position.HasFlag(XRDataCellPosition.LowerLevel) && sides.HasFlag(BorderSide.Bottom) && sides.HasFlag(BorderSide.Top))
            {
                style.Sides &= ~BorderSide.Bottom;
            }

            if (!isSingleFileMode)
            {
                if (position.HasFlag(XRDataCellPosition.FirstOnPage))
                {
                    style.Sides &= ~BorderSide.Top;
                }
                if (position.HasFlag(XRDataCellPosition.LastOnPage) && sides.HasFlag(BorderSide.Bottom))
                {
                    style.Sides |= BorderSide.Bottom;
                }
            }

            return(style);
        }