Example #1
0
 /// <summary>
 /// creates a dgavcindex project
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void queueButton_Click(object sender, EventArgs e)
 {
     if (Drives.ableToWriteOnThisDrive(Path.GetPathRoot(projectName.Text)))
     {
         if (configured)
         {
             if (!dialogMode)
             {
                 DGAIndexJob job = generateIndexJob();
                 lastJob = job;
                 mainForm.Jobs.addJobsToQueue(job);
                 if (this.closeOnQueue.Checked)
                 {
                     this.Close();
                 }
             }
         }
         else
         {
             MessageBox.Show("You must select a Video Input and DGAVCIndex 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);
     }
 }
Example #2
0
        private static LogItem postprocess(MainForm mainForm, Job ajob)
        {
            if (!(ajob is DGAIndexJob))
            {
                return(null);
            }
            DGAIndexJob job = (DGAIndexJob)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);
        }