private void toolBarButtonSave_Click(object sender, EventArgs e) { if (this.dockPanel.ActiveContent is FormEdit) { FormEdit form = dockPanel.ActiveContent as FormEdit; form.Save(); } }
private void toolBarButtonSaveAll_Click(object sender, EventArgs e) { foreach (DockContent content in this.dockPanel.Contents) { if (content is FormEdit) { FormEdit form = dockPanel.ActiveContent as FormEdit; form.Save(); } } }