internal static XLBorderKey GenerateKey(IXLBorder defaultBorder) { XLBorderKey key; if (defaultBorder == null) { key = XLBorderValue.Default.Key; } else if (defaultBorder is XLBorder) { key = (defaultBorder as XLBorder).Key; } else { key = new XLBorderKey { LeftBorder = defaultBorder.LeftBorder, LeftBorderColor = defaultBorder.LeftBorderColor.Key, RightBorder = defaultBorder.RightBorder, RightBorderColor = defaultBorder.RightBorderColor.Key, TopBorder = defaultBorder.TopBorder, TopBorderColor = defaultBorder.TopBorderColor.Key, BottomBorder = defaultBorder.BottomBorder, BottomBorderColor = defaultBorder.BottomBorderColor.Key, DiagonalBorder = defaultBorder.DiagonalBorder, DiagonalBorderColor = defaultBorder.DiagonalBorderColor.Key, DiagonalUp = defaultBorder.DiagonalUp, DiagonalDown = defaultBorder.DiagonalDown, }; } return(key); }
private XLBorderValue(XLBorderKey key) { Key = key; LeftBorderColor = XLColor.FromKey(Key.LeftBorderColor); RightBorderColor = XLColor.FromKey(Key.RightBorderColor); TopBorderColor = XLColor.FromKey(Key.TopBorderColor); BottomBorderColor = XLColor.FromKey(Key.BottomBorderColor); DiagonalBorderColor = XLColor.FromKey(Key.DiagonalBorderColor); }
private XLBorderValue(XLBorderKey key) { Key = key; var leftBorderColor = Key.LeftBorderColor; var rightBorderColor = Key.RightBorderColor; var topBorderColor = Key.TopBorderColor; var bottomBorderColor = Key.BottomBorderColor; var diagonalBorderColor = Key.DiagonalBorderColor; LeftBorderColor = XLColor.FromKey(ref leftBorderColor); RightBorderColor = XLColor.FromKey(ref rightBorderColor); TopBorderColor = XLColor.FromKey(ref topBorderColor); BottomBorderColor = XLColor.FromKey(ref bottomBorderColor); DiagonalBorderColor = XLColor.FromKey(ref diagonalBorderColor); }
public void Deconstruct( out XLAlignmentKey alignment, out XLBorderKey border, out XLFillKey fill, out XLFontKey font, out Boolean includeQuotePrefix, out XLNumberFormatKey numberFormat, out XLProtectionKey protection) { alignment = Alignment; border = Border; fill = Fill; font = Font; includeQuotePrefix = IncludeQuotePrefix; numberFormat = NumberFormat; protection = Protection; }
public XLBorder(IXLStylized container, XLStyle style, XLBorderKey key) : this(container, style, XLBorderValue.FromKey(key)) { }
public static XLBorderValue FromKey(ref XLBorderKey key) { return(Repository.GetOrCreate(ref key)); }