Example #1
0
        private void WriteWorkSheet_HeaderFooter_Attribute(HeaderFooter sheetFooter, XElement headerFooterNode)
        {
            if (sheetFooter.AlignWithMargins == false)
                headerFooterNode.Add(new XAttribute(XName.Get("alignWithMargins"), 0));

            if (sheetFooter.DifferentOddEven)
                headerFooterNode.Add(new XAttribute(XName.Get("differentOddEven"), 1));

            if (sheetFooter.AlignWithMargins == false)
                headerFooterNode.Add(new XAttribute(XName.Get("alignWithMargins"), 0));

            if (sheetFooter.ScaleWithDoc == false)
                headerFooterNode.Add(new XAttribute(XName.Get("scaleWithDoc"), 0));
        }
Example #2
0
        private void ReadWorkSheet_headerFooter_Image(HeaderFooter headerFooter, ref HeaderFooterText headerFooterText, string tag)
        {
            if (headerFooter._Pictures != null)
            {
                //偶数页眉  <evenHeader> // 右 "RHEVEN"  中间 “CHEVEN", 左 "LHEVEN" 
                //首页页眉  <firstHeader> // 右 ”RHFIRST“ 中间 "CHFIRST" 左 "LHFIRST"
                //奇数页眉  <oddHeader>  // 右 “RH”  中 "CH"  左 "LH"

                //奇数页脚  <oddFooter>   //F
                //偶数页脚  <evenFooter>  //CFEVEN 
                //首页页脚  <firstFooter>   FFIRST
                string key = string.Format("{0}{1}", "R", tag);
                if (headerFooter._Pictures.ContainsKey(key))
                {
                    headerFooterText.RightAlignedImag = headerFooter._Pictures[key];
                    headerFooter._Pictures.Remove(key);
                }
                key = string.Format("{0}{1}", "C", tag);
                if (headerFooter._Pictures.ContainsKey(key))
                {
                    headerFooterText.CenteredImag = headerFooter._Pictures[key];
                    headerFooter._Pictures.Remove(key);
                }
                key = string.Format("{0}{1}", "L", tag);
                if (headerFooter._Pictures.ContainsKey(key))
                {
                    headerFooterText.LeftImag = headerFooter._Pictures[key];
                    headerFooter._Pictures.Remove(key);
                }
            }
        }
		internal HeaderFooterText(HeaderFooter headerFooter, string text)
		{
			this._HeaderFooter = headerFooter;
			this.code = text;
		}
 internal HeaderFooterText(HeaderFooter headerFooter, string text)
 {
     this._HeaderFooter = headerFooter;
     this.code          = text;
 }