+ foreach (ToolStripMenuItem item in itemsToRemove)\r
+ btn_source.DropDownItems.Remove(item);\r
+\r
+ Thread driveInfoThread = new Thread(SetDriveSelectionMenuItem);\r
+ driveInfoThread.Start();\r
+ }\r
+\r
+ /// <summary>\r
+ /// Toolbar - Start The Encode\r
+ /// </summary>\r
+ /// <param name="sender">\r
+ /// The sender.\r
+ /// </param>\r
+ /// <param name="e">\r
+ /// The e.\r
+ /// </param>\r
+ private void btn_start_Click(object sender, EventArgs e)\r
+ {\r
+ if (btn_start.Text == "Stop")\r
+ {\r
+ DialogResult result;\r
+ if (Properties.Settings.Default.enocdeStatusInGui &&\r
+ !Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
+ {\r
+ result = MessageBox.Show(\r
+ "Are you sure you wish to cancel the encode?\n\nPlease note, when 'Enable in-GUI encode status' is enabled, stopping this encode will render the file unplayable. ",\r
+ "Cancel Encode?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+ }\r
+ else\r
+ {\r
+ result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?",\r
+ MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+ }\r
+\r
+ if (result == DialogResult.Yes)\r
+ {\r
+ // Pause The Queue\r
+ encodeQueue.Pause();\r
+\r
+ if (Properties.Settings.Default.enocdeStatusInGui &&\r
+ !Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
+ {\r
+ encodeQueue.Stop();\r
+ if (encodeQueue.HbProcess != null)\r
+ encodeQueue.HbProcess.WaitForExit();\r
+ }\r
+ else\r
+ {\r
+ encodeQueue.SafelyClose();\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (encodeQueue.Count != 0 ||\r
+ (!string.IsNullOrEmpty(sourcePath) && !string.IsNullOrEmpty(text_destination.Text)))\r
+ {\r
+ string generatedQuery = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);\r
+ string specifiedQuery = rtf_query.Text != string.Empty\r
+ ? rtf_query.Text\r
+ : QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);\r
+ string query = string.Empty;\r
+\r
+ // Check to make sure the generated query matches the GUI settings\r
+ if (Properties.Settings.Default.PromptOnUnmatchingQueries && !string.IsNullOrEmpty(specifiedQuery) &&\r
+ generatedQuery != specifiedQuery)\r
+ {\r
+ DialogResult result = MessageBox.Show("The query under the \"Query Editor\" tab " +\r
+ "does not match the current GUI settings.\n\nBecause the manual query takes " +\r
+ "priority over the GUI, your recently updated settings will not be taken " +\r
+ "into account when encoding this job." +\r
+ Environment.NewLine + Environment.NewLine +\r
+ "Do you want to replace the manual query with the updated GUI-generated query?",\r
+ "Manual Query does not Match GUI",\r
+ MessageBoxButtons.YesNoCancel, MessageBoxIcon.Asterisk,\r
+ MessageBoxDefaultButton.Button3);\r
+\r
+ switch (result)\r
+ {\r