Esempio n. 1
0
        /// <summary>
        /// 深層複製。
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            BraillePageTitle t = new BraillePageTitle();

            t.m_TitleLine      = (BrailleLine)m_TitleLine.Clone();
            t.m_BeginLine      = m_BeginLine;           // BeginLine 純粹是指標,因此不用深層複製。
            t.m_BeginLineIndex = m_BeginLineIndex;
            return(t);
        }
Esempio n. 2
0
        /// <summary>
        /// 從 Lines 集合中取出頁標題,並將標題列自文件中移除。
        /// </summary>
        public void FetchPageTitles()
        {
            m_PageTitles.Clear();

            BrailleLine brLine;
            int idx = 0;
            while (idx < m_Lines.Count)
            {
                brLine = m_Lines[idx];
                if (brLine.ContainsTitleTag())
                {
                    BraillePageTitle title = new BraillePageTitle(this, idx);
                    m_PageTitles.Add(title);
                    m_Lines.RemoveAt(idx);
                }
                else
                {
                    idx++;
                }
            }
        }