Esempio n. 1
0
        public void copy2(ref ClassBorders extBorders)
        {
            extBorders.AlwaysInFront = this.AlwaysInFront;
            //extBorders.Count = this.Count;
            //extBorders.Creator = this.Creator;


            try
            {
                extBorders.DistanceFrom       = this.DistanceFrom;
                extBorders.DistanceFromBottom = this.DistanceFromBottom;
                extBorders.DistanceFromLeft   = this.DistanceFromLeft;
                extBorders.DistanceFromRight  = this.DistanceFromRight;
                extBorders.DistanceFromTop    = this.DistanceFromTop;
            }
            catch (System.Exception ex)
            {
            }
            finally
            {
            }


            extBorders.Enable = this.Enable;
            extBorders.EnableFirstPageInSection  = this.EnableFirstPageInSection;
            extBorders.EnableOtherPagesInSection = this.EnableOtherPagesInSection;
            //extBorders.HasHorizontal = this.HasHorizontal;
            //extBorders.HasVertical = this.HasVertical;
            extBorders.InsideColor       = this.InsideColor;
            extBorders.InsideColorIndex  = this.InsideColorIndex;
            extBorders.InsideLineStyle   = this.InsideLineStyle;
            extBorders.InsideLineWidth   = this.InsideLineWidth;
            extBorders.JoinBorders       = this.JoinBorders;
            extBorders.OutsideColor      = this.OutsideColor;
            extBorders.OutsideColorIndex = this.OutsideColorIndex;
            extBorders.OutsideLineStyle  = this.OutsideLineStyle;
            extBorders.OutsideLineWidth  = this.OutsideLineWidth;
            extBorders.Shadow            = this.Shadow;
            extBorders.SurroundFooter    = this.SurroundFooter;
            extBorders.SurroundHeader    = this.SurroundHeader;


            ClassBorder classbd = null;

            for (int i = (int)WdBorderType.wdBorderVertical; i <= (int)WdBorderType.wdBorderTop; i++)
            {
                classbd = (ClassBorder)m_hashBorder[(WdBorderType)i];

                if (classbd != null)
                {
                    ClassBorder bd = extBorders[(WdBorderType)i];

                    classbd.copy2(ref bd);
                }
            }

            return;
        }
Esempio n. 2
0
        //////////////////////////
        public void clone(ClassBorders obds)
        {
            this.AlwaysInFront             = obds.AlwaysInFront;
            this.Count                     = obds.Count;
            this.Creator                   = obds.Creator;
            this.DistanceFrom              = obds.DistanceFrom;
            this.DistanceFromBottom        = obds.DistanceFromBottom;
            this.DistanceFromLeft          = obds.DistanceFromLeft;
            this.DistanceFromRight         = obds.DistanceFromRight;
            this.DistanceFromTop           = obds.DistanceFromTop;
            this.Enable                    = obds.Enable;
            this.EnableFirstPageInSection  = obds.EnableFirstPageInSection;
            this.EnableOtherPagesInSection = obds.EnableOtherPagesInSection;
            this.HasHorizontal             = obds.HasHorizontal;
            this.HasVertical               = obds.HasVertical;
            this.InsideColor               = obds.InsideColor;
            this.InsideColorIndex          = obds.InsideColorIndex;
            this.InsideLineStyle           = obds.InsideLineStyle;
            this.InsideLineWidth           = obds.InsideLineWidth;
            this.JoinBorders               = obds.JoinBorders;
            this.OutsideColor              = obds.OutsideColor;
            this.OutsideColorIndex         = obds.OutsideColorIndex;
            this.OutsideLineStyle          = obds.OutsideLineStyle;
            this.OutsideLineWidth          = obds.OutsideLineWidth;
            this.Shadow                    = obds.Shadow;
            this.SurroundFooter            = obds.SurroundFooter;
            this.SurroundHeader            = obds.SurroundHeader;

            this.m_hashBorder.Clear();


            ClassBorder bd = null;

            for (int i = (int)WdBorderType.wdBorderVertical; i <= (int)WdBorderType.wdBorderTop; i++)
            {
                bd = (ClassBorder)obds[(WdBorderType)i];

                if (bd != null)
                {
                    ClassBorder classBd = new ClassBorder();
                    classBd.clone(bd);

                    m_hashBorder[i] = classBd;
                }
            }

            return;
        }