epubbook/Form1.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using EpubSharp;
namespace epubbook
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
EpubBook epub = null;
string current = "";
private void button1_Click(object sender, EventArgs e)
{
if (treeView1.Nodes.Count != 0)
{
if (Equals(current, "圣墟"))
return;
}
if (!Equals(current, "圣墟"))
{
treeView1.Nodes.Clear();
this.webBrowser1.DocumentText = "";
}
epub = EpubReader.Read("圣墟.epub");
current = "圣墟";
string tittle = string.IsNullOrEmpty(epub.Title) ? "圣墟": epub.Title ;
string[] authors = epub.Authors.ToArray<string>();
foreach (EpubChapter chapter in epub.TableOfContents)
{
string chaptitle = chapter.Title;
string page = chapter.FileName;
TreeNode tn = new TreeNode();
tn.Text = chaptitle;
tn.Tag = page;
ICollection<EpubChapter> subchapters = chapter.SubChapters;
foreach (EpubChapter subchapter in subchapters)
{
tn.Nodes.Add(subchapter.Title);
}
treeView1.Nodes.Add(tn);
}
}
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
后面还有 52 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。