示例#1
0
        private bool OpenAndLoadFile(string path)
        {
            if (String.IsNullOrEmpty(path))
            {
                return(false);
            }

            App app = (App)Application.Current;

            app.Novel.Clear();
            app.Headers.Clear();

            NovelFile.Open(path, app.Novel);

            foreach (Content c in app.Novel)
            {
                if (c.IsHeader)
                {
                    app.Headers.Add(c);
                }
            }

            this.Title = "无比简易小说阅读器 - " + path;

            return(true);
        }
示例#2
0
        private bool OpenAndLoadFile(string path)
        {
            if (String.IsNullOrEmpty(path))
            {
                return(false);
            }

            this.m_NovelConents.Clear();
            this.m_CurNovelContents.Clear();
            this.m_NovelChapters.Clear();

            NovelFile.Open(path, this.m_NovelConents);
            foreach (Content c in this.m_NovelConents)
            {
                if (c.IsHeader)
                {
                    this.m_NovelChapters.Add(c);
                }
            }

            return(true);
        }