示例#1
0
        PackageBuilder GetPackageBuilder()
        {
            // fill ProductId if empty
            if (this.document.package.ProductId == 0)
            {
                this.document.package.ProductId = productIdProvider.GetNextAvailableProductId();
                UpdateView();
            }

            var s = new PackageDirectoryStructure(Path.Combine(About.DocumentsDirectory, "output"), this.document.package);

            return(new PackageBuilder(s, Context.GetDefaultMediaFileConverter(), Settings.Read().CreateOidSvgWriter()));
        }
示例#2
0
        public void PackageBuilderTest()
        {
            var penDirectory = TestFile("penDirectory");

            PathUtil.EnsureNotExists(penDirectory);
            PathUtil.EnsureDirectoryExists(penDirectory);
            var converter   = new MediaFileConverter(TestFile("media-cache"));
            var albumReader = new AlbumReader();

            var package = Package.CreateFromInputPaths(new[] { TestFile("audio") });

            package.Albums.First().Tracks = Enumerable.Range(0, 20).Select(_ => package.Albums.First().Tracks.First()).ToArray();
            package.ProductId = 800;

            var structure = new PackageDirectoryStructure(penDirectory, package);
            var pb        = new PackageBuilder(structure, converter, new OidSvgWriter(new TiptoiOidCode()));

            pb.Build(CancellationToken.None).Wait();

            Console.WriteLine(structure.GmeFile);
        }
示例#3
0
文件: Editor.cs 项目: Denjo69/ttaudio
        PackageBuilder GetPackageBuilder()
        {
            var s = new PackageDirectoryStructure(GetRootDirectory(), this.document.package);

            return(new PackageBuilder(s, Context.GetDefaultMediaFileConverter(), Settings.Read().CreateOidSvgWriter()));
        }