示例#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;
        }
示例#2
0
 public GridState()
 {
     Jusitification = TableRowAlignmentValues.Left;
     Borders        = new BorderState[]
     {
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState(),
         new BorderState()
     };
     ClearCellCache();
 }
示例#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>();
 }
示例#4
0
 private static bool AreIdentical(BorderState borderA, BorderState borderB) =>
 borderB != null &&
 borderB.Spacing == 0 &&
 borderB.Thickness == borderA.Thickness &&
 borderB.Color == borderA.Color;
示例#5
0
 private static void RemoveBorder(BorderState border)
 {
     border.Thickness = 0;
     border.Color     = null;
 }