treeView_presets.ExpandAll();\r
lbl_encode.Text = "";\r
drop_mode.SelectedIndex = 0;\r
- queueWindow = new frmQueue(encodeQueue); // Prepare the Queue\r
+ queueWindow = new frmQueue(encodeQueue, this); // Prepare the Queue\r
if (!Properties.Settings.Default.QueryEditorTab)\r
tabs_panel.TabPages.RemoveAt(7); // Remove the query editor tab if the user does not want it enabled.\r
\r
}\r
#endregion\r
\r
+ public void RecievingJob(Job job)\r
+ {\r
+ string query = job.Query;\r
+ StartScan(job.Source, 0);\r
+ \r
+\r
+ if (query != null)\r
+ {\r
+ //Ok, Reset all the H264 widgets before changing the preset\r
+ x264Panel.reset2Defaults();\r
+\r
+ // Send the query from the file to the Query Parser class\r
+ QueryParser presetQuery = QueryParser.Parse(query);\r
+\r
+ // Now load the preset\r
+ PresetLoader.presetLoader(this, presetQuery, "Load Back From Queue", true);\r
+\r
+ // The x264 widgets will need updated, so do this now:\r
+ x264Panel.X264_StandardizeOptString();\r
+ x264Panel.X264_SetCurrentSettingsInPanel();\r
+\r
+ // Finally, let this window have a copy of the preset settings.\r
+ CurrentlySelectedPreset = null;\r
+ PictureSettings.SetPresetCropWarningLabel(null);\r
+ }\r
+\r
+ }\r
+\r
+ private void UpdateGuiWithQueueItemAfterScan()\r
+ {\r
+ \r
+ }\r
+\r
// This is the END of the road ****************************************\r
}\r
}
\ No newline at end of file
this.mnu_export = new System.Windows.Forms.ToolStripMenuItem();\r
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
this.mnu_readd = new System.Windows.Forms.ToolStripMenuItem();\r
+ this.mnu_reconfigureJob = new System.Windows.Forms.ToolStripMenuItem();\r
this.SaveFile = new System.Windows.Forms.SaveFileDialog();\r
this.list_queue = new System.Windows.Forms.ListView();\r
this.Title = new System.Windows.Forms.ColumnHeader();\r
this.mnu_import,\r
this.mnu_export,\r
this.toolStripSeparator2,\r
- this.mnu_readd});\r
+ this.mnu_readd,\r
+ this.mnu_reconfigureJob});\r
this.drop_button_queue.Image = global::Handbrake.Properties.Resources.ActivityWindow;\r
this.drop_button_queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
this.drop_button_queue.ImageTransparentColor = System.Drawing.Color.Magenta;\r
// \r
this.mnu_batch.Image = global::Handbrake.Properties.Resources.Output_Small;\r
this.mnu_batch.Name = "mnu_batch";\r
- this.mnu_batch.Size = new System.Drawing.Size(187, 22);\r
+ this.mnu_batch.Size = new System.Drawing.Size(238, 22);\r
this.mnu_batch.Text = "Generate Batch Script";\r
this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);\r
// \r
// \r
this.mnu_import.Image = global::Handbrake.Properties.Resources.folder;\r
this.mnu_import.Name = "mnu_import";\r
- this.mnu_import.Size = new System.Drawing.Size(187, 22);\r
+ this.mnu_import.Size = new System.Drawing.Size(238, 22);\r
this.mnu_import.Text = "Import Queue";\r
this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);\r
// \r
// \r
this.mnu_export.Image = global::Handbrake.Properties.Resources.save;\r
this.mnu_export.Name = "mnu_export";\r
- this.mnu_export.Size = new System.Drawing.Size(187, 22);\r
+ this.mnu_export.Size = new System.Drawing.Size(238, 22);\r
this.mnu_export.Text = "Export Queue";\r
this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);\r
// \r
// toolStripSeparator2\r
// \r
this.toolStripSeparator2.Name = "toolStripSeparator2";\r
- this.toolStripSeparator2.Size = new System.Drawing.Size(184, 6);\r
+ this.toolStripSeparator2.Size = new System.Drawing.Size(235, 6);\r
// \r
// mnu_readd\r
// \r
this.mnu_readd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;\r
this.mnu_readd.Image = global::Handbrake.Properties.Resources.AddToQueue_small;\r
this.mnu_readd.Name = "mnu_readd";\r
- this.mnu_readd.Size = new System.Drawing.Size(187, 22);\r
- this.mnu_readd.Text = "Re-Add Current Job";\r
+ this.mnu_readd.Size = new System.Drawing.Size(238, 22);\r
+ this.mnu_readd.Text = "Re-Add Currently Running Job";\r
+ this.mnu_readd.ToolTipText = "Readds the currently encoding job back onto the queue.";\r
this.mnu_readd.Click += new System.EventHandler(this.mnu_readd_Click);\r
// \r
+ // mnu_reconfigureJob\r
+ // \r
+ this.mnu_reconfigureJob.Name = "mnu_reconfigureJob";\r
+ this.mnu_reconfigureJob.Size = new System.Drawing.Size(238, 22);\r
+ this.mnu_reconfigureJob.Text = "Reconfigure Job (Experimental)";\r
+ this.mnu_reconfigureJob.ToolTipText = "Removes the job from the queue and sends it back to the main window.\r\nFrom there," +\r
+ " you can change settings then re-add it to the queue";\r
+ this.mnu_reconfigureJob.Click += new System.EventHandler(this.mnu_reconfigureJob_Click);\r
+ // \r
// SaveFile\r
// \r
this.SaveFile.Filter = "Batch|.bat";\r
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;\r
private System.Windows.Forms.ToolStripMenuItem mnu_delete;\r
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
+ private System.Windows.Forms.ToolStripMenuItem mnu_reconfigureJob;\r
}\r
}\r
{\r
private delegate void UpdateHandler();\r
private Queue queue;\r
+ private frmMain mainWindow;\r
\r
- public frmQueue(Queue q)\r
+ public frmQueue(Queue q, frmMain mw)\r
{\r
InitializeComponent();\r
\r
+ this.mainWindow = mw;\r
+\r
this.queue = q;\r
queue.NewJobStarted += new EventHandler(QueueOnEncodeStart);\r
queue.QueueCompleted += new EventHandler(QueueOnQueueFinished);\r
MessageBox.Show("No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode' when you wish to continue encoding the queue.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
}\r
\r
+\r
// Window Display Management\r
private void SetUIEncodeStarted()\r
{\r
UpdateUIElements();\r
}\r
}\r
+ private void mnu_reconfigureJob_Click(object sender, EventArgs e)\r
+ {\r
+ if (list_queue.SelectedIndices != null)\r
+ {\r
+ lock (queue)\r
+ {\r
+ lock (list_queue)\r
+ {\r
+ int index = list_queue.SelectedIndices[0];\r
+ mainWindow.RecievingJob(queue.GetJob(index));\r
+ queue.Remove(index);\r
+ RedrawQueue();\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
\r
// Hide's the window when the user tries to "x" out of the window instead of closing it.\r
protected override void OnClosing(CancelEventArgs e)\r
this.Hide();\r
base.OnClosing(e);\r
}\r
-\r
}\r
}\r