コード例 #1
0
        public void CreateDirectoryItem_Click(object sender, EventArgs e, Diagram.DiagramView diagramview)
        {
            string DiagramPath = diagramview.diagram.FileName.Trim();

            if (DiagramPath == "" && !Os.FileExists(DiagramPath))
            {
                return;
            }

            string NewDirectoryPath = Os.Combine(Os.GetFileDirectory(DiagramPath), "test");

            Os.CreateDirectory(NewDirectoryPath);

            Node newrec = diagramview.CreateNode(diagramview.actualMousePos.Clone());

            newrec.SetName("test");
            newrec.link = NewDirectoryPath;
            diagramview.diagram.Unsave("create", newrec, diagramview.shift, diagramview.currentLayer.id);
        }