public XLStyle(IXLStylized container, IXLStyle initialStyle = null, Boolean useDefaultModify = true) { if (initialStyle != null) { Font = new XLFont(container, initialStyle.Font, useDefaultModify); Alignment = new XLAlignment(container, initialStyle.Alignment); Border = new XLBorder(container, initialStyle.Border, useDefaultModify); Fill = new XLFill(container, initialStyle.Fill, useDefaultModify); NumberFormat = new XLNumberFormat(container, initialStyle.NumberFormat); Protection = new XLProtection(container, initialStyle.Protection); } else { Font = new XLFont(container, null); Alignment = new XLAlignment(container); Border = new XLBorder(container, null); Fill = new XLFill(container); NumberFormat = new XLNumberFormat(container, null); Protection = new XLProtection(container); } DateFormat = NumberFormat; }
public XLNumberFormat(IXLStylized container, IXLNumberFormat defaultNumberFormat) { _container = container; if (defaultNumberFormat == null) return; _numberFormatId = defaultNumberFormat.NumberFormatId; _format = defaultNumberFormat.Format; }
public XLFont(IXLStylized container, IXLFontBase defaultFont, Boolean useDefaultModify = true) { _container = container; if (defaultFont == null) return; _bold = defaultFont.Bold; _italic = defaultFont.Italic; _underline = defaultFont.Underline; _strikethrough = defaultFont.Strikethrough; _verticalAlignment = defaultFont.VerticalAlignment; _shadow = defaultFont.Shadow; _fontSize = defaultFont.FontSize; _fontColor = defaultFont.FontColor; _fontName = defaultFont.FontName; _fontFamilyNumbering = defaultFont.FontFamilyNumbering; if (useDefaultModify) { var d = defaultFont as XLFont; if (d == null) return; BoldModified = d.BoldModified; ItalicModified = d.ItalicModified; UnderlineModified = d.UnderlineModified; StrikethroughModified = d.StrikethroughModified; VerticalAlignmentModified = d.VerticalAlignmentModified; ShadowModified = d.ShadowModified; FontSizeModified = d.FontSizeModified; FontColorModified = d.FontColorModified; FontNameModified = d.FontNameModified; FontFamilyNumberingModified = d.FontFamilyNumberingModified; } }
public XLProtection(IXLStylized container, IXLProtection defaultProtection = null) { _container = container; if (defaultProtection == null) return; _locked = defaultProtection.Locked; _hidden = defaultProtection.Hidden; }
public XLNumberFormat(IXLStylized container, IXLNumberFormat defaultNumberFormat) { _container = container; if (defaultNumberFormat == null) { return; } _numberFormatId = defaultNumberFormat.NumberFormatId; _format = defaultNumberFormat.Format; }
public XLProtection(IXLStylized container, IXLProtection defaultProtection = null) { _container = container; if (defaultProtection == null) { return; } _locked = defaultProtection.Locked; _hidden = defaultProtection.Hidden; }
public XLFill(IXLStylized container, IXLFill defaultFill = null, Boolean useDefaultModify = true) { _container = container; if (defaultFill == null) { return; } _patternType = defaultFill.PatternType; _backgroundColor = defaultFill.BackgroundColor; _patternColor = defaultFill.PatternColor; if (useDefaultModify) { var d = defaultFill as XLFill; } }
public XLAlignment(IXLStylized container, IXLAlignment d = null) { _container = container; if (d == null) { return; } _horizontal = d.Horizontal; _vertical = d.Vertical; _indent = d.Indent; _justifyLastLine = d.JustifyLastLine; _readingOrder = d.ReadingOrder; _relativeIndent = d.RelativeIndent; _shrinkToFit = d.ShrinkToFit; _textRotation = d.TextRotation; _wrapText = d.WrapText; }
public XLFill(IXLStylized container, IXLFill defaultFill = null, Boolean useDefaultModify = true) { _container = container; if (defaultFill == null) { return; } _patternType = defaultFill.PatternType; _patternColor = new XLColor(defaultFill.PatternColor); _patternBackgroundColor = new XLColor(defaultFill.PatternBackgroundColor); if (useDefaultModify) { var d = defaultFill as XLFill; PatternBackgroundColorModified = d.PatternBackgroundColorModified; PatternColorModified = d.PatternColorModified; PatternTypeModified = d.PatternTypeModified; } }
public XLFont(IXLStylized container, IXLFontBase defaultFont, Boolean useDefaultModify = true) { _container = container; if (defaultFont == null) { return; } _bold = defaultFont.Bold; _italic = defaultFont.Italic; _underline = defaultFont.Underline; _strikethrough = defaultFont.Strikethrough; _verticalAlignment = defaultFont.VerticalAlignment; _shadow = defaultFont.Shadow; _fontSize = defaultFont.FontSize; _fontColor = defaultFont.FontColor; _fontName = defaultFont.FontName; _fontFamilyNumbering = defaultFont.FontFamilyNumbering; _fontCharSet = defaultFont.FontCharSet; if (useDefaultModify) { var d = defaultFont as XLFont; if (d == null) { return; } BoldModified = d.BoldModified; ItalicModified = d.ItalicModified; UnderlineModified = d.UnderlineModified; StrikethroughModified = d.StrikethroughModified; VerticalAlignmentModified = d.VerticalAlignmentModified; ShadowModified = d.ShadowModified; FontSizeModified = d.FontSizeModified; FontColorModified = d.FontColorModified; FontNameModified = d.FontNameModified; FontFamilyNumberingModified = d.FontFamilyNumberingModified; FontCharSetModified = d.FontCharSetModified; } }
public XLBorder(IXLStylized container, IXLBorder defaultBorder, Boolean useDefaultModify = true) { _container = container; if (defaultBorder == null) { return; } _leftBorder = defaultBorder.LeftBorder; _leftBorderColor = new XLColor(defaultBorder.LeftBorderColor); _rightBorder = defaultBorder.RightBorder; _rightBorderColor = new XLColor(defaultBorder.RightBorderColor); _topBorder = defaultBorder.TopBorder; _topBorderColor = new XLColor(defaultBorder.TopBorderColor); _bottomBorder = defaultBorder.BottomBorder; _bottomBorderColor = new XLColor(defaultBorder.BottomBorderColor); _diagonalBorder = defaultBorder.DiagonalBorder; _diagonalBorderColor = new XLColor(defaultBorder.DiagonalBorderColor); _diagonalUp = defaultBorder.DiagonalUp; _diagonalDown = defaultBorder.DiagonalDown; if (useDefaultModify) { var d = defaultBorder as XLBorder; BottomBorderColorModified = d.BottomBorderColorModified; BottomBorderModified = d.BottomBorderModified; DiagonalBorderColorModified = d.DiagonalBorderColorModified; DiagonalBorderModified = d.DiagonalBorderModified; DiagonalDownModified = d.DiagonalDownModified; DiagonalUpModified = d.DiagonalUpModified; LeftBorderColorModified = d.LeftBorderColorModified; LeftBorderModified = d.LeftBorderModified; RightBorderColorModified = d.RightBorderColorModified; RightBorderModified = d.RightBorderModified; TopBorderColorModified = d.TopBorderColorModified; TopBorderModified = d.TopBorderModified; } }
public XLStyle(IXLStylized container, IXLStyle initialStyle = null, Boolean useDefaultModify = true) { if (initialStyle != null) { Font = new XLFont(container, initialStyle.Font, useDefaultModify); Alignment = new XLAlignment(container, initialStyle.Alignment); Border = new XLBorder(container, initialStyle.Border, useDefaultModify); Fill = new XLFill(container, initialStyle.Fill, useDefaultModify); NumberFormat = new XLNumberFormat(container, initialStyle.NumberFormat); Protection = new XLProtection(container, initialStyle.Protection); } else { Font = new XLFont(container, null); Alignment = new XLAlignment(container); Border = new XLBorder(container, null); Fill = new XLFill(container); NumberFormat = new XLNumberFormat(container, null); Protection = new XLProtection(container); } DateFormat = NumberFormat; }
public XLBorder(IXLStylized container, XLStyle style = null, IXLBorder d = null) : this(container, style, GenerateKey(d)) { }
public XLBorder(IXLStylized container, XLStyle style, XLBorderKey key) : this(container, style, XLBorderValue.FromKey(key)) { }
/// <summary> /// Create an instance of XLBorder initializing it with the specified value. /// </summary> /// <param name="container">Container the border is applied to.</param> /// <param name="style">Style to attach the new instance to.</param> /// <param name="value">Style value to use.</param> public XLBorder(IXLStylized container, XLStyle style, XLBorderValue value) { _container = container; _style = style ?? _container.Style as XLStyle ?? XLStyle.CreateEmptyStyle(); _value = value; }
public XLStylizedContainer(IXLStyle style, IXLStylized container) { Style = style; _container = container; RangesUsed = container.RangesUsed; }
public XLFill(IXLStylized container, IXLFill defaultFill = null, Boolean useDefaultModify = true) { _container = container; if (defaultFill == null) return; _patternType = defaultFill.PatternType; _patternColor = new XLColor(defaultFill.PatternColor); _patternBackgroundColor = new XLColor(defaultFill.PatternBackgroundColor); if (useDefaultModify) { var d = defaultFill as XLFill; PatternBackgroundColorModified = d.PatternBackgroundColorModified; PatternColorModified = d.PatternColorModified; PatternTypeModified = d.PatternTypeModified; } }
public XLStyle(IXLStylized container, IXLStyle initialStyle = null, Boolean useDefaultModify = true) : this(container, GenerateKey(initialStyle)) { }
public XLStyle(IXLStylized container, XLStyleKey key) : this(container, XLStyleValue.FromKey(key)) { }
internal XLStyle(IXLStylized container, XLStyleValue value) { _container = container ?? new XLStylizedEmpty(XLStyle.Default); Value = value; }
/// <summary> /// To initialize XLStyle.Default only /// </summary> private XLStyle(XLStyleValue value) { _container = null; Value = value; }
public XLStylizedContainer(IXLStyle style, IXLStylized container) { Style = style; _container = container; RangesUsed = container.RangesUsed; }
public XLStylizedContainer(IXLStyle style, IXLStylized container) : base((style as XLStyle).Value) { _container = container; }
public XLBorder(IXLStylized container, IXLBorder defaultBorder, Boolean useDefaultModify = true) { _container = container; if (defaultBorder == null) return; _leftBorder = defaultBorder.LeftBorder; _leftBorderColor = defaultBorder.LeftBorderColor; _rightBorder = defaultBorder.RightBorder; _rightBorderColor = defaultBorder.RightBorderColor; _topBorder = defaultBorder.TopBorder; _topBorderColor = defaultBorder.TopBorderColor; _bottomBorder = defaultBorder.BottomBorder; _bottomBorderColor = defaultBorder.BottomBorderColor; _diagonalBorder = defaultBorder.DiagonalBorder; _diagonalBorderColor = defaultBorder.DiagonalBorderColor; _diagonalUp = defaultBorder.DiagonalUp; _diagonalDown = defaultBorder.DiagonalDown; if (useDefaultModify) { var d = defaultBorder as XLBorder; BottomBorderColorModified = d.BottomBorderColorModified; BottomBorderModified = d.BottomBorderModified; DiagonalBorderColorModified = d.DiagonalBorderColorModified; DiagonalBorderModified = d.DiagonalBorderModified; DiagonalDownModified = d.DiagonalDownModified; DiagonalUpModified = d.DiagonalUpModified; LeftBorderColorModified = d.LeftBorderColorModified; LeftBorderModified = d.LeftBorderModified; RightBorderColorModified = d.RightBorderColorModified; RightBorderModified = d.RightBorderModified; TopBorderColorModified = d.TopBorderColorModified; TopBorderModified = d.TopBorderModified; } }
public XLAlignment(IXLStylized container, IXLAlignment d = null) { _container = container; if (d == null) return; _horizontal = d.Horizontal; _vertical = d.Vertical; _indent = d.Indent; _justifyLastLine = d.JustifyLastLine; _readingOrder = d.ReadingOrder; _relativeIndent = d.RelativeIndent; _shrinkToFit = d.ShrinkToFit; _textRotation = d.TextRotation; _wrapText = d.WrapText; }