private void menuFileNew_Click(object sender, EventArgs e) { TreeNode activeNode = projectTreeView.SelectedNode; if (activeNode == null) { return; } if (activeNode.ContextMenuStrip != filterMenuStrip) { return; } Filter filter = ProjectUtils.GetFilter(activeNode.Text); if (filter == null) { return; } NewFileWizardForm newFileForm = new NewFileWizardForm(activeNode, filter, fileMenuStrip); newFileForm.ShowDialog(this); }
private void MenuStripFilterOnAddFile(object sender, EventArgs e) { TreeNode node = projectTreeView.GetNodeAt(projectTreeView.PointToClient(filterMenuStrip.Bounds.Location)); if (node == null) { return; } Filter filter = ProjectUtils.GetFilter(node.Text); if (filter == null) { return; } NewFileWizardForm fileForm = new NewFileWizardForm(node, filter, fileMenuStrip); fileForm.ShowDialog(this); }