private bool MatchClasses(IStylable w) { int i = 0, j = 0; foreach (var cls in w.Classes) { if (cls == _classes[i]) { if (j != 0) { return(false); } i++; j = 0; if (i >= _classes.Count) { return(true); } continue; } else if (i != 0) { j++; } } return(false); }
internal ExcelStyle(IStylable stylable, DocumentStyles styles, uint?baseStyleIndex, bool?isHead = false) { this._stylable = stylable; this._styles = styles; this.StyleIndex = baseStyleIndex; if (isHead.HasValue) { this.SetAlignmentCenter = isHead.Value; } }
public T1 GetStyle <T, T1>(IStylable <T, T1> stylable) where T1 : Style <T>, new() where T : Control { T1 style = new T1(); style.Apply(_styles[stylable.ComponentType]["default"]); ApplyStyle(style, stylable.Component, stylable.ComponentType); return(style); }
internal ExcelFill(IStylable stylable, DocumentStyles styles, uint?fillId) { _stylable = stylable; _styles = styles; _fillId = fillId; if (_fillId != null) { FillObject = (Fill)_styles.GetFill(_fillId.Value).CloneNode(true); } else { FillObject = new Fill(); } }
public ExcelBorder(IStylable stylable, DocumentStyles styles, uint?borderId) { _stylable = stylable; _styles = styles; _borderId = borderId; if (_borderId != null) { BorderObject = (Border)_styles.GetBorder(_borderId.Value).CloneNode(true); } else { BorderObject = new Border(); } }
public ExcelBorder(IStylable stylable, DocumentStyles styles, uint?borderId) { this._stylable = stylable; this._styles = styles; this._borderId = borderId; if (this._borderId.HasValue) { this.BorderObject = (Border)this._styles.GetBorder(this._borderId.Value).CloneNode(true); } else { this.BorderObject = new Border(); } }
internal ExcelFont(IStylable stylable, DocumentStyles styles, uint?fontId) { _stylable = stylable; _styles = styles; _fontId = fontId; if (_fontId != null) { FontObject = (Font)_styles.GetFont(_fontId.Value).CloneNode(true); } else { FontObject = new Font(); } }
internal ExcelFont(IStylable stylable, DocumentStyles styles, uint?fontId) { this._stylable = stylable; this._styles = styles; this._fontId = fontId; if (this._fontId.HasValue) { this.FontObject = (Font)this._styles.GetFont(this._fontId.Value).CloneNode(true); } else { this.FontObject = new Font(); } }
internal ExcelFill(IStylable stylable, DocumentStyles styles, uint?fillId) { this._stylable = stylable; this._styles = styles; this._fillId = fillId; if (this._fillId.HasValue) { this.FillObject = (Fill)this._styles.GetFill(this._fillId.Value).CloneNode(true); } else { this.FillObject = new Fill(); } }
public void UnApply(IStylable styleable) { throw new NotImplementedException(); }
internal ExcelStyle(IStylable stylable, DocumentStyles styles, uint?baseStyleIndex) { _stylable = stylable; _styles = styles; this.StyleIndex = baseStyleIndex; }
internal ExcelNumberFormat(IStylable stylable, DocumentStyles styles, uint numFmtId) { _stylable = stylable; _styles = styles; NumFmtId = numFmtId; }