private void AddAlarmResponse(NodeView nodeView)
        {
            var dialog = new AddEditAlarmResponseDialog();
            dialog.Show();

            dialog.Closed += (s1, e1) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {
                    var child = new NodeView(nodeView)
                    {
                        Id = dialog.AlarmResponse.Id,
                        Name = dialog.AlarmResponse.Name,
                        Description = dialog.AlarmResponse.Description,
                        Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                        Type = NodeType.AlarmResponseNode,
                        HasChildren = false,
                        SortField = dialog.AlarmResponse.Name
                    };
                    if (nodeView.ChildrenLoaded)
                    {
                        nodeView.Children.Add(child);
                        nodeView.Sort();
                    }
                }
            };
        }
        private void EditAlarmResponse(NodeView nodeView)
        {
            var dialog = new AddEditAlarmResponseDialog(nodeView.Id);
            dialog.Show();

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