/// <summary> /// this function confirm texts from the PageRichTextBox and put them in the PagesListView /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddButton_Click(object sender, EventArgs e) { var newIntro = Utils.AddHtmlBreakLines(PageRichTextBox.Text); if (string.IsNullOrEmpty(newIntro)) { return; } if (listView1.SelectedItems.Count != 0) { PagesDictionary.Remove(this.listView1.SelectedItems[0].Text); } AddPageToPagesDictionary(newIntro); BindListView(); PageRichTextBox.ResetText(); }
/// <summary> /// Clear RichTextBox /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CleanButton_Click(object sender, EventArgs e) { PageRichTextBox.ResetText(); }