/// <summary> /// Apply changes /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void applyButton_Click(object sender, EventArgs e) { if (section != null) { section.SetTitle(titleBox.Text); section.SetOpen(isOpenCheckbox.Checked); } else { editor.content.AddSection(titleBox.Text, isOpenCheckbox.Checked); } editor.RefreshGrid(); Dispose(); }
/// <summary> /// Apply changes /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void applyButton_Click(object sender, EventArgs e) { if (topic != null) { topic.SetTitle(titleBox.Text); topic.SetOpen(isOpenCheckbox.Checked); if (sectionBox.SelectedIndex != sectionIndex) { editor.content.TransferTopic(topic, section, editor.content.GetSections()[sectionBox.SelectedIndex]); } } else { editor.content.AddTopic(section, titleBox.Text, isOpenCheckbox.Checked); } editor.RefreshGrid(); Dispose(); }