// Windows ************************************************************\r
private frmQueue queueWindow;\r
private frmPreview qtpreview;\r
- private frmActivityWindow ActivityWindow;\r
+ private frmActivityWindow activityWindow;\r
private frmSplashScreen splash = new frmSplashScreen();\r
\r
// Globals: Mainly used for tracking. *********************************\r
private SourceType selectedSourceType;\r
private string dvdDrivePath;\r
private string dvdDriveLabel;\r
- private Preset CurrentlySelectedPreset;\r
+ private Preset currentlySelectedPreset;\r
private DVD currentSource;\r
private IScan SourceScan = new ScanService();\r
private List<DriveInformation> drives;\r
private void changePresetLabel(object sender, EventArgs e)\r
{\r
labelPreset.Text = "Output Settings (Preset: Custom)";\r
- CurrentlySelectedPreset = null;\r
+ this.currentlySelectedPreset = null;\r
}\r
\r
private static void frmMain_DragEnter(object sender, DragEventArgs e)\r
x264Panel.SetCurrentSettingsInPanel();\r
\r
// Finally, let this window have a copy of the preset settings.\r
- CurrentlySelectedPreset = preset;\r
+ this.currentlySelectedPreset = preset;\r
PictureSettings.SetPresetCropWarningLabel(preset);\r
}\r
}\r
// Pause The Queue\r
encodeQueue.Pause();\r
\r
- if (Properties.Settings.Default.enocdeStatusInGui &&\r
- !Properties.Settings.Default.showCliForInGuiEncodeStatus)\r
+ if (Settings.Default.enocdeStatusInGui && !Settings.Default.showCliForInGuiEncodeStatus)\r
{\r
encodeQueue.Stop();\r
}\r
}\r
else\r
{\r
- if (encodeQueue.Count != 0 ||\r
- (!string.IsNullOrEmpty(sourcePath) && !string.IsNullOrEmpty(text_destination.Text)))\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
+ if (encodeQueue.Count != 0 || (!string.IsNullOrEmpty(jobSourcePath) && !string.IsNullOrEmpty(jobDestination)))\r
{\r
string generatedQuery = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);\r
string specifiedQuery = rtf_query.Text != string.Empty\r
}\r
\r
DialogResult overwrite = DialogResult.Yes;\r
- if (text_destination.Text != string.Empty)\r
- if (File.Exists(text_destination.Text))\r
- overwrite =\r
- MessageBox.Show(\r
- "The destination file already exists. Are you sure you want to overwrite it?",\r
- "Overwrite File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\r
+ if (!string.IsNullOrEmpty(jobDestination) && File.Exists(jobDestination))\r
+ {\r
+ overwrite = MessageBox.Show(\r
+ "The destination file already exists. Are you sure you want to overwrite it?",\r
+ "Overwrite File?",\r
+ MessageBoxButtons.YesNo,\r
+ MessageBoxIcon.Question);\r
+ }\r
\r
if (overwrite == DialogResult.Yes)\r
{\r
if (encodeQueue.Count == 0)\r
- encodeQueue.Add(query, this.GetTitle(), sourcePath, text_destination.Text, (rtf_query.Text != string.Empty));\r
+ encodeQueue.Add(query, this.GetTitle(), jobSourcePath, jobDestination, (rtf_query.Text != string.Empty));\r
\r
queueWindow.SetQueue();\r
if (encodeQueue.Count > 1)\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
+ // 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
+ // 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
// Make sure we have a Source and Destination.\r
- if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))\r
+ if (string.IsNullOrEmpty(jobSourcePath) || string.IsNullOrEmpty(jobDestination))\r
{\r
MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
return;\r
}\r
\r
// Make sure the destination path exists.\r
- if (!Directory.Exists(Path.GetDirectoryName(text_destination.Text)))\r
+ if (!Directory.Exists(Path.GetDirectoryName(jobDestination)))\r
{\r
MessageBox.Show("Destination Path does not exist.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
return;\r
}\r
\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
- // 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
// Make sure we don't have a duplciate on the queue.\r
if (encodeQueue.CheckForDestinationDuplicate(jobDestination))\r
{\r
/// </param>\r
private void btn_ActivityWindow_Click(object sender, EventArgs e)\r
{\r
- if (ActivityWindow == null || !ActivityWindow.IsHandleCreated)\r
- ActivityWindow = new frmActivityWindow(encodeQueue, SourceScan);\r
+ if (this.activityWindow == null || !this.activityWindow.IsHandleCreated)\r
+ this.activityWindow = new frmActivityWindow(encodeQueue, SourceScan);\r
\r
- ActivityWindow.Show();\r
- ActivityWindow.Activate();\r
+ this.activityWindow.Show();\r
+ this.activityWindow.Activate();\r
}\r
\r
#endregion\r
{\r
selectedTitle = drp_dvdtitle.SelectedItem as Title;\r
lbl_duration.Text = selectedTitle.Duration.ToString();\r
- PictureSettings.CurrentlySelectedPreset = CurrentlySelectedPreset;\r
+ PictureSettings.CurrentlySelectedPreset = this.currentlySelectedPreset;\r
PictureSettings.Source = selectedTitle; // Setup Picture Settings Tab Control\r
\r
// Populate the Angles dropdown\r
drop_chapterFinish.Text = drop_chapterFinish.Items[drop_chapterFinish.Items.Count - 1].ToString();\r
\r
// Populate the Audio Channels Dropdown\r
- AudioSettings.SetTrackList(selectedTitle, CurrentlySelectedPreset);\r
+ AudioSettings.SetTrackList(selectedTitle, this.currentlySelectedPreset);\r
\r
// Populate the Subtitles dropdown\r
Subtitles.SetSubtitleTrackAuto(selectedTitle.Subtitles.ToArray());\r
x264Panel.SetCurrentSettingsInPanel();\r
\r
// Finally, let this window have a copy of the preset settings.\r
- CurrentlySelectedPreset = null;\r
+ this.currentlySelectedPreset = null;\r
PictureSettings.SetPresetCropWarningLabel(null);\r
}\r
}\r