private readonly List<Subtitle> m_subtitles;\r
private List<String> m_angles = new List<string>();\r
private float m_aspectRatio;\r
+ private float m_fps;\r
private int[] m_autoCrop;\r
private string source;\r
private TimeSpan m_duration;\r
{\r
get { return m_angles; }\r
}\r
+\r
+ /// <summary>\r
+ /// Collection of Angles in this Title\r
+ /// </summary>\r
+ public float Fps\r
+ {\r
+ get { return m_fps; }\r
+ }\r
\r
/// <summary>\r
/// Override of the ToString method to provide an easy way to use this object in the UI\r
thisTitle.m_resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
thisTitle.m_parVal = new Size(int.Parse(m.Groups[3].Value), int.Parse(m.Groups[4].Value));\r
thisTitle.m_aspectRatio = float.Parse(m.Groups[5].Value, Culture);\r
+ thisTitle.m_fps = float.Parse(m.Groups[6].Value, Culture);\r
}\r
\r
// Get autocrop region for this title\r
}\r
\r
sourcePath = Path.GetFileName(file);\r
- StartScan(file,0);\r
+ StartScan(file, 0);\r
}\r
private void drp_dvdtitle_Click(object sender, EventArgs e)\r
{\r
private void drp_dvdtitle_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
UnRegisterPresetEventHandler();\r
+ drop_mode.SelectedIndex = 0;\r
\r
PictureSettings.lbl_Aspect.Text = "Select a Title"; // Reset some values on the form\r
drop_chapterStart.Items.Clear();\r
int start, end;\r
int.TryParse(drop_chapterStart.Text, out start);\r
int.TryParse(drop_chapterFinish.Text, out end);\r
+ double duration = end - start;\r
+\r
+ switch (drop_mode.SelectedIndex)\r
+ {\r
+ case 1:\r
+ lbl_duration.Text = TimeSpan.FromSeconds(duration).ToString();\r
+ return;\r
+ case 2:\r
+ if (selectedTitle != null)\r
+ {\r
+ duration = duration / selectedTitle.Fps;\r
+ lbl_duration.Text = TimeSpan.FromSeconds(duration).ToString();\r
+ }\r
+ else\r
+ lbl_duration.Text = "--:--:--";\r
\r
- int duration = end - start;\r
- TimeSpan dur = TimeSpan.FromSeconds(duration);\r
- lbl_duration.Text = dur.ToString();\r
+ return;\r
+ }\r
}\r
private void drop_mode_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
}\r
return;\r
case 2:\r
- MessageBox.Show("This feature is not implemented yet! Switching Back to Chapters Mode.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
- drop_mode.SelectedIndex = 0;\r
+ this.drop_chapterStart.TextChanged += new System.EventHandler(this.SecondsOrFramesChanged);\r
+ this.drop_chapterFinish.TextChanged += new System.EventHandler(this.SecondsOrFramesChanged);\r
+ drop_chapterStart.DropDownStyle = ComboBoxStyle.Simple;\r
+ drop_chapterFinish.DropDownStyle = ComboBoxStyle.Simple;\r
+ if (selectedTitle != null)\r
+ {\r
+ drop_chapterStart.Text = "0";\r
+ drop_chapterFinish.Text = (selectedTitle.Fps * selectedTitle.Duration.TotalSeconds).ToString();\r
+ }\r
return;\r
}\r
}\r