{\r
if (encodeQueue.count() != 0 || (text_source.Text != string.Empty && text_source.Text != "Click 'Source' to continue" && text_destination.Text != string.Empty))\r
{\r
- // Set the last action to encode. \r
- // This is used for tracking which file to load in the activity window\r
- lastAction = "encode";\r
-\r
String query = rtf_query.Text != "" ? rtf_query.Text : queryGen.generateTheQuery(this);\r
\r
- if (encodeQueue.count() == 0)\r
- encodeQueue.add(query, text_source.Text, text_destination.Text);\r
+ DialogResult overwrite = DialogResult.Yes;\r
+ if (text_destination.Text != "")\r
+ if (File.Exists(text_destination.Text))\r
+ overwrite = MessageBox.Show("The destination file already exists. Are you sure you want to overwrite it?", "Overwrite File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
\r
- queueWindow.setQueue();\r
- if (encodeQueue.count() > 1)\r
- queueWindow.Show(false);\r
+ if (overwrite == DialogResult.Yes)\r
+ {\r
+ if (encodeQueue.count() == 0)\r
+ encodeQueue.add(query, text_source.Text, text_destination.Text);\r
\r
- setEncodeStarted(); // Encode is running, so setup the GUI appropriately\r
- encodeQueue.startEncode(); // Start The Queue Encoding Process\r
+ queueWindow.setQueue();\r
+ if (encodeQueue.count() > 1)\r
+ queueWindow.Show(false);\r
+\r
+ setEncodeStarted(); // Encode is running, so setup the GUI appropriately\r
+ encodeQueue.startEncode(); // Start The Queue Encoding Process\r
+ lastAction = "encode"; // Set the last action to encode - Used for activity window.\r
+ }\r
this.Focus();\r
}\r
else if (text_source.Text == string.Empty || text_source.Text == "Click 'Source' to continue" || text_destination.Text == string.Empty)\r