private void EditGraphic(NodeView nodeView)
        {
            var dialog = new AddEditGraphicDialog(nodeView.Id);
            dialog.Show();

            dialog.Closed += (s1, e1) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {
                    nodeView.Name = dialog.Graphic.Name;
                    nodeView.Description = dialog.Graphic.Description;
                    nodeView.IsActive = true;
                    nodeView.SortField = dialog.Graphic.Ordinal.ToString();
                    nodeView.Parent.Sort();

                    // todo:does this need to be reloaded???
                    //mGraphicsTopNode.Children.Clear();
                    //LoadGraphics(mGraphicsTopNode);

                    nodeView.Sort(true);
                    mGraphicsTopNode.ChildrenLoaded = true;
                }
            };
        }
        private void AddNewGraphic(NodeView nodeView)
        {
            var dialog = new AddEditGraphicDialog();
            dialog.Show();

            dialog.Closed += (s1, e1) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {
                    var child = new NodeView(nodeView)
                    {
                        Id = dialog.Graphic.Id,
                        Name = dialog.Graphic.Name,
                        Description = dialog.Graphic.Description,
                        Icon = "/CmsEquipmentDatabase;component/Images/Area.png",
                        Type = NodeType.GraphicNode,
                        SortField = dialog.Graphic.Ordinal.ToString(),
                        IsActive = true,
                        HasChildren = false
                    };

                    if (nodeView.ChildrenLoaded)
                    {
                        nodeView.Children.Add(child);
                        nodeView.Sort(true);
                    }

                    mGraphicsTopNode.Children.Clear();
                    LoadGraphics(mGraphicsTopNode);
                }
            };
        }