private void AddNewPipeSpecialFeature(NodeView nodeView)
        {
            AddEditPipeSpecialFeatureDialog dialog = new AddEditPipeSpecialFeatureDialog();
            dialog.Show();

            dialog.Closed += (s1, e1) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {

                    PipeSpecialFeature pipeSpecialFeature = dialog.PipeSpecialFeature;
                    NodeView child = new NodeView(nodeView)
                    {
                        Id = pipeSpecialFeature.Id,
                        Name = pipeSpecialFeature.Name,
                        Description = pipeSpecialFeature.Description,
                        Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                        Type = NodeType.PipeSpecialFeatureNode,
                        HasChildren = false,
                        SortField = pipeSpecialFeature.Name
                    };

                    if (nodeView.ChildrenLoaded)
                    {
                        nodeView.Children.Add(child);
                        nodeView.Sort();
                    }
                }
            };
        }
        private void EditPipeSpecialFeature(NodeView nodeView)
        {
            AddEditPipeSpecialFeatureDialog dialog = new AddEditPipeSpecialFeatureDialog(nodeView.Id);
            dialog.Title = "Edit Pipe Special Feature";
            dialog.Show();

            dialog.Closed += (s1, e1) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {
                    PipeSpecialFeature pipeSpecialFeature = dialog.PipeSpecialFeature;
                    nodeView.Name = pipeSpecialFeature.Name;
                    nodeView.Description = pipeSpecialFeature.Description;
                    nodeView.SortField = pipeSpecialFeature.Name;
                    nodeView.Parent.Sort();
                }
            };
        }