Beispiel #1
0
        private void UpdateChapter()
        {
            var form  = new AddChapterForm();
            var index = listViewEpubItems.SelectedIndices[0];
            var row   = rows[index];

            form.PopulateControlsForUpdate(epub, row.Item);
            if (form.ShowDialog() == DialogResult.OK)
            {
                PopulateListView();
            }
        }
Beispiel #2
0
        private void insertAfterSelectedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form  = new AddChapterForm();
            var index = listViewEpubItems.SelectedIndices[0];
            var row   = rows[index];

            if (index == rows.Count)
            {
                System.Diagnostics.Trace.WriteLine("Can't insert after last item in epub.");
                return;
            }

            form.PopulateControls(epub, rows[index + 1].Item, row.Title.ExtractProbableChapterNumber() + 1);
            if (form.ShowDialog() == DialogResult.OK)
            {
                PopulateListView();
            }
        }