Beispiel #1
0
        /* Instance Methods */

        /// <summary>
        /// Makes a copy of this <code>PageFormat</code> with the same
        /// contents as this <code>PageFormat</code>. </summary>
        /// <returns> a copy of this <code>PageFormat</code>. </returns>
        public virtual Object Clone()
        {
            PageFormat newPage;

            try
            {
                newPage        = (PageFormat)base.Clone();
                newPage.MPaper = (Paper)MPaper.Clone();
            }
            catch (CloneNotSupportedException e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
                newPage = null;                 // should never happen.
            }

            return(newPage);
        }