private void queueButton_Click(object sender, EventArgs e) { if (Drives.ableToWriteOnThisDrive(Path.GetPathRoot(projectName.Text))) { if (configured) { if (!dialogMode) { DGMIndexJob job = generateIndexJob(); lastJob = job; mainForm.Jobs.addJobsToQueue(job); if (this.closeOnQueue.Checked) { this.Close(); } } } else { MessageBox.Show("You must select a Video Input and DGMPGIndex project file to continue", "Configuration incomplete", MessageBoxButtons.OK); } } else { MessageBox.Show("MeGUI cannot write on the disc " + Path.GetPathRoot(projectName.Text) + " \n" + "Please, select another output path to save your project...", "Configuration Incomplete", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private static LogItem postprocess(MainForm mainForm, Job ajob) { if (!(ajob is DGMIndexJob)) { return(null); } DGMIndexJob job = (DGMIndexJob)ajob; StringBuilder logBuilder = new StringBuilder(); Dictionary <int, string> audioFiles = new Dictionary <int, string>(); if ((job.AudioTracks != null && job.AudioTracks.Count > 0) || job.DemuxMode > 0) { List <string> arrFilesToDelete = new List <string>(); audioFiles = AudioUtil.GetAllDemuxedAudioFromDGI(job.AudioTracks, out arrFilesToDelete, job.Output, null); job.FilesToDelete.AddRange(arrFilesToDelete); } if (!job.OneClickProcessing) { job.FilesToDelete.Add(Path.ChangeExtension(job.Output, ".log")); } if (!Path.ChangeExtension(job.Output, ".log").Equals(Path.ChangeExtension(job.Input, ".log"))) { job.FilesToDelete.Add(Path.ChangeExtension(job.Input, ".log")); } if (job.LoadSources) { if (audioFiles.Count > 0) { string[] files = new string[audioFiles.Values.Count]; audioFiles.Values.CopyTo(files, 0); Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { mainForm.Audio.openAudioFile(files); })); } // if the above needed delegation for openAudioFile this needs it for openVideoFile? // It seems to fix the problem of ASW dissapearing as soon as it appears on a system (Vista X64) Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { AviSynthWindow asw = new AviSynthWindow(mainForm, job.Output); asw.OpenScript += new OpenScriptCallback(mainForm.Video.openVideoFile); asw.Show(); })); } return(null); }
private static LogItem postprocess(MainForm mainForm, Job ajob) { if (!(ajob is DGMIndexJob)) { return(null); } DGMIndexJob job = (DGMIndexJob)ajob; if (job.PostprocessingProperties != null) { return(null); } StringBuilder logBuilder = new StringBuilder(); VideoUtil vUtil = new VideoUtil(mainForm); Dictionary <int, string> audioFiles = vUtil.getAllDemuxedAudio(job.AudioTracks, job.Output, 8); if (job.LoadSources) { if (job.DemuxMode != 0 && audioFiles.Count > 0) { string[] files = new string[audioFiles.Values.Count]; audioFiles.Values.CopyTo(files, 0); Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { mainForm.Audio.openAudioFile(files); })); } // if the above needed delegation for openAudioFile this needs it for openVideoFile? // It seems to fix the problem of ASW dissapearing as soon as it appears on a system (Vista X64) Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { AviSynthWindow asw = new AviSynthWindow(mainForm, job.Output); asw.OpenScript += new OpenScriptCallback(mainForm.Video.openVideoFile); asw.Show(); })); } return(null); }