/// <summary> /// 添加章节 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addChapterToolStripMenuItem_Click(object sender, EventArgs e) { AddChapterForm acForm = new AddChapterForm(++maxChapId); acForm.ShowDialog(); if (acForm.isOK) { Model.Chapter chap = new Model.Chapter(); chap.Cid = acForm.cid; chap.Name = acForm.cName; chap.IsEmpty = acForm.isEmpty; if (acForm.cContent != "") { chap.Content = new Model.novel_chapter_content(); chap.Content.cid = chap.Cid; chap.Content.content = acForm.cContent; chap.IsUpdate = true; } allChaps.Add(chap); allChapterCount++; allPage = (allChapterCount - 1) / everyPageCount + 1; acForm.Dispose(); statusLabel.Text = "添加成功!请刷新查看"; } else { statusLabel.Text = "添加已取消"; } }
/// <summary> /// 添加章节 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addChapterToolStripMenuItem_Click(object sender, EventArgs e) { AddChapterForm acForm = new AddChapterForm(++maxChapId); acForm.ShowDialog(); if (acForm.isOK) { Model.Chapter chap = new Model.Chapter(); chap.Cid = acForm.cid; chap.Name = acForm.cName; chap.IsEmpty = acForm.isEmpty; if (acForm.cContent != "") { chap.Content = new Model.novel_chapter_content(); chap.Content.cid = chap.Cid; chap.Content.content = acForm.cContent; chap.IsUpdate = true; } allChaps.Add(chap); allChapterCount++; allPage = (allChapterCount - 1) / everyPageCount + 1; acForm.Dispose(); statusLabel.Text = "添加成功!请刷新查看"; } else { statusLabel.Text = "添加已取消"; } }