Пример #1
0
        private void AddRootNodeAction(object data)
        {
            NodeDetailDialog nodeDetailDialog = new NodeDetailDialog(0, 0);

            nodeDetailDialog.Closed += NodeDialog_Closed;
            nodeDetailDialog.Show();
        }
Пример #2
0
        private void AddNodeAction(object data)
        {
            Position position = null;

            if (SelectedNode is Structure)
            {
                position = ((Structure)SelectedNode).RootPosition;
            }
            else
            {
                position = (Position)SelectedNode;
            }

            int parentId = 0;

            if (position != null)
            {
                parentId = position.Id;
            }

            NodeDetailDialog nodeDetailDialog = new NodeDetailDialog(0, parentId);

            nodeDetailDialog.Closed += NodeDialog_Closed;
            nodeDetailDialog.Show();
        }
Пример #3
0
        private void EditNodeAction(object data)
        {
            Position position = null;

            if (SelectedNode is Structure)
            {
                position = ((Structure)SelectedNode).RootPosition;
            }
            else
            {
                position = (Position)SelectedNode;
            }

            NodeDetailDialog win2 = new NodeDetailDialog(position.Id);

            win2.Closed += NodeDialog_Closed;
            win2.Show();
        }