コード例 #1
0
ファイル: SLRun.cs プロジェクト: rahmatsyaparudin/KP_Raport
        /// <summary>
        /// Clone a new instance of SLRun.
        /// </summary>
        /// <returns>An SLRun object.</returns>
        public SLRun Clone()
        {
            SLRun r = new SLRun();
            r.Font = this.Font.Clone();
            r.Text = this.Text;

            return r;
        }
コード例 #2
0
ファイル: SLRun.cs プロジェクト: nunezger/berkeleyshoe
        /// <summary>
        /// Clone a new instance of SLRun.
        /// </summary>
        /// <returns>An SLRun object.</returns>
        public SLRun Clone()
        {
            SLRun r = new SLRun();

            r.Font = this.Font.Clone();
            r.Text = this.Text;

            return(r);
        }
コード例 #3
0
        /// <summary>
        /// Get a list of rich text runs.
        /// </summary>
        /// <returns>A list of rich text runs.</returns>
        public List <SLRun> GetRuns()
        {
            List <SLRun> result = new List <SLRun>();
            SLRun        r;

            using (OpenXmlReader oxr = OpenXmlReader.Create(this.istrReal))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(Run))
                    {
                        r = new SLRun();
                        r.FromRun((Run)oxr.LoadCurrentElement());
                        result.Add(r.Clone());
                    }
                }
            }

            return(result);
        }
コード例 #4
0
        /// <summary>
        /// Get a list of rich text runs.
        /// </summary>
        /// <returns>A list of rich text runs.</returns>
        public List<SLRun> GetRuns()
        {
            List<SLRun> result = new List<SLRun>();
            SLRun r;

            using (OpenXmlReader oxr = OpenXmlReader.Create(this.istrReal))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(Run))
                    {
                        r = new SLRun();
                        r.FromRun((Run)oxr.LoadCurrentElement());
                        result.Add(r.Clone());
                    }
                }
            }

            return result;
        }