private void mnuSave_Click(object sender, EventArgs e) { //Переключаем фокус на данную форму. blank frm = (blank)this.ActiveMdiChild; //Вызываем метод Save формы blank frm.Save(frm.DocName); frm.IsSaved = true; }
private void mnuSaveAs_Click(object sender, EventArgs e) { if (saveFileDialog1.ShowDialog() == DialogResult.OK) { blank frm = (blank)this.ActiveMdiChild; frm.Save(saveFileDialog1.FileName); frm.MdiParent = this; frm.DocName = saveFileDialog1.FileName; frm.Text = frm.DocName; mnuSave.Enabled = true; frm.IsSaved = true; } }