private void AddTextToOccurrence(XLHFText hfText, XLHFOccurrence occurrence) { if (texts.ContainsKey(occurrence)) texts[occurrence].Add(hfText); else texts.Add(occurrence, new List<XLHFText> { hfText }); }
private void AddTextToOccurrence(XLHFText hfText, XLHFOccurrence occurrence) { if (texts.ContainsKey(occurrence)) { texts[occurrence].Add(hfText); } else { texts.Add(occurrence, new List <XLHFText> { hfText }); } }
private void AddTextToOccurrence(XLHFText hfText, XLHFOccurrence occurrence) { if (texts.ContainsKey(occurrence)) { texts[occurrence].Add(hfText); } else { texts.Add(occurrence, new List <XLHFText> { hfText }); } this.HeaderFooter.Changed = true; }
private void AddTextToOccurrence(XLHFText hfText, XLHFOccurrence occurrence) { if (texts.TryGetValue(occurrence, out List <XLHFText> hfTexts)) { hfTexts.Add(hfText); } else { texts.Add(occurrence, new List <XLHFText> { hfText }); } this.HeaderFooter.Changed = true; }
public IXLRichString AddText(String text, XLHFOccurrence occurrence) { XLRichString richText = new XLRichString(text, XLWorkbook.DefaultStyle.Font, this); var hfText = new XLHFText(richText, _worksheet); if (occurrence == XLHFOccurrence.AllPages) { AddTextToOccurrence(hfText, XLHFOccurrence.EvenPages); AddTextToOccurrence(hfText, XLHFOccurrence.FirstPage); AddTextToOccurrence(hfText, XLHFOccurrence.OddPages); } else { AddTextToOccurrence(hfText, occurrence); } return richText; }
public IXLRichString AddText(String text, XLHFOccurrence occurrence) { XLRichString richText = new XLRichString(text, XLWorkbook.DefaultStyle.Font, this); var hfText = new XLHFText(richText, _worksheet); if (occurrence == XLHFOccurrence.AllPages) { AddTextToOccurrence(hfText, XLHFOccurrence.EvenPages); AddTextToOccurrence(hfText, XLHFOccurrence.FirstPage); AddTextToOccurrence(hfText, XLHFOccurrence.OddPages); } else { AddTextToOccurrence(hfText, occurrence); } return(richText); }