private void AddTextToOccurrence(XLHFText hfText, XLHFOccurrence occurrence)
 {
     if (texts.ContainsKey(occurrence))
         texts[occurrence].Add(hfText);
     else
         texts.Add(occurrence, new List<XLHFText> { hfText });
 }
Exemple #2
0
 private void AddTextToOccurrence(XLHFText hfText, XLHFOccurrence occurrence)
 {
     if (texts.ContainsKey(occurrence))
     {
         texts[occurrence].Add(hfText);
     }
     else
     {
         texts.Add(occurrence, new List <XLHFText> {
             hfText
         });
     }
 }
Exemple #3
0
        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;
        }
Exemple #4
0
        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;
        }
Exemple #6
0
        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);
        }