コード例 #1
0
        private void EditNode(MorphNode aNode)
        {
            if (aNode == null)
            {
                return;
            }

            switch (aNode.NodeType)
            {
            case clNodeType.clnParagraph:
            {
                var docNode   = aNode.Parent as MorphNode;
                var docID     = docNode.bdID;
                var contID    = (docNode.Parent as MorphNode).bdID;
                var parID     = aNode.bdID;
                var fParaEdit = new FormParaEdit(store);
                fParaEdit.SetContext(contID, docID, parID, aNode, treeOper.toEdit);
                fParaEdit.Show();
                break;
            }
            }
        }
コード例 #2
0
        private void btAddPara_Click(object sender, EventArgs e)
        {
            var aNode = treeView1.SelectedNode as MorphNode;

            if (aNode == null)
            {
                return;
            }

            MorphNode docNode = null;

            switch (aNode.NodeType)
            {
            case clNodeType.clnDocument:
                docNode = aNode;
                break;

            case clNodeType.clnParagraph:
                docNode = aNode.Parent as MorphNode;
                break;

            default:
                docNode = null;
                break;
            }
            if (docNode == null)
            {
                return;
            }

            var  docID     = docNode.bdID;
            var  contID    = (docNode.Parent as MorphNode).bdID;
            long parID     = -1;
            var  fParaEdit = new FormParaEdit(store);

            fParaEdit.SetContext(contID, docID, parID, docNode, treeOper.toAdd);
            fParaEdit.Show();
        }