private void OpenView(string name) { View v = metaDbContainer.ViewSet.First(x => x.Name == name); ViewForm vf = new ViewForm(metaDbContainer, dbConnection, v); vf.MdiParent = this; vf.Show(); }
private void DeleteView(string name) { if (MessageBox.Show("Удалить форму?", "Удаление формы", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } View.Remove(metaDbContainer, name); var parentNode = MainTreeView.Nodes.Cast <TreeNode>().First(x => x.Tag.Equals("Views")); parentNode.Nodes.Remove(parentNode.Nodes.Cast <TreeNode>().First(x => x.Tag.Equals($"[view]{name}"))); }