this.components = new System.ComponentModel.Container();\r
System.Windows.Forms.ContextMenuStrip notifyIconMenu;\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();\r
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
this.Label47 = new System.Windows.Forms.Label();\r
this.Label3 = new System.Windows.Forms.Label();\r
this.tab_audio = new System.Windows.Forms.TabPage();\r
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);\r
this.tab_video = new System.Windows.Forms.TabPage();\r
+ this.checkMaximumFramerate = new System.Windows.Forms.CheckBox();\r
this.radio_cq = new System.Windows.Forms.RadioButton();\r
this.radio_avgBitrate = new System.Windows.Forms.RadioButton();\r
this.radio_targetFilesize = new System.Windows.Forms.RadioButton();\r
this.lbl_SliderValue = new System.Windows.Forms.Label();\r
this.lbl_framerate = new System.Windows.Forms.Label();\r
this.tab_picture = new System.Windows.Forms.TabPage();\r
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();\r
this.tabs_panel = new System.Windows.Forms.TabControl();\r
this.tab_filters = new System.Windows.Forms.TabPage();\r
+ this.Filters = new Handbrake.Controls.Filters();\r
this.tab_subtitles = new System.Windows.Forms.TabPage();\r
+ this.Subtitles = new Handbrake.Controls.Subtitles();\r
this.tab_chapters = new System.Windows.Forms.TabPage();\r
this.label31 = new System.Windows.Forms.Label();\r
this.tab_advanced = new System.Windows.Forms.TabPage();\r
+ this.x264Panel = new Handbrake.Controls.x264Panel();\r
this.tab_query = new System.Windows.Forms.TabPage();\r
this.btn_clear = new System.Windows.Forms.Button();\r
this.label34 = new System.Windows.Forms.Label();\r
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();\r
this.openPreset = new System.Windows.Forms.OpenFileDialog();\r
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();\r
- this.checkMaximumFramerate = new System.Windows.Forms.CheckBox();\r
- this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
- this.Filters = new Handbrake.Controls.Filters();\r
- this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
- this.Subtitles = new Handbrake.Controls.Subtitles();\r
- this.x264Panel = new Handbrake.Controls.x264Panel();\r
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
notifyIconMenu.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
// \r
// number\r
// \r
- dataGridViewCellStyle1.Format = "N0";\r
- dataGridViewCellStyle1.NullValue = null;\r
- this.number.DefaultCellStyle = dataGridViewCellStyle1;\r
+ dataGridViewCellStyle2.Format = "N0";\r
+ dataGridViewCellStyle2.NullValue = null;\r
+ this.number.DefaultCellStyle = dataGridViewCellStyle2;\r
this.number.Frozen = true;\r
this.number.HeaderText = "Chapter Number";\r
this.number.MaxInputLength = 3;\r
this.tab_audio.Text = "Audio";\r
this.tab_audio.UseVisualStyleBackColor = true;\r
// \r
+ // AudioSettings\r
+ // \r
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
+ this.AudioSettings.Name = "AudioSettings";\r
+ this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
+ this.AudioSettings.TabIndex = 0;\r
+ // \r
// AudioMenuRowHeightHack\r
// \r
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;\r
this.tab_video.Text = "Video";\r
this.tab_video.UseVisualStyleBackColor = true;\r
// \r
+ // checkMaximumFramerate\r
+ // \r
+ this.checkMaximumFramerate.AutoSize = true;\r
+ this.checkMaximumFramerate.BackColor = System.Drawing.Color.Transparent;\r
+ this.checkMaximumFramerate.Location = new System.Drawing.Point(125, 89);\r
+ this.checkMaximumFramerate.Name = "checkMaximumFramerate";\r
+ this.checkMaximumFramerate.Size = new System.Drawing.Size(132, 17);\r
+ this.checkMaximumFramerate.TabIndex = 19;\r
+ this.checkMaximumFramerate.Text = "Peak Framerate (VFR)";\r
+ this.checkMaximumFramerate.UseVisualStyleBackColor = false;\r
+ // \r
// radio_cq\r
// \r
this.radio_cq.AutoSize = true;\r
this.tab_picture.Text = "Picture";\r
this.tab_picture.UseVisualStyleBackColor = true;\r
// \r
+ // PictureSettings\r
+ // \r
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
+ this.PictureSettings.CurrentlySelectedPreset = null;\r
+ this.PictureSettings.Enabled = false;\r
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
+ this.PictureSettings.Name = "PictureSettings";\r
+ this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);\r
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
+ this.PictureSettings.TabIndex = 0;\r
+ // \r
// Check_ChapterMarkers\r
// \r
this.Check_ChapterMarkers.AutoSize = true;\r
this.tab_filters.Text = "Video Filters";\r
this.tab_filters.UseVisualStyleBackColor = true;\r
// \r
+ // Filters\r
+ // \r
+ this.Filters.BackColor = System.Drawing.Color.Transparent;\r
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.Filters.Location = new System.Drawing.Point(0, 0);\r
+ this.Filters.Name = "Filters";\r
+ this.Filters.Size = new System.Drawing.Size(713, 310);\r
+ this.Filters.TabIndex = 0;\r
+ // \r
// tab_subtitles\r
// \r
this.tab_subtitles.Controls.Add(this.Subtitles);\r
this.tab_subtitles.Text = "Subtitles";\r
this.tab_subtitles.UseVisualStyleBackColor = true;\r
// \r
+ // Subtitles\r
+ // \r
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
+ this.Subtitles.Name = "Subtitles";\r
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
+ this.Subtitles.TabIndex = 0;\r
+ // \r
// tab_chapters\r
// \r
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;\r
this.tab_advanced.Text = "Advanced";\r
this.tab_advanced.UseVisualStyleBackColor = true;\r
// \r
+ // x264Panel\r
+ // \r
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
+ this.x264Panel.Name = "x264Panel";\r
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
+ this.x264Panel.TabIndex = 0;\r
+ this.x264Panel.X264Query = "";\r
+ // \r
// tab_query\r
// \r
this.tab_query.Controls.Add(this.btn_clear);\r
this.btn_clear.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
this.btn_clear.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
this.btn_clear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
- this.btn_clear.Location = new System.Drawing.Point(634, 75);\r
+ this.btn_clear.Location = new System.Drawing.Point(634, 104);\r
this.btn_clear.Name = "btn_clear";\r
this.btn_clear.Size = new System.Drawing.Size(75, 22);\r
this.btn_clear.TabIndex = 4;\r
// label34\r
// \r
this.label34.AutoSize = true;\r
- this.label34.Location = new System.Drawing.Point(13, 36);\r
+ this.label34.Location = new System.Drawing.Point(13, 35);\r
this.label34.Name = "label34";\r
- this.label34.Size = new System.Drawing.Size(367, 26);\r
+ this.label34.Size = new System.Drawing.Size(631, 52);\r
this.label34.TabIndex = 1;\r
- this.label34.Text = "Here you can alter the query generated by this program.\r\nDon\'t forget to re-gener" +\r
- "ate this query should you change any GUI options.";\r
+ this.label34.Text = resources.GetString("label34.Text");\r
// \r
// btn_generate_Query\r
// \r
this.btn_generate_Query.FlatAppearance.BorderColor = System.Drawing.Color.Black;\r
this.btn_generate_Query.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
this.btn_generate_Query.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));\r
- this.btn_generate_Query.Location = new System.Drawing.Point(16, 75);\r
+ this.btn_generate_Query.Location = new System.Drawing.Point(16, 104);\r
this.btn_generate_Query.Name = "btn_generate_Query";\r
this.btn_generate_Query.Size = new System.Drawing.Size(126, 22);\r
this.btn_generate_Query.TabIndex = 2;\r
// rtf_query\r
// \r
this.rtf_query.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
- this.rtf_query.Location = new System.Drawing.Point(16, 103);\r
+ this.rtf_query.Location = new System.Drawing.Point(16, 132);\r
this.rtf_query.Name = "rtf_query";\r
- this.rtf_query.Size = new System.Drawing.Size(693, 190);\r
+ this.rtf_query.Size = new System.Drawing.Size(693, 161);\r
this.rtf_query.TabIndex = 5;\r
this.rtf_query.Text = "";\r
// \r
// \r
this.File_ChapterImport.Filter = "CSV Files|*.csv";\r
// \r
- // checkMaximumFramerate\r
- // \r
- this.checkMaximumFramerate.AutoSize = true;\r
- this.checkMaximumFramerate.BackColor = System.Drawing.Color.Transparent;\r
- this.checkMaximumFramerate.Location = new System.Drawing.Point(125, 89);\r
- this.checkMaximumFramerate.Name = "checkMaximumFramerate";\r
- this.checkMaximumFramerate.Size = new System.Drawing.Size(132, 17);\r
- this.checkMaximumFramerate.TabIndex = 19;\r
- this.checkMaximumFramerate.Text = "Peak Framerate (VFR)";\r
- this.checkMaximumFramerate.UseVisualStyleBackColor = false;\r
- // \r
- // PictureSettings\r
- // \r
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
- this.PictureSettings.CurrentlySelectedPreset = null;\r
- this.PictureSettings.Enabled = false;\r
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
- this.PictureSettings.Name = "PictureSettings";\r
- this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);\r
- this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
- this.PictureSettings.TabIndex = 0;\r
- // \r
- // Filters\r
- // \r
- this.Filters.BackColor = System.Drawing.Color.Transparent;\r
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Filters.Location = new System.Drawing.Point(0, 0);\r
- this.Filters.Name = "Filters";\r
- this.Filters.Size = new System.Drawing.Size(713, 310);\r
- this.Filters.TabIndex = 0;\r
- // \r
- // AudioSettings\r
- // \r
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
- this.AudioSettings.Name = "AudioSettings";\r
- this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
- this.AudioSettings.TabIndex = 0;\r
- // \r
- // Subtitles\r
- // \r
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
- this.Subtitles.Name = "Subtitles";\r
- this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
- this.Subtitles.TabIndex = 0;\r
- // \r
- // x264Panel\r
- // \r
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
- this.x264Panel.Name = "x264Panel";\r
- this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
- this.x264Panel.TabIndex = 0;\r
- this.x264Panel.X264Query = "";\r
- // \r
// frmMain\r
// \r
this.AllowDrop = true;\r
/// </param>\r
private void btn_add2Queue_Click(object sender, EventArgs e)\r
{\r
+ // Note, don't currently do checks for custom queries. Only GUI components.\r
+ // Make sure we have a Source and Destination.\r
if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))\r
- MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
- else\r
{\r
- if (!Directory.Exists(Path.GetDirectoryName(text_destination.Text)))\r
- {\r
- MessageBox.Show("Destination Path does not exist.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
- return;\r
- }\r
+ MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ return;\r
+ }\r
\r
- string query = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);\r
- if (rtf_query.Text != string.Empty)\r
- query = rtf_query.Text;\r
+ // Make sure the destination path exists.\r
+ if (!Directory.Exists(Path.GetDirectoryName(text_destination.Text)))\r
+ {\r
+ MessageBox.Show("Destination Path does not exist.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ return;\r
+ }\r
\r
- if (encodeQueue.CheckForDestinationDuplicate(text_destination.Text))\r
- {\r
- DialogResult result =\r
- MessageBox.Show(\r
- "There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?",\r
- "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);\r
- if (result == DialogResult.Yes)\r
- encodeQueue.Add(query, this.GetTitle(), sourcePath, text_destination.Text, (rtf_query.Text != string.Empty));\r
- }\r
- else\r
- encodeQueue.Add(query, this.GetTitle(), sourcePath, text_destination.Text, (rtf_query.Text != string.Empty));\r
+ // Get the CLI query or use the query editor if it's not empty.\r
+ string query = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);\r
+ if (!string.IsNullOrEmpty(rtf_query.Text )) \r
+ query = rtf_query.Text;\r
\r
- lbl_encode.Text = encodeQueue.Count + " encode(s) pending in the queue";\r
+ // If we have a custom query, then we'll want to figure out what the new source and destination is, otherwise we'll just use the gui components.\r
+ string jobSourcePath = !string.IsNullOrEmpty(rtf_query.Text) ? Main.GetSourceFromQuery(rtf_query.Text) : sourcePath;\r
+ string jobDestination = !string.IsNullOrEmpty(rtf_query.Text) ? Main.GetDestinationFromQuery(rtf_query.Text): text_destination.Text;\r
\r
- queueWindow.Show();\r
+ // Make sure we don't have a duplciate on the queue.\r
+ if (encodeQueue.CheckForDestinationDuplicate(jobDestination))\r
+ {\r
+ DialogResult result =\r
+ MessageBox.Show(\r
+ "There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?",\r
+ "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);\r
+ if (result == DialogResult.Yes)\r
+ encodeQueue.Add(query, this.GetTitle(), jobSourcePath, jobDestination, (rtf_query.Text != string.Empty));\r
}\r
+ else\r
+ encodeQueue.Add(query, this.GetTitle(), jobSourcePath, jobDestination, (rtf_query.Text != string.Empty));\r
+\r
+ lbl_encode.Text = encodeQueue.Count + " encode(s) pending in the queue";\r
+\r
+ queueWindow.Show();\r
+\r
}\r
\r
/// <summary>\r
{\r
this.checkMaximumFramerate.Visible = false;\r
this.checkMaximumFramerate.CheckState = CheckState.Unchecked;\r
- } \r
+ }\r
else\r
{\r
this.checkMaximumFramerate.Visible = true;\r