예제 #1
0
        void restoreMark(NavMark m)
        {
            if ((currentBook == null) || (currentBook.Filename != m.Filename))
            {
            BookInfo inf = BookInfo.TryCreate(m.Filename);

            if (inf == null)
            return;

            currentBook = inf;
            }

            if (docView.Document != currentBook.BookText)
            docView.Document = currentBook.BookText;

            docView.WordPos = m.Position;
        }
예제 #2
0
        public void OpenBook(BookInfo inf)
        {
            PreNavigate(history);

            currentBook = inf;
            docView.Document = currentBook.BookText;

            int pos;

            if ((inf.Filename != null) &&
            config.Bookmarks.TryGetValue(inf.Filename, out pos))
            docView.WordPos = pos;
        }