示例#1
0
        public string getStandardLibraryPath()
        {
            string standardLibraryPath = "";
            
            if (Os.FileExists(this.location))
            {
                string pluginDirectory = Os.GetDirectoryName(this.location);
                standardLibraryPath = Os.Combine(pluginDirectory, "IronPython.zip");

                if (!Os.FileExists(standardLibraryPath))
                {
                    Program.log.Write("ScriptPlugim: standard python librar IronPython.zip not exist");
                    return null;
                }

            }

            return standardLibraryPath;
        }
示例#2
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);
        }