Exemplo n.º 1
0
        private void MenuStripFilterOnDelete(object sender, EventArgs e)
        {
            TreeNode node = projectTreeView.GetNodeAt(projectTreeView.PointToClient(filterMenuStrip.Bounds.Location));

            if (node == null)
            {
                return;
            }

            if (node.Text == ProjectUtils.GetProjectName())
            {
                ProjectUtils.RemoveProject(true);
                projectTreeView.Nodes.Clear();
                return;
            }

            ProjectUtils.RemoveFilter(node.Text, true);
            ProjectUtils.SaveProject();

            TreeNode parentNode = node.Parent;

            if (parentNode == null)
            {
                return;
            }

            parentNode.Nodes.Remove(node);
        }