public bool Equals(IXLFill other) { return _patternType == other.PatternType && _patternColor.Equals(other.PatternColor) && _patternBackgroundColor.Equals(other.PatternBackgroundColor) ; }
public bool Equals(IXLFill other) { return (_patternType == other.PatternType && _backgroundColor.Equals(other.BackgroundColor) && _patternColor.Equals(other.PatternColor) ); }
public bool Equals(IXLFill other) { var otherF = other as XLFill; if (otherF == null) { return(false); } return(Key == otherF.Key); }
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 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; } }
internal static XLFillKey GenerateKey(IXLFill defaultFill) { XLFillKey key; if (defaultFill == null) { key = XLFillValue.Default.Key; } else if (defaultFill is XLFill) { key = (defaultFill as XLFill).Key; } else { key = new XLFillKey { PatternType = defaultFill.PatternType, BackgroundColor = defaultFill.BackgroundColor.Key, PatternColor = defaultFill.PatternColor.Key }; } return(key); }
private bool FillsAreEqual(Fill f, IXLFill xlFill) { var nF = new XLFill(); if (f.PatternFill != null) { if (f.PatternFill.PatternType != null) nF.PatternType = f.PatternFill.PatternType.Value.ToClosedXml(); var fColor = GetColor(f.PatternFill.ForegroundColor); if (fColor.HasValue) nF.PatternColor = fColor; var bColor = GetColor(f.PatternFill.BackgroundColor); if (bColor.HasValue) nF.PatternBackgroundColor = bColor; } return nF.Equals(xlFill); }
public XLFill(XLStyle style = null, IXLFill d = null) : this(style, GenerateKey(d)) { }
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 void AplicarEstilo(IXLFill style) { style.BackgroundColor = ColorFondo; style.PatternColor = ColorPatron; style.PatternType = TipoPatron; }