mainWindow.check_iPodAtom.CheckState = CheckState.Unchecked;\r
\r
// Now load all the new settings onto the main window\r
- if (presetQuery.Source != "")\r
- mainWindow.text_source.Text = presetQuery.Source;\r
-\r
- selectLongestTitle(mainWindow);\r
+ mainWindow.drp_dvdtitle.Text = "Automatic";\r
mainWindow.drop_chapterStart.Text = "Auto";\r
mainWindow.drop_chapterFinish.Text = "Auto";\r
\r
// Destination tab\r
#region destination\r
\r
- if (presetQuery.Destination != "")\r
- mainWindow.text_destination.Text = presetQuery.Destination;\r
-\r
mainWindow.drp_videoEncoder.Text = presetQuery.VideoEncoder;\r
\r
if (presetQuery.Format != null)\r
\r
#endregion\r
\r
-\r
-\r
// Picture Settings Tab\r
#region Picture\r
- mainWindow.drp_crop.SelectedIndex = 1;\r
- mainWindow.text_top.Text = presetQuery.CropTop;\r
- mainWindow.text_bottom.Text = presetQuery.CropBottom;\r
- mainWindow.text_left.Text = presetQuery.CropLeft;\r
- mainWindow.text_right.Text = presetQuery.CropRight;\r
+\r
+ if (presetQuery.CropTop == "0" && presetQuery.CropBottom == "0" && presetQuery.CropLeft == "0" && presetQuery.CropRight == "0")\r
+ {\r
+ mainWindow.drp_crop.SelectedIndex = 2;\r
+ }\r
+ else if (presetQuery.CropTop != null && presetQuery.CropBottom != null && presetQuery.CropLeft != null && presetQuery.CropRight != null)\r
+ {\r
+ mainWindow.drp_crop.SelectedIndex = 1;\r
+ mainWindow.text_top.Text = presetQuery.CropTop;\r
+ mainWindow.text_bottom.Text = presetQuery.CropBottom;\r
+ mainWindow.text_left.Text = presetQuery.CropLeft;\r
+ mainWindow.text_right.Text = presetQuery.CropRight;\r
+ }\r
+ else\r
+ {\r
+ mainWindow.drp_crop.SelectedIndex = 0;\r
+ }\r
\r
mainWindow.drp_deInterlace_option.Text = presetQuery.DeInterlace;\r
mainWindow.drp_deNoise.Text = presetQuery.DeNoise;\r
\r
#region Regular Expressions\r
//Source\r
- Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9:\\\s\.]+)(?:\"")");\r
+ Regex r1 = new Regex(@"(-i)(?:\s\"")([a-zA-Z0-9_\-:\\\s\.]+)(?:\"")");\r
Match source = r1.Match(input.Replace('"', '\"'));\r
Match title = Regex.Match(input, @"-t ([0-9]*)");\r
Match chapters = Regex.Match(input, @"-c ([0-9-]*)");\r
//H264 Tab\r
//\r
if (x264.Success != false)\r
- {\r
thisQuery.q_h264 = x264.ToString().Replace("-x ", "");\r
- }\r
\r
//\r
//Progam Options\r
return "Automatic";\r
}\r
}\r
-\r
private static string getAudioEncoder(string audioEnc)\r
{\r
switch (audioEnc)\r