private void newPostToolStripMenuItem_Click(object sender, EventArgs e) { frmPostEditor myPostEditor = new frmPostEditor(); this.Close(); myPostEditor.ShowDialog(); }
//Open the post editor form and prepopulate the editor. protected void excerpt_EditLinkClick(object sender, EventArgs e) { ctlPostExcerpt excerpt = sender as ctlPostExcerpt; frmPostEditor myPostEditor = new frmPostEditor(); myPostEditor.textBoxTitle.Text = excerpt.TitleText; myPostEditor.richTextBoxContent.Text = excerpt.FullContent; myPostEditor.dateTimePicker1.Value = Convert.ToDateTime(excerpt.DateText); myPostEditor.fileName = excerpt.PostFileName; myPostEditor.ActiveControl = null; myPostEditor.ShowDialog(); }