コード例 #1
0
        private void Assemble_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var filePath = DockingService.ActiveDocument.FilePath;
            //TODO: replace with a file extension specified by the user
            var outputPath = FilePath.ChangeExtention(filePath, ".8xk");

            AssemblerService.AssembleFile(filePath, outputPath, null, AssemblyFlags.Assemble,
                                          (outputText) =>
            {
                DockingService.OutputWindow.ClearText();
                DockingService.OutputWindow.AddText(outputText);
            });
        }
コード例 #2
0
ファイル: MontageTests.cs プロジェクト: jokalee/Tuto
        public void CollapseDesktopChunkTest()
        {
            SetUp();
            var serv  = new AssemblerService(true);
            var model = new EditorModel(new DirectoryInfo("test"), new DirectoryInfo("test"), new DirectoryInfo("test"));

            model.Montage.Chunks.Mark(1000, new bool[] { false, true }, false);
            model.Montage.Chunks.Mark(2000, new bool[] { false, true }, false);
            model.FormPreparedChunks();
            Assert.AreEqual(2, model.Montage.PreparedChunks.Count); //plus dropped tail
            Assert.AreEqual(0, model.Montage.PreparedChunks[0].StartTime);
            Assert.AreEqual(2000, model.Montage.PreparedChunks[0].EndTime);
            Assert.AreEqual(Mode.Desktop, model.Montage.PreparedChunks[0].Mode);
        }
コード例 #3
0
        public void AssembleFileTest()
        {
            AssemblerService target     = new AssemblerService(); // TODO: Initialize to an appropriate value
            FilePath         inputPath  = null;                   // TODO: Initialize to an appropriate value
            FilePath         outputPath = null;                   // TODO: Initialize to an appropriate value
            IList <IDefine>  defines    = null;                   // TODO: Initialize to an appropriate value
            AssemblyFlags    flags      = new AssemblyFlags();    // TODO: Initialize to an appropriate value
            Action <string>  callback   = null;                   // TODO: Initialize to an appropriate value
            bool             expected   = false;                  // TODO: Initialize to an appropriate value
            bool             actual;

            actual = target.AssembleFile(inputPath, outputPath, defines, flags, callback);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #4
0
ファイル: MakeAll.cs プロジェクト: jokalee/Tuto
        public MakeAll(EditorModel model)
        {
            Name = "Make all for: " + model.RawLocation.Name;
            var videoWork = new AssemblyVideoWork(model);

            Tasks.Add(videoWork);
            var serv     = new AssemblerService(true);
            var episodes = serv.GetEpisodesNodes(model);

            //с эпизодами надо что-то решить, в силу того, что эпизодинфо не знает нужной инфы, другого выхода не вижу
            //мы это уже обсуждали, но так и не пришли ни к чему ((

            for (int episodeNumber = 0; episodeNumber < episodes.Count; episodeNumber++)
            {
                if (model.Montage.Information.Episodes[episodeNumber].OutputType == OutputTypes.None)
                {
                    continue;
                }

                //if (model.Montage.Information.Episodes[episodeNumber].PatchModel != null)
                //{
                //    BeforeWorks.Add(new PatchWork(model.Montage.Information.Episodes[episodeNumber].PatchModel,
                //                                  model.Videotheque.Data.EditorSettings.CrossFadesEnabled,
                //                                  model,
                //                                  true));
                //    var patchedLocation = model.Locations.GetFinalOutputFile(episodeNumber);
                //    AfterWorks.Add(new YoutubeWork(model, episodeNumber, patchedLocation));
                //    continue;
                //}

                var from = model.Locations.GetOutputFile(episodeNumber);
                var to   = model.Locations.GetFinalOutputFile(episodeNumber);

                if (model.Montage.Information.Episodes[episodeNumber].OutputType == OutputTypes.Patch)
                {
                    continue;
                }


                var task        = new MoveFile(from, to, model);
                var youtubeWork = new YoutubeWork(model, episodeNumber, false);

                videoWork.Tasks.Select(x => x as CompositeWork).ElementAt(episodeNumber).Tasks.Add(task);
                videoWork.Tasks.Select(x => x as CompositeWork).ElementAt(episodeNumber).Tasks.Add(youtubeWork);
            }
        }
コード例 #5
0
ファイル: AssemblyVideoWork.cs プロジェクト: jokalee/Tuto
        public AssemblyVideoWork(EditorModel model)
        {
            Model = model;
            Name  = "Assembling video: " + model.RawLocation.Name;
            var service  = new AssemblerService(model.Videotheque.Data.EditorSettings.CrossFadesEnabled);
            var episodes = service.GetEpisodesNodes(Model);

            for (var episodeNumber = 0; episodeNumber < episodes.Count; episodeNumber++)
            {
                if (Model.Montage.Information.Episodes[episodeNumber].OutputType == OutputTypes.None)
                {
                    continue;
                }
                var episodeInfo = model.Montage.Information.Episodes[episodeNumber];
                Tasks.Add(new AssemblyEpisodeWork(model, episodeInfo));
            }
        }
コード例 #6
0
ファイル: MontageTests.cs プロジェクト: jokalee/Tuto
 private void SetUp()
 {
     serv  = new AssemblerService(true);
     model = new EditorModel(new DirectoryInfo("test"), new DirectoryInfo("test"), new DirectoryInfo("test"));
 }
コード例 #7
0
        public void AssemblerServiceConstructorTest()
        {
            AssemblerService target = new AssemblerService();

            Assert.Inconclusive("TODO: Implement code to verify target");
        }