private void addChildToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try {
         ComparisonCategoryTreeNode comparisonCategoryTreeNode = tvResultsCategories.SelectedNode as ComparisonCategoryTreeNode;
         if (comparisonCategoryTreeNode.Level < 1) {
             EnvComparisonCategoryForm form = new EnvComparisonCategoryForm();
             DialogResult dial = form.ShowDialog();
             if (dial == DialogResult.Yes) {
                 ComparisonCategory cat = form.workingCompCategory;
                 if (cat.categoryId == 0) {
                     //add button was pressed
                     //add button was pressed
                     ComparisonCategoryTreeNode childComparisonCategoryTreeNode = new ComparisonCategoryTreeNode(cat.categoryName);
                     childComparisonCategoryTreeNode.comparisonCategory = new ComparisonCategory(cat.categoryName, cat.categoryDescription, cat.categoryPath);
                     comparisonCategoryTreeNode.Nodes.Add(childComparisonCategoryTreeNode);
                 } else {
                     // save button was pressed
                 }
             }
         }
     } catch (Exception ex) {
         CommonUtils.ShowError(ex.Message, ex);
     }
 }
 private void editNodeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try {
         ComparisonCategoryTreeNode comparisonCategoryTreeNode = tvResultsCategories.SelectedNode as ComparisonCategoryTreeNode;
         EnvComparisonCategoryForm form = new EnvComparisonCategoryForm(comparisonCategoryTreeNode.comparisonCategory);
         DialogResult dial = form.ShowDialog();
         if (dial == DialogResult.Yes) {
             ComparisonCategory cat = form.workingCompCategory;
             comparisonCategoryTreeNode.comparisonCategory = cat;
             comparisonCategoryTreeNode.Text = cat.categoryName;
         }
     } catch (Exception ex) {
         CommonUtils.ShowError(ex.Message, ex);
     }
 }