private void TextBox_Edit(object sender, EventArgs e) { SermonViewNew sermonViewEdit = new SermonViewNew(parentForm); sermonViewEdit.SetEditingValues(SermonComponents); foreach (TabPage tabpage in parentForm.tabControl.TabPages) { if (tabpage.Name == sermonViewEdit.Name) { parentForm.tabControl.TabPages.Remove(tabpage); break; } } parentForm.AddNewTabPage(sermonViewEdit); }
private void StartTreeNode_DoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button == MouseButtons.Left) { switch (e.Node.Text.ToUpper()) { case "SERMON/BIBLE STUDY": SermonViewNew.CreateNewSermon(parentForm); break; case "SERIES": Series series = new Series(); series.ShowDialog(); break; } } }
public static void CreateNewSermon(ParentForm parent) { SermonViewNew sermonView = new SermonViewNew(parent); parent.AddNewTabPage(sermonView); }
/// <summary> /// Occurs when the Sermon MenuItem is clicked. /// </summary> /// <param name="sender">Control that initiated the event.</param> /// <param name="e">Event arguments.</param> public void SermonToolStripMenuItem_Click(object sender, EventArgs e) { SermonViewNew.CreateNewSermon(this); }