Пример #1
0
        public ZSingleCompiler(FileInfo zlogoFileInfo)
        {
            srcFileInfo  = zlogoFileInfo;
            projectModel = new ZCompileProjectModel();
            classModel   = new ZCompileClassModel();

            projectModel.ProjectRootDirectoryInfo = srcFileInfo.Directory;
            projectModel.BinaryFileKind           = PEFileKinds.ConsoleApplication;
            projectModel.BinarySaveDirectoryInfo  = srcFileInfo.Directory;
            projectModel.ProjectPackageName       = "ZLangSingleFile";
            projectModel.EntryClassName           = Path.GetFileNameWithoutExtension(srcFileInfo.FullName);
            projectModel.BinaryFileNameNoEx       = Path.GetFileNameWithoutExtension(srcFileInfo.FullName);
            projectModel.NeedSave = true;
            projectModel.AddRefPackage("Z语言系统");
            //projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ZLogoEngine.exe")));

            classModel.SourceFileInfo = srcFileInfo;

            /*   classModel.PreSourceCode =@"
             *
             * 使用包:ZLogoEngine;
             * 简略使用:颜色,补语控制;
             *
             * 属于:绘图窗体;
             *
             * ";*/
            projectModel.AddClass(classModel);
        }
Пример #2
0
        public ZLogoCompiler(FileInfo zlogoFileInfo)
        {
            srcFileInfo = zlogoFileInfo;

            /*if (!srcFileInfo.EndsWith(ZLogoExt, StringComparison.OrdinalIgnoreCase))
             * {
             *  srcFileInfo +=ZLogoExt;
             * }*/
            projectModel = new ZCompileProjectModel();
            classModel   = new ZCompileClassModel();

            projectModel.ProjectRootDirectoryInfo = srcFileInfo.Directory;// AppDomain.CurrentDomain.BaseDirectory;
            projectModel.BinaryFileKind           = PEFileKinds.Dll;
            projectModel.BinarySaveDirectoryInfo  = srcFileInfo.Directory;
            projectModel.ProjectPackageName       = "ZLogoIDE";
            projectModel.EntryClassName           = Path.GetFileNameWithoutExtension(srcFileInfo.FullName);
            projectModel.BinaryFileNameNoEx       = Path.GetFileNameWithoutExtension(srcFileInfo.FullName);
            projectModel.NeedSave = false;
            projectModel.AddRefPackage("Z语言系统");
            projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ZLogoEngine.exe")));

            classModel.SourceFileInfo = srcFileInfo;
            classModel.PreSourceCode  =
                @"

使用包:ZLogoEngine;
简略使用:颜色,补语控制;

属于:绘图窗体;

";
            projectModel.AddClass(classModel);
        }
Пример #3
0
        void initProject()
        {
            CompileResult = null;
            projectModel  = new ZCompileProjectModel();

            projectModel.ProjectRootDirectoryInfo = srcFileInfo.Directory;
            projectModel.BinarySaveDirectoryInfo  = srcFileInfo.Directory;
            projectModel.NeedSave = true;
            projectModel.AddRefPackage("Z语言系统");
            projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Lib/Z文件系统.dll")));
            projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Lib/Z桌面控件.dll")));
            projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Lib/Z互联网.dll")));
            projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Lib/Z绘图.dll")));
            projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Lib/Z操作系统.dll")));
            //projectModel.AddRefDll(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Lib/NSoup.dll")));
        }