private void queueButton_Click(object sender, EventArgs e) { if (configured) { if (!dialogMode) { SubtitleIndexJob job = generateJob(); int jobNumber = mainForm.Jobs.getFreeJobNumber(); job.Name = "job" + jobNumber; mainForm.Jobs.addJobToQueue(job); if (mainForm.Settings.AutoStartQueue) { mainForm.Jobs.startEncoding(job); } if (this.closeOnQueue.Checked) { this.Close(); } } } else { MessageBox.Show("You must select an Input and Output file to continue", "Configuration incomplete", MessageBoxButtons.OK); } }
private void queueButton_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(output.Filename)) { MessageBox.Show("Please select a propper output file", "Configuration Incomplete", MessageBoxButtons.OK); return; } if (!String.IsNullOrEmpty(output.Filename) && Drives.ableToWriteOnThisDrive(Path.GetPathRoot(output.Filename))) { if (configured) { if (!dialogMode) { SubtitleIndexJob job = generateJob(); mainForm.Jobs.addJobsToQueue(job); if (this.closeOnQueue.Checked) { this.Close(); } } } else { MessageBox.Show("You must select an Input and Output file to continue", "Configuration incomplete", MessageBoxButtons.OK); } } else { MessageBox.Show("MeGUI cannot write on " + Path.GetPathRoot(output.Filename) + ". Please select a propper output file.", "Configuration Incomplete", MessageBoxButtons.OK); } }
public bool setup(Job job, out string error) { error = ""; if (job is SubtitleIndexJob) { this.job = (SubtitleIndexJob)job; } else { error = "Job '" + job.Name + "' has been given to the VobSubIndexer, even though it is not a SubtitleIndexJob."; return(false); } if (!System.IO.File.Exists(this.job.ScriptFile)) { error = "Unable to find the script file " + this.job.ScriptFile; return(false); } string vobsubPath = Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\vobsub.dll"; if (!System.IO.File.Exists(vobsubPath)) { error = "Unable to find vobsub.dll in your system32 directory"; return(false); } stup.JobName = this.job.Name; return(true); }
private SubtitleIndexJob generateJob() { List <int> trackIDs = new List <int>(); foreach (object itemChecked in subtitleTracks.CheckedItems) { SubtitleInfo si = (SubtitleInfo)itemChecked; trackIDs.Add(si.Index); } SubtitleIndexJob job = this.jobUtil.generateSubtitleIndexJob(input.Text, projectName.Text, keepAllTracks.Checked, trackIDs, (int)pgc.Value); return(job); }
private void queueButton_Click(object sender, EventArgs e) { if (configured) { if (!dialogMode) { SubtitleIndexJob job = generateJob(); mainForm.Jobs.addJobsToQueue(job); if (this.closeOnQueue.Checked) { this.Close(); } } } else { MessageBox.Show("You must select an Input and Output file to continue", "Configuration incomplete", MessageBoxButtons.OK); } }
private static Job ReconfigureJob(Job j) { if (!(j is SubtitleIndexJob)) { return(null); } SubtitleIndexJob m = (SubtitleIndexJob)j; VobSubIndexWindow w = new VobSubIndexWindow(MainForm.Instance); w.Job = m; if (w.ShowDialog() == DialogResult.OK) { return(w.Job); } else { return(m); } }