Ejemplo n.º 1
0
        private static void SetMax(BorderState bLeft, BorderState bRight)
        {
            var max = (bLeft.Thickness >= bRight.Thickness) ? bLeft : bRight;

            bLeft.Thickness  = max.Thickness;
            bLeft.Color      = max.Color;
            bRight.Thickness = 0;
            bRight.Color     = null;
        }
Ejemplo n.º 2
0
 public GridState()
 {
     Jusitification = TableRowAlignmentValues.Left;
     Borders        = new BorderState[]
     {
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState()
     };
     ClearCellCache();
 }
Ejemplo n.º 3
0
 public CellState(GridState grid = null)
 {
     Grid       = grid;
     VNode      = new VNode();
     TableCells = new List <TableCell>(1);
     Borders    = new BorderState[4]
     {
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState()
     };
     VerticalAlignment   = TableVerticalAlignmentValues.Top;
     HeightRule          = HeightRuleValues.Auto;
     WidthRule           = TableWidthUnitValues.Auto;
     ParagraphProperties = new List <OpenXmlElement>();
     RunProperties       = new List <OpenXmlElement>();
 }
Ejemplo n.º 4
0
 private static bool AreIdentical(BorderState borderA, BorderState borderB) =>
 borderB != null &&
 borderB.Spacing == 0 &&
 borderB.Thickness == borderA.Thickness &&
 borderB.Color == borderA.Color;
Ejemplo n.º 5
0
 private static void RemoveBorder(BorderState border)
 {
     border.Thickness = 0;
     border.Color     = null;
 }