<Compile Include="frmOptions.vb">\r
<SubType>Form</SubType>\r
</Compile>\r
- <Compile Include="frmReadDVD.Designer.vb">\r
- <DependentUpon>frmReadDVD.vb</DependentUpon>\r
+ <Compile Include="frmSelectDVD.Designer.vb">\r
+ <DependentUpon>frmSelectDVD.vb</DependentUpon>\r
</Compile>\r
- <Compile Include="frmReadDVD.vb">\r
+ <Compile Include="frmSelectDVD.vb">\r
<SubType>Form</SubType>\r
</Compile>\r
<Compile Include="frmMain.vb">\r
<Compile Include="frmQueue.vb">\r
<SubType>Form</SubType>\r
</Compile>\r
- <Compile Include="frmSelect.Designer.vb">\r
- <DependentUpon>frmSelect.vb</DependentUpon>\r
+ <Compile Include="frmDVDData.Designer.vb">\r
+ <DependentUpon>frmDVDData.vb</DependentUpon>\r
</Compile>\r
- <Compile Include="frmSelect.vb">\r
+ <Compile Include="frmDVDData.vb">\r
<SubType>Form</SubType>\r
</Compile>\r
- <Compile Include="frmStatus.Designer.vb">\r
- <DependentUpon>frmStatus.vb</DependentUpon>\r
+ <Compile Include="frmReadDVD.Designer.vb">\r
+ <DependentUpon>frmReadDVD.vb</DependentUpon>\r
</Compile>\r
- <Compile Include="frmStatus.vb">\r
+ <Compile Include="frmReadDVD.vb">\r
<SubType>Form</SubType>\r
</Compile>\r
<Compile Include="frmUpdate.Designer.vb">\r
<SubType>Designer</SubType>\r
<DependentUpon>frmOptions.vb</DependentUpon>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="frmReadDVD.resx">\r
+ <EmbeddedResource Include="frmSelectDVD.resx">\r
<SubType>Designer</SubType>\r
- <DependentUpon>frmReadDVD.vb</DependentUpon>\r
+ <DependentUpon>frmSelectDVD.vb</DependentUpon>\r
</EmbeddedResource>\r
<EmbeddedResource Include="frmMain.resx">\r
<SubType>Designer</SubType>\r
<SubType>Designer</SubType>\r
<DependentUpon>frmQueue.vb</DependentUpon>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="frmSelect.resx">\r
+ <EmbeddedResource Include="frmDVDData.resx">\r
<SubType>Designer</SubType>\r
- <DependentUpon>frmSelect.vb</DependentUpon>\r
+ <DependentUpon>frmDVDData.vb</DependentUpon>\r
</EmbeddedResource>\r
- <EmbeddedResource Include="frmStatus.resx">\r
+ <EmbeddedResource Include="frmReadDVD.resx">\r
<SubType>Designer</SubType>\r
- <DependentUpon>frmStatus.vb</DependentUpon>\r
+ <DependentUpon>frmReadDVD.vb</DependentUpon>\r
</EmbeddedResource>\r
<EmbeddedResource Include="frmUpdate.resx">\r
<SubType>Designer</SubType>\r
\r
<Global.System.Configuration.UserScopedSettingAttribute(), _\r
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _\r
- Global.System.Configuration.DefaultSettingValueAttribute("2.25")> _\r
+ Global.System.Configuration.DefaultSettingValueAttribute("2.3")> _\r
Public Property HandbrakeGUIVersion() As String\r
Get\r
Return CType(Me("HandbrakeGUIVersion"),String)\r
<Global.System.Configuration.UserScopedSettingAttribute(), _\r
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _\r
Global.System.Configuration.DefaultSettingValueAttribute("")> _\r
- Public Property DVDChapter() As String\r
+ Public Property ChapterStart() As String\r
Get\r
- Return CType(Me("DVDChapter"),String)\r
+ Return CType(Me("ChapterStart"),String)\r
End Get\r
Set\r
- Me("DVDChapter") = value\r
+ Me("ChapterStart") = value\r
End Set\r
End Property\r
\r
Me("ReadDVDatStartup") = value\r
End Set\r
End Property\r
+ \r
+ <Global.System.Configuration.UserScopedSettingAttribute(), _\r
+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _\r
+ Global.System.Configuration.DefaultSettingValueAttribute("")> _\r
+ Public Property ChapterFinish() As String\r
+ Get\r
+ Return CType(Me("ChapterFinish"),String)\r
+ End Get\r
+ Set\r
+ Me("ChapterFinish") = value\r
+ End Set\r
+ End Property\r
End Class\r
End Namespace\r
\r
<Value Profile="(Default)">1</Value>\r
</Setting>\r
<Setting Name="HandbrakeGUIVersion" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">2.25</Value>\r
+ <Value Profile="(Default)">2.3</Value>\r
</Setting>\r
<Setting Name="HandbrakeCLIVersion" Type="System.String" Scope="User">\r
<Value Profile="(Default)">0.8.5b1</Value>\r
<Setting Name="DVDSource" Type="System.String" Scope="User">\r
<Value Profile="(Default)" />\r
</Setting>\r
- <Setting Name="DVDChapter" Type="System.String" Scope="User">\r
+ <Setting Name="ChapterStart" Type="System.String" Scope="User">\r
<Value Profile="(Default)" />\r
</Setting>\r
<Setting Name="DVDTitle" Type="System.String" Scope="User">\r
<Setting Name="ReadDVDatStartup" Type="System.Int32" Scope="User">\r
<Value Profile="(Default)">1</Value>\r
</Setting>\r
+ <Setting Name="ChapterFinish" Type="System.String" Scope="User">\r
+ <Value Profile="(Default)" />\r
+ </Setting>\r
</Settings>\r
</SettingsFile>
\ No newline at end of file
<value>1</value>\r
</setting>\r
<setting name="HandbrakeGUIVersion" serializeAs="String">\r
- <value>2.25</value>\r
+ <value>2.3</value>\r
</setting>\r
<setting name="HandbrakeCLIVersion" serializeAs="String">\r
<value>0.8.5b1</value>\r
<setting name="DVDSource" serializeAs="String">\r
<value />\r
</setting>\r
- <setting name="DVDChapter" serializeAs="String">\r
+ <setting name="ChapterStart" serializeAs="String">\r
<value />\r
</setting>\r
<setting name="DVDTitle" serializeAs="String">\r
<setting name="ReadDVDatStartup" serializeAs="String">\r
<value>1</value>\r
</setting>\r
+ <setting name="ChapterFinish" serializeAs="String">\r
+ <value />\r
+ </setting>\r
</Handbrake.My.MySettings>\r
</userSettings>\r
</configuration>\r
End Sub\r
\r
Private Sub frmAbout_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\r
- Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)\r
+ Version.Text = "Version " & My.Settings.HandbrakeGUIVersion\r
End Sub\r
End Class
\ No newline at end of file
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _\r
-Partial Class frmSelect\r
+Partial Class frmDvdData\r
Inherits System.Windows.Forms.Form\r
\r
'Form overrides dispose to clean up the component list.\r
'Do not modify it using the code editor.\r
<System.Diagnostics.DebuggerStepThrough()> _\r
Private Sub InitializeComponent()\r
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSelect))\r
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmDvdData))\r
Me.Label2 = New System.Windows.Forms.Label\r
Me.rtf_dvdInfo = New System.Windows.Forms.RichTextBox\r
Me.btn_close = New System.Windows.Forms.Button\r
Imports System.IO\r
\r
-Public Class frmSelect\r
+Public Class frmDvdData\r
\r
\r
Private Sub frmSelect_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\r
Me.drp_audioCodec = New System.Windows.Forms.ComboBox\r
Me.Label12 = New System.Windows.Forms.Label\r
Me.GroupBox1 = New System.Windows.Forms.GroupBox\r
+ Me.drop_chapterFinish = New System.Windows.Forms.ComboBox\r
+ Me.drop_chapterStart = New System.Windows.Forms.ComboBox\r
Me.drp_dvdtitle = New System.Windows.Forms.ComboBox\r
Me.RadioDVD = New System.Windows.Forms.RadioButton\r
Me.RadioISO = New System.Windows.Forms.RadioButton\r
- Me.Label13 = New System.Windows.Forms.Label\r
Me.btn_Browse = New System.Windows.Forms.Button\r
Me.Label17 = New System.Windows.Forms.Label\r
Me.text_source = New System.Windows.Forms.TextBox\r
Me.Label9 = New System.Windows.Forms.Label\r
- Me.text_chaptors = New System.Windows.Forms.TextBox\r
Me.Label10 = New System.Windows.Forms.Label\r
Me.Version = New System.Windows.Forms.Label\r
Me.btn_encode = New System.Windows.Forms.Button\r
Me.DVD_Save = New System.Windows.Forms.SaveFileDialog\r
Me.File_Save = New System.Windows.Forms.SaveFileDialog\r
Me.lbl_update = New System.Windows.Forms.Label\r
+ Me.Label13 = New System.Windows.Forms.Label\r
Label38 = New System.Windows.Forms.Label\r
Me.frmMainMenu.SuspendLayout()\r
Me.GroupBox4.SuspendLayout()\r
'GroupBox1\r
'\r
Me.GroupBox1.BackColor = System.Drawing.SystemColors.ControlLight\r
+ Me.GroupBox1.Controls.Add(Me.Label13)\r
+ Me.GroupBox1.Controls.Add(Me.drop_chapterFinish)\r
+ Me.GroupBox1.Controls.Add(Me.drop_chapterStart)\r
Me.GroupBox1.Controls.Add(Me.drp_dvdtitle)\r
Me.GroupBox1.Controls.Add(Me.RadioDVD)\r
Me.GroupBox1.Controls.Add(Me.RadioISO)\r
- Me.GroupBox1.Controls.Add(Me.Label13)\r
Me.GroupBox1.Controls.Add(Me.btn_Browse)\r
Me.GroupBox1.Controls.Add(Me.Label17)\r
Me.GroupBox1.Controls.Add(Me.text_source)\r
Me.GroupBox1.Controls.Add(Me.Label9)\r
- Me.GroupBox1.Controls.Add(Me.text_chaptors)\r
Me.GroupBox1.Controls.Add(Me.Label10)\r
Me.GroupBox1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
Me.GroupBox1.ForeColor = System.Drawing.Color.Black\r
Me.GroupBox1.TabStop = False\r
Me.GroupBox1.Text = "Source"\r
'\r
+ 'drop_chapterFinish\r
+ '\r
+ Me.drop_chapterFinish.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
+ Me.drop_chapterFinish.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.drop_chapterFinish.FormattingEnabled = True\r
+ Me.drop_chapterFinish.Location = New System.Drawing.Point(234, 81)\r
+ Me.drop_chapterFinish.Name = "drop_chapterFinish"\r
+ Me.drop_chapterFinish.Size = New System.Drawing.Size(69, 21)\r
+ Me.drop_chapterFinish.TabIndex = 41\r
+ Me.drop_chapterFinish.Text = "Auto"\r
+ '\r
+ 'drop_chapterStart\r
+ '\r
+ Me.drop_chapterStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
+ Me.drop_chapterStart.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.drop_chapterStart.FormattingEnabled = True\r
+ Me.drop_chapterStart.Location = New System.Drawing.Point(121, 81)\r
+ Me.drop_chapterStart.Name = "drop_chapterStart"\r
+ Me.drop_chapterStart.Size = New System.Drawing.Size(69, 21)\r
+ Me.drop_chapterStart.TabIndex = 40\r
+ Me.drop_chapterStart.Text = "Auto"\r
+ '\r
'drp_dvdtitle\r
'\r
Me.drp_dvdtitle.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
Me.RadioISO.Text = "ISO"\r
Me.RadioISO.UseVisualStyleBackColor = True\r
'\r
- 'Label13\r
- '\r
- Me.Label13.AutoSize = True\r
- Me.Label13.Font = New System.Drawing.Font("Verdana", 6.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.Label13.ForeColor = System.Drawing.SystemColors.ControlText\r
- Me.Label13.Location = New System.Drawing.Point(245, 79)\r
- Me.Label13.Name = "Label13"\r
- Me.Label13.Size = New System.Drawing.Size(131, 24)\r
- Me.Label13.TabIndex = 14\r
- Me.Label13.Text = "or e.g 1,3-5" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "For Chapters 1,3,4 and 5"\r
- '\r
'btn_Browse\r
'\r
Me.btn_Browse.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
Me.Label9.TabIndex = 12\r
Me.Label9.Text = "DVD Chapters:"\r
'\r
- 'text_chaptors\r
- '\r
- Me.text_chaptors.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle\r
- Me.text_chaptors.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.text_chaptors.Location = New System.Drawing.Point(121, 81)\r
- Me.text_chaptors.Name = "text_chaptors"\r
- Me.text_chaptors.Size = New System.Drawing.Size(119, 21)\r
- Me.text_chaptors.TabIndex = 3\r
- Me.text_chaptors.Text = "Automatic"\r
- '\r
'Label10\r
'\r
Me.Label10.AutoSize = True\r
Me.Version.Name = "Version"\r
Me.Version.Size = New System.Drawing.Size(141, 20)\r
Me.Version.TabIndex = 411\r
- Me.Version.Text = "Version 2.25"\r
+ Me.Version.Text = "Version 2.3"\r
'\r
'btn_encode\r
'\r
Me.lbl_update.Text = ">> UPDATE AVAILABLE <<"\r
Me.lbl_update.Visible = False\r
'\r
+ 'Label13\r
+ '\r
+ Me.Label13.AutoSize = True\r
+ Me.Label13.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.Label13.Location = New System.Drawing.Point(200, 85)\r
+ Me.Label13.Name = "Label13"\r
+ Me.Label13.Size = New System.Drawing.Size(21, 13)\r
+ Me.Label13.TabIndex = 42\r
+ Me.Label13.Text = "To"\r
+ '\r
'frmMain\r
'\r
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)\r
Friend WithEvents drp_audioCodec As System.Windows.Forms.ComboBox\r
Friend WithEvents Label12 As System.Windows.Forms.Label\r
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox\r
- Friend WithEvents Label13 As System.Windows.Forms.Label\r
Friend WithEvents Label17 As System.Windows.Forms.Label\r
Friend WithEvents text_source As System.Windows.Forms.TextBox\r
Friend WithEvents Label9 As System.Windows.Forms.Label\r
Friend WithEvents drp_processors As System.Windows.Forms.ComboBox\r
Friend WithEvents drp_audioBitrate As System.Windows.Forms.ComboBox\r
Friend WithEvents drp_dvdtitle As System.Windows.Forms.ComboBox\r
- Friend WithEvents text_chaptors As System.Windows.Forms.TextBox\r
Friend WithEvents ToolStripSeparator5 As System.Windows.Forms.ToolStripSeparator\r
Friend WithEvents mnu_viewDVDdata As System.Windows.Forms.ToolStripMenuItem\r
Friend WithEvents Label4 As System.Windows.Forms.Label\r
Friend WithEvents mnu_appleTv As System.Windows.Forms.ToolStripMenuItem\r
Friend WithEvents mnu_presetPS3 As System.Windows.Forms.ToolStripMenuItem\r
Friend WithEvents mnu_faq As System.Windows.Forms.ToolStripMenuItem\r
+ Friend WithEvents drop_chapterFinish As System.Windows.Forms.ComboBox\r
+ Friend WithEvents drop_chapterStart As System.Windows.Forms.ComboBox\r
+ Friend WithEvents Label13 As System.Windows.Forms.Label\r
\r
End Class\r
'Source\r
text_source.Text = My.Settings.DVDSource\r
drp_dvdtitle.Text = My.Settings.DVDTitle\r
- text_chaptors.Text = My.Settings.DVDChapter\r
+ drop_chapterStart.Text = My.Settings.ChapterStart\r
+ drop_chapterFinish.Text = My.Settings.ChapterFinish\r
'Destination\r
text_destination.Text = My.Settings.VideoDest\r
drp_videoEncoder.Text = My.Settings.VideoEncoder\r
'# Read DVD at Startup Dialog\r
'#---------------------------------------------------\r
If My.Settings.ReadDVDatStartup = 1 Then\r
- frmReadDVD.Show()\r
+ frmSelectDVD.Show()\r
End If\r
End Sub\r
\r
'Source\r
Dim source As String = text_source.Text\r
Dim dvdTitle As String = drp_dvdtitle.Text\r
- Dim dvdChaptor As String = text_chaptors.Text\r
+\r
+ Dim ChapterStart As String = drop_chapterStart.Text\r
+ Dim ChapterFinish As String = drop_chapterFinish.Text\r
'Destination\r
Dim destination As String = text_destination.Text\r
Dim videoEncoder As String = drp_videoEncoder.Text\r
Dim StreamWriter As StreamWriter = File.CreateText(filename)\r
StreamWriter.WriteLine(source)\r
StreamWriter.WriteLine(dvdTitle)\r
- StreamWriter.WriteLine(dvdChaptor)\r
+ StreamWriter.WriteLine(ChapterStart)\r
+ StreamWriter.WriteLine(ChapterFinish)\r
StreamWriter.WriteLine(destination)\r
StreamWriter.WriteLine(videoEncoder)\r
StreamWriter.WriteLine(audioEncoder)\r
StreamWriter.WriteLine(deinterlace)\r
StreamWriter.WriteLine(grayscale)\r
StreamWriter.WriteLine(videoFramerate)\r
- StreamWriter.WriteLine(ChapterMarkers) '# Fixed Pixel Ratio not saved bug\r
+ StreamWriter.WriteLine(ChapterMarkers)\r
StreamWriter.WriteLine(pixelRation)\r
StreamWriter.WriteLine(audioBitrate)\r
StreamWriter.WriteLine(audioSampleRate)\r
\r
text_source.Text = inputStream.ReadLine()\r
drp_dvdtitle.Text = inputStream.ReadLine()\r
- text_chaptors.Text = inputStream.ReadLine()\r
+ drop_chapterStart.Text = inputStream.ReadLine()\r
+ drop_chapterFinish.Text = inputStream.ReadLine()\r
text_destination.Text = inputStream.ReadLine()\r
drp_videoEncoder.Text = inputStream.ReadLine()\r
drp_audioCodec.Text = inputStream.ReadLine()\r
check_DeInterlace.CheckState = inputStream.ReadLine()\r
check_grayscale.CheckState = inputStream.ReadLine()\r
drp_videoFramerate.Text = inputStream.ReadLine()\r
- CheckPixelRatio.CheckState = inputStream.ReadLine() '# Fix for pixel ratio not being saved\r
Check_ChapterMarkers.CheckState = inputStream.ReadLine()\r
+ CheckPixelRatio.CheckState = inputStream.ReadLine()\r
drp_audioBitrate.Text = inputStream.ReadLine()\r
drp_audioSampleRate.Text = inputStream.ReadLine()\r
drp_audioChannels.Text = inputStream.ReadLine()\r
'Source\r
My.Settings.DVDSource = text_source.Text\r
My.Settings.DVDTitle = drp_dvdtitle.Text\r
- My.Settings.DVDChapter = text_chaptors.Text\r
+ My.Settings.ChapterStart = drop_chapterStart.Text\r
+ My.Settings.ChapterFinish = drop_chapterFinish.Text\r
'Destination\r
My.Settings.VideoDest = text_destination.Text\r
My.Settings.VideoEncoder = drp_videoEncoder.Text\r
End Sub\r
\r
Private Sub mnu_viewDVDdata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_viewDVDdata.Click\r
- frmSelect.Show()\r
+ frmDvdData.Show()\r
End Sub\r
\r
'Some Presets\r
Private Sub mnu_preset_ipod133_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_preset_ipod133.Click\r
+ CheckPixelRatio.CheckState = CheckState.Unchecked\r
text_width.Text = "640"\r
text_height.Text = "480"\r
drp_videoEncoder.Text = "H.264 (iPod)"\r
slider_videoQuality.Value = 0\r
SliderValue.Text = "0%"\r
drp_audioBitrate.Text = "160"\r
-\r
+ rtf_h264advanced.Text = ""\r
+ drp_crop.Text = "No Crop"\r
End Sub\r
\r
Private Sub mnu_preset_ipod178_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_preset_ipod178.Click\r
+ CheckPixelRatio.CheckState = CheckState.Unchecked\r
text_width.Text = "640"\r
text_height.Text = "352"\r
drp_videoEncoder.Text = "H.264 (iPod)"\r
slider_videoQuality.Value = 0\r
SliderValue.Text = "0%"\r
drp_audioBitrate.Text = "160"\r
+ rtf_h264advanced.Text = ""\r
+ drp_crop.Text = "No Crop"\r
End Sub\r
\r
Private Sub mnu_preset_ipod235_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_preset_ipod235.Click\r
+ CheckPixelRatio.CheckState = CheckState.Unchecked\r
text_width.Text = "640"\r
text_height.Text = "272"\r
drp_videoEncoder.Text = "H.264 (iPod)"\r
slider_videoQuality.Value = 0\r
SliderValue.Text = "0%"\r
drp_audioBitrate.Text = "160"\r
+ rtf_h264advanced.Text = ""\r
+ drp_crop.Text = "No Crop"\r
End Sub\r
\r
Private Sub mnu_presetPS3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_presetPS3.Click\r
+ CheckPixelRatio.CheckState = CheckState.Unchecked\r
text_width.Text = ""\r
text_height.Text = ""\r
drp_videoEncoder.Text = "H.264"\r
CheckPixelRatio.CheckState = CheckState.Checked\r
drp_audioSampleRate.Text = "48"\r
rtf_h264advanced.Text = "level=41"\r
+ drp_crop.Text = "No Crop"\r
End Sub\r
\r
Private Sub mnu_appleTv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_appleTv.Click\r
CheckPixelRatio.CheckState = CheckState.Checked\r
drp_audioSampleRate.Text = "48"\r
rtf_h264advanced.Text = "bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:no-dct-decimate=1:trellis=2"\r
+ drp_crop.Text = "No Crop"\r
End Sub\r
\r
-\r
-\r
Private Sub mnu_options_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnu_options.Click\r
frmOptions.Show()\r
End Sub\r
filename = DVD_Open.SelectedPath\r
text_source.Text = filename\r
If filename <> "" Then\r
- frmStatus.Show()\r
+ frmReadDVD.Show()\r
End If\r
Else\r
ISO_Open.ShowDialog()\r
filename = ISO_Open.FileName\r
text_source.Text = filename\r
If filename <> "" Then\r
- frmStatus.Show()\r
+ frmReadDVD.Show()\r
End If\r
End If\r
End Sub\r
Dim query As String\r
Dim ApplicationPath As String = Application.StartupPath\r
\r
+ If (frmQueue.list_queue.Items.Count > 0) Then\r
+ MessageBox.Show("ALERT: You have items on the video queue. If you wish to run the queue, click the Enocde Videos button on the Queue window.")\r
+ End If\r
+\r
Try\r
If (QueryEditorText.Text = "") Then\r
query = GenerateTheQuery()\r
'#\r
'#\r
\r
+ Private Sub drop_chapterFinish_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles drop_chapterFinish.SelectedIndexChanged\r
+ Dim chapterFinish As Integer = drop_chapterFinish.Text\r
+ Dim chapterStart As Integer = drop_chapterStart.Text\r
+\r
+ Try\r
+ If (chapterFinish < chapterStart) Then\r
+ MessageBox.Show("Error: Invalid Chapter Range! - Final chapter can not be smaller than the starting chapter.")\r
+ End If\r
+ Catch ex As Exception\r
+ MessageBox.Show("Invalid Character Entered")\r
+ End Try\r
+ End Sub\r
+\r
+ Private Sub drop_chapterStart_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles drop_chapterStart.SelectedIndexChanged\r
+ Dim chapterFinish As Integer = drop_chapterFinish.Text\r
+ Dim chapterStart As Integer = drop_chapterStart.Text\r
+\r
+ Try\r
+ If (chapterStart > chapterFinish) Then\r
+ MessageBox.Show("Error: Invalid Chapter Range! - Start chapter can not be larger than the Final chapter.")\r
+ End If\r
+ Catch ex As Exception\r
+ MessageBox.Show("Invalid Character Entered")\r
+ End Try\r
+ End Sub\r
+\r
Private Sub text_bitrate_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles text_bitrate.TextChanged\r
text_filesize.Text = ""\r
slider_videoQuality.Value = 0\r
\r
TempLine = ReadLine.Split("~")\r
If TempLine(0).Replace("+ ", "").Trim.Equals("title " & title & ":") Then\r
+ '### Set the 2 Title boxes.\r
+ Tempdata = TempLine(4).Split("&")\r
+ TempCount = Tempdata.Length\r
+\r
+ Dim chapterNumber() As String\r
+ Dim chapter As String\r
+\r
+ drop_chapterStart.Items.Clear()\r
+ drop_chapterFinish.Items.Clear()\r
+\r
+ drop_chapterStart.Text = "1"\r
+ drop_chapterFinish.Text = TempCount - 1\r
+\r
+\r
+ While counter <> TempCount\r
+ chapterNumber = Tempdata(counter).Split(":")\r
+ chapter = chapterNumber(0).Replace("+ ", "").Trim\r
+\r
+ drop_chapterStart.Items.Add(chapter)\r
+ drop_chapterFinish.Items.Add(chapter)\r
+\r
+ counter = counter + 1\r
+ End While\r
+ counter = 1 ' Reset the counter for reuse\r
+\r
+\r
\r
'### Here we populate the subtitle box.\r
Tempdata = TempLine(6).Split("&")\r
'Source\r
Dim source As String = text_source.Text\r
Dim dvdTitle As String = drp_dvdtitle.Text\r
- Dim dvdChaptor As String = text_chaptors.Text\r
+ Dim chapterStart As String = drop_chapterStart.Text\r
+ Dim chapterFinish As String = drop_chapterFinish.Text\r
+ Dim totalChapters As String = drop_chapterFinish.Items.Count - 1\r
+ Dim dvdChapter As String = ""\r
+\r
+\r
\r
If (source = "") Then\r
MessageBox.Show("ERROR: No Source has been selected.")\r
dvdTitle = " -t " + titleInfo(0)\r
End If\r
\r
- If (dvdChaptor = "Automatic") Then\r
- dvdChaptor = ""\r
- ElseIf (dvdChaptor = "") Then\r
- dvdChaptor = ""\r
+ If (chapterFinish.Equals("Auto") And chapterStart.Equals("Auto")) Then\r
+ dvdChapter = ""\r
+ ElseIf (chapterFinish = totalChapters & chapterStart > 1) Then\r
+ dvdChapter = ""\r
Else\r
- dvdChaptor = " -c " + dvdChaptor\r
+ dvdChapter = " -c " + chapterStart + "-" + chapterFinish\r
End If\r
\r
- Dim querySource As String = source + dvdTitle + dvdChaptor\r
+ Dim querySource As String = source + dvdTitle + dvdChapter\r
'----------------------------------------------------------------------\r
\r
'Destination\r
'------------------------------------------------\r
\r
\r
- \r
End Class
\ No newline at end of file
Me.btn_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
Me.btn_Close.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
Me.btn_Close.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
- Me.btn_Close.Location = New System.Drawing.Point(485, 403)\r
+ Me.btn_Close.Location = New System.Drawing.Point(16, 403)\r
Me.btn_Close.Name = "btn_Close"\r
Me.btn_Close.Size = New System.Drawing.Size(124, 22)\r
Me.btn_Close.TabIndex = 20\r
Me.btn_q_encoder.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
Me.btn_q_encoder.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
Me.btn_q_encoder.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
- Me.btn_q_encoder.Location = New System.Drawing.Point(16, 403)\r
+ Me.btn_q_encoder.Location = New System.Drawing.Point(485, 403)\r
Me.btn_q_encoder.Name = "btn_q_encoder"\r
Me.btn_q_encoder.Size = New System.Drawing.Size(124, 22)\r
Me.btn_q_encoder.TabIndex = 22\r
Me.btn_delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
Me.btn_delete.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
Me.btn_delete.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
- Me.btn_delete.Location = New System.Drawing.Point(146, 403)\r
+ Me.btn_delete.Location = New System.Drawing.Point(355, 403)\r
Me.btn_delete.Name = "btn_delete"\r
Me.btn_delete.Size = New System.Drawing.Size(124, 22)\r
Me.btn_delete.TabIndex = 24\r
<System.Diagnostics.DebuggerStepThrough()> _\r
Private Sub InitializeComponent()\r
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmReadDVD))\r
- Me.RadioDVD = New System.Windows.Forms.RadioButton\r
- Me.RadioISO = New System.Windows.Forms.RadioButton\r
- Me.btn_Browse = New System.Windows.Forms.Button\r
- Me.Label17 = New System.Windows.Forms.Label\r
- Me.text_source = New System.Windows.Forms.TextBox\r
Me.Label1 = New System.Windows.Forms.Label\r
- Me.btn_close = New System.Windows.Forms.Button\r
- Me.ISO_Open = New System.Windows.Forms.OpenFileDialog\r
- Me.DVD_Open = New System.Windows.Forms.FolderBrowserDialog\r
+ Me.Label2 = New System.Windows.Forms.Label\r
+ Me.Label3 = New System.Windows.Forms.Label\r
+ Me.btn_ok = New System.Windows.Forms.Button\r
Me.SuspendLayout()\r
'\r
- 'RadioDVD\r
- '\r
- Me.RadioDVD.AutoSize = True\r
- Me.RadioDVD.Checked = True\r
- Me.RadioDVD.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.RadioDVD.Location = New System.Drawing.Point(265, 30)\r
- Me.RadioDVD.Name = "RadioDVD"\r
- Me.RadioDVD.Size = New System.Drawing.Size(51, 17)\r
- Me.RadioDVD.TabIndex = 45\r
- Me.RadioDVD.TabStop = True\r
- Me.RadioDVD.Text = "DVD"\r
- Me.RadioDVD.UseVisualStyleBackColor = True\r
- '\r
- 'RadioISO\r
- '\r
- Me.RadioISO.AutoSize = True\r
- Me.RadioISO.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.RadioISO.Location = New System.Drawing.Point(265, 46)\r
- Me.RadioISO.Name = "RadioISO"\r
- Me.RadioISO.Size = New System.Drawing.Size(47, 17)\r
- Me.RadioISO.TabIndex = 44\r
- Me.RadioISO.Text = "ISO"\r
- Me.RadioISO.UseVisualStyleBackColor = True\r
- '\r
- 'btn_Browse\r
- '\r
- Me.btn_Browse.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
- Me.btn_Browse.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
- Me.btn_Browse.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.btn_Browse.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
- Me.btn_Browse.Location = New System.Drawing.Point(321, 35)\r
- Me.btn_Browse.Name = "btn_Browse"\r
- Me.btn_Browse.Size = New System.Drawing.Size(78, 22)\r
- Me.btn_Browse.TabIndex = 41\r
- Me.btn_Browse.Text = "Browse"\r
- Me.btn_Browse.UseVisualStyleBackColor = True\r
- '\r
- 'Label17\r
- '\r
- Me.Label17.AutoSize = True\r
- Me.Label17.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.Label17.ForeColor = System.Drawing.Color.Black\r
- Me.Label17.Location = New System.Drawing.Point(-97, 30)\r
- Me.Label17.Name = "Label17"\r
- Me.Label17.Size = New System.Drawing.Size(52, 13)\r
- Me.Label17.TabIndex = 42\r
- Me.Label17.Text = "Source:"\r
- '\r
- 'text_source\r
- '\r
- Me.text_source.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle\r
- Me.text_source.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.text_source.Location = New System.Drawing.Point(16, 36)\r
- Me.text_source.Name = "text_source"\r
- Me.text_source.Size = New System.Drawing.Size(242, 21)\r
- Me.text_source.TabIndex = 40\r
- '\r
'Label1\r
'\r
Me.Label1.AutoSize = True\r
- Me.Label1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.Label1.Location = New System.Drawing.Point(13, 13)\r
+ Me.Label1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.Label1.Location = New System.Drawing.Point(81, 42)\r
Me.Label1.Name = "Label1"\r
- Me.Label1.Size = New System.Drawing.Size(126, 13)\r
- Me.Label1.TabIndex = 46\r
- Me.Label1.Text = "Select DVD Source"\r
- '\r
- 'btn_close\r
- '\r
- Me.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
- Me.btn_close.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
- Me.btn_close.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.btn_close.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
- Me.btn_close.Location = New System.Drawing.Point(321, 77)\r
- Me.btn_close.Name = "btn_close"\r
- Me.btn_close.Size = New System.Drawing.Size(78, 22)\r
- Me.btn_close.TabIndex = 47\r
- Me.btn_close.Text = "Close"\r
- Me.btn_close.UseVisualStyleBackColor = True\r
- '\r
- 'ISO_Open\r
- '\r
- Me.ISO_Open.DefaultExt = "iso"\r
- Me.ISO_Open.Filter = "iso|*.iso"\r
- '\r
- 'frmReadDVD\r
+ Me.Label1.Size = New System.Drawing.Size(364, 13)\r
+ Me.Label1.TabIndex = 20\r
+ Me.Label1.Text = "Please click OK to continue, This process may take a moment."\r
+ '\r
+ 'Label2\r
+ '\r
+ Me.Label2.AutoSize = True\r
+ Me.Label2.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.Label2.Location = New System.Drawing.Point(23, 20)\r
+ Me.Label2.Name = "Label2"\r
+ Me.Label2.Size = New System.Drawing.Size(52, 13)\r
+ Me.Label2.TabIndex = 21\r
+ Me.Label2.Text = "Status:"\r
+ '\r
+ 'Label3\r
+ '\r
+ Me.Label3.AutoSize = True\r
+ Me.Label3.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.Label3.Location = New System.Drawing.Point(81, 21)\r
+ Me.Label3.Name = "Label3"\r
+ Me.Label3.Size = New System.Drawing.Size(124, 13)\r
+ Me.Label3.TabIndex = 22\r
+ Me.Label3.Text = "Reading Disc Data..."\r
+ '\r
+ 'btn_ok\r
+ '\r
+ Me.btn_ok.BackColor = System.Drawing.SystemColors.ActiveBorder\r
+ Me.btn_ok.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
+ Me.btn_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
+ Me.btn_ok.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.btn_ok.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
+ Me.btn_ok.Location = New System.Drawing.Point(454, 69)\r
+ Me.btn_ok.Name = "btn_ok"\r
+ Me.btn_ok.Size = New System.Drawing.Size(56, 22)\r
+ Me.btn_ok.TabIndex = 23\r
+ Me.btn_ok.TabStop = False\r
+ Me.btn_ok.Text = "Ok"\r
+ Me.btn_ok.UseVisualStyleBackColor = False\r
+ '\r
+ 'frmStatus\r
'\r
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)\r
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\r
- Me.ClientSize = New System.Drawing.Size(418, 111)\r
- Me.Controls.Add(Me.btn_close)\r
+ Me.BackColor = System.Drawing.SystemColors.Control\r
+ Me.ClientSize = New System.Drawing.Size(518, 98)\r
+ Me.ControlBox = False\r
+ Me.Controls.Add(Me.btn_ok)\r
+ Me.Controls.Add(Me.Label3)\r
+ Me.Controls.Add(Me.Label2)\r
Me.Controls.Add(Me.Label1)\r
- Me.Controls.Add(Me.RadioDVD)\r
- Me.Controls.Add(Me.RadioISO)\r
- Me.Controls.Add(Me.btn_Browse)\r
- Me.Controls.Add(Me.Label17)\r
- Me.Controls.Add(Me.text_source)\r
+ Me.Cursor = System.Windows.Forms.Cursors.Default\r
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)\r
- Me.Name = "frmReadDVD"\r
- Me.Text = "Read DVD"\r
+ Me.Name = "frmStatus"\r
+ Me.Padding = New System.Windows.Forms.Padding(1)\r
+ Me.ShowIcon = False\r
+ Me.ShowInTaskbar = False\r
+ Me.Text = "Reading DVD..."\r
Me.TopMost = True\r
Me.ResumeLayout(False)\r
Me.PerformLayout()\r
\r
End Sub\r
- Friend WithEvents RadioDVD As System.Windows.Forms.RadioButton\r
- Friend WithEvents RadioISO As System.Windows.Forms.RadioButton\r
- Friend WithEvents btn_Browse As System.Windows.Forms.Button\r
- Friend WithEvents Label17 As System.Windows.Forms.Label\r
- Friend WithEvents text_source As System.Windows.Forms.TextBox\r
Friend WithEvents Label1 As System.Windows.Forms.Label\r
- Friend WithEvents btn_close As System.Windows.Forms.Button\r
- Friend WithEvents ISO_Open As System.Windows.Forms.OpenFileDialog\r
- Friend WithEvents DVD_Open As System.Windows.Forms.FolderBrowserDialog\r
+ Friend WithEvents Label2 As System.Windows.Forms.Label\r
+ Friend WithEvents Label3 As System.Windows.Forms.Label\r
+ Friend WithEvents btn_ok As System.Windows.Forms.Button\r
End Class\r
<resheader name="writer">\r
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
</resheader>\r
- <metadata name="ISO_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>536, 17</value>\r
- </metadata>\r
- <metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
- <value>638, 17</value>\r
- </metadata>\r
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
+Imports System.IO\r
+Imports System\r
+Imports System.Diagnostics\r
+Imports System.Threading\r
+\r
Public Class frmReadDVD\r
\r
- Private Sub btn_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Browse.Click\r
- Dim filename As String\r
- If RadioDVD.Checked Then\r
- DVD_Open.ShowDialog()\r
- filename = DVD_Open.SelectedPath\r
- text_source.Text = filename\r
- frmMain.text_source.Text = filename\r
- If filename <> "" Then\r
- frmStatus.Show()\r
- Me.Close()\r
- End If\r
-\r
- Else\r
- ISO_Open.ShowDialog()\r
- filename = ISO_Open.FileName\r
- text_source.Text = filename\r
- frmMain.text_source.Text = filename\r
- If filename <> "" Then\r
- frmStatus.Show()\r
- Me.Close()\r
- End If\r
- End If\r
+ '#\r
+ '# Start Reading the DVD as soon as the window launches\r
+ '# Write the output to dvdinfo.dat\r
+ '#\r
+ Private Sub frmStatus_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\r
+ Me.Show()\r
+ Dim ApplicationPath As String = Application.StartupPath\r
+\r
+ Try\r
+ Shell("cmd /c """"" + ApplicationPath + "\hbcli.exe"" -i """ + frmMain.text_source.Text + """" & " -t0 >" + """" + ApplicationPath + "\dvdinfo.dat""" + " 2>&1""")\r
+ Catch ex As Exception\r
+ MessageBox.Show("ERROR: There was a problem launching the encoder. Code: frmS-1")\r
+ MessageBox.Show(ex.ToString)\r
+ End Try\r
End Sub\r
\r
- Private Sub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.Click\r
+ '#\r
+ '#\r
+ '# Ok Button Handler\r
+ '# Stage 1 - Wait til hbcli.exe has finished writing data out to file dvdinfo.dat\r
+ '# Stage 2 - Parse the dvdinfo.dat file\r
+ '# Stage 3 - output the parsed version to dvd.dat or handle errors if any\r
+ '#\r
+ '#\r
+\r
+ Private Sub btn_ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ok.Click\r
+ '# Stage 1 - Wait til the hbcli exe has finished\r
+ Dim isRunning As Integer\r
+ Dim process2 As Process = New Process\r
+ Dim running As Boolean = True\r
+ Dim hbProcess As Process() = Process.GetProcesses()\r
+\r
+ While running\r
+ Thread.Sleep(1000)\r
+ hbProcess = Process.GetProcesses()\r
+ running = False\r
+ Dim processArr2 As Process() = hbProcess\r
+ Dim i As Integer = 0\r
+ While i < CInt(processArr2.Length)\r
+ Dim process1 As Process = processArr2(i)\r
+ If process1.ProcessName.Equals("hbcli") Then\r
+ running = True\r
+ End If\r
+ i = i + 1\r
+ End While\r
+ End While\r
+ isRunning = 0\r
+\r
+\r
+ '# Stage 2 - Parse the dvdinfo.dat file\r
+ '# This involves creating a string for each title and putting it into an array.\r
+ '# This array is called dvdData()\r
+\r
+\r
+ ' Lets clean any previous contents out of the DVD Title dropdown.\r
+ frmMain.drp_dvdtitle.Items.Clear()\r
+\r
+ Dim file_path As String = Application.StartupPath\r
+ Dim errStatus As Integer = 0\r
+ Dim dvdData(150) As String\r
+ Dim break As Boolean = False\r
+ Dim titleError As Boolean = False\r
+\r
+ Try\r
+ ' Parse the Data into a Single String with ~ Sepeartor\r
+ Dim RlineFile As StreamReader = File.OpenText(file_path & "\dvdinfo.dat")\r
+ Dim RLine As String\r
+ Dim titleData As String = ""\r
+ Dim ChaptStatus As Integer = 0\r
+ Dim AudioTrackStatus As Integer = 0\r
+ Dim SubtitleStatus As Integer = 0\r
+ Dim counter As Integer = 0\r
+ Dim counter2 As String = 0\r
+ Dim ErrorCounter As Integer = 0\r
+ RLine = "---"\r
+ dvdData(counter2) = "---Start---"\r
+\r
+ While RLine <> Nothing\r
+ If (RLine.Contains("+ title")) Then\r
+ If (titleData <> "") Then\r
+ dvdData(counter2) = titleData\r
+ add(titleData)\r
+ counter2 = counter2 + 1\r
+ End If\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 0\r
+ SubtitleStatus = 0\r
+ titleData = RLine.Trim\r
+ ElseIf (RLine.Contains("exited.")) Then\r
+ add(titleData)\r
+ dvdData(counter2) = titleData\r
+ counter2 = counter2 + 1\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 0\r
+ SubtitleStatus = 0\r
+ break = True\r
+ ElseIf (RLine.Contains("***")) Then\r
+ errStatus = 1\r
+ ElseIf (RLine.Contains("No title")) Then\r
+ titleError = True\r
+ break = True\r
+ ElseIf (RLine.Contains("+ duration")) Then\r
+ titleData = titleData & " ~ " & RLine.Trim\r
+ ElseIf (RLine.Contains("+ size")) Then\r
+ titleData = titleData & " ~ " & RLine.Trim\r
+ ElseIf (RLine.Contains("+ autocrop")) Then\r
+ titleData = titleData & " ~ " & RLine.Trim\r
+ ElseIf (RLine.Contains("+ chapters")) Then\r
+ titleData = titleData & " ~ " & RLine.Trim\r
+ ChaptStatus = 1\r
+ AudioTrackStatus = 0\r
+ SubtitleStatus = 0\r
+ ElseIf (RLine.Contains("+ audio")) Then\r
+ titleData = titleData & " ~ " & RLine.Trim\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 1\r
+ SubtitleStatus = 0\r
+ ElseIf (RLine.Contains("+ subtitle tracks")) Then\r
+ titleData = titleData & " ~ " & RLine.Trim\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 0\r
+ SubtitleStatus = 1\r
+\r
+ ElseIf (ChaptStatus = 1) Then\r
+ ' This IF statment is here incase no chapters appear.\r
+ If (RLine.Contains("+ audio")) Then\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 1\r
+ SubtitleStatus = 0\r
+ End If\r
+ titleData = titleData & " & " & RLine.Trim\r
+\r
+ ElseIf (AudioTrackStatus = 1) Then\r
+ 'This if statment is here incase there was no audio tracks\r
+ If (RLine.Contains("+ subtitle tracks")) Then\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 1\r
+ SubtitleStatus = 0\r
+ End If\r
+ titleData = titleData & " & " & RLine.Trim\r
+\r
+ ElseIf (SubtitleStatus = 1) Then\r
+ If (RLine.Contains("+ title")) Then\r
+ If (titleData <> "") Then\r
+ dvdData(counter2) = titleData\r
+ counter2 = counter2 + 1\r
+ End If\r
+ ChaptStatus = 0\r
+ AudioTrackStatus = 0\r
+ SubtitleStatus = 0\r
+ titleData = RLine.Trim\r
+ Else\r
+ titleData = titleData & " & " & RLine.Trim\r
+ End If\r
+ End If\r
+ RLine = RlineFile.ReadLine()\r
+\r
+ If break = True Then\r
+ RLine = Nothing\r
+ ElseIf RLine = "" Then\r
+ RLine = " "\r
+ ErrorCounter = ErrorCounter + 1\r
+ If ErrorCounter = 50 Then\r
+ RLine = Nothing\r
+ End If\r
+ End If\r
+\r
+ counter = counter + 1\r
+ End While\r
+ '# Close the file. Its no longer needed here.\r
+ RlineFile.Close()\r
+\r
+ Catch ex As Exception\r
+ MessageBox.Show(ex.ToString) ' Debug\r
+ End Try\r
+\r
+ '# Stage 4 - Write the parsed data out into a file. \r
+ '# But, if theres a problem, display an error message instead\r
+ If errStatus = 1 Then\r
+ MessageBox.Show("ERROR: Error Reading the DVD. Some Title information may not be available.")\r
+ End If\r
+\r
+ If titleError = True Then\r
+ MessageBox.Show("ERROR: No Title(s) found.")\r
+ End If\r
+\r
+ Try\r
+ Dim DataWriter As StreamWriter = New StreamWriter(file_path & "\dvd.dat")\r
+ Dim dvdCount As Integer = dvdData.Length\r
+ Dim counter As String = 0\r
+\r
+ While counter <> dvdCount\r
+ DataWriter.WriteLine(dvdData(counter))\r
+ counter = counter + 1\r
+ End While\r
+ DataWriter.Close()\r
+\r
+ Catch ex As Exception\r
+ MessageBox.Show("ERROR: Unable to write Data file. Please make sure the application has admin privileges.")\r
+ End Try\r
+\r
Me.Close()\r
End Sub\r
+\r
+ '# A function to Add data to frmSelects Select Title Tab and also populate frmMains dvdTitle Tab\r
+ Function add(ByVal titleData)\r
+ Dim titleInfo() As String\r
+ Dim str(7) As String\r
+ Dim data As String = ""\r
+\r
+ titleInfo = titleData.Split("~")\r
+ Try\r
+ str(0) = titleInfo(0).Trim.Substring(8).Replace(":", "") 'Title\r
+ str(1) = titleInfo(1).Trim.Substring(12) ' Duration\r
+ Catch ex As Exception\r
+ MessageBox.Show(ex.ToString)\r
+ MessageBox.Show("ERROR: Incomplete DVD data found. Please copy the data on the View DVD Information tab and report this error.")\r
+ End Try\r
+\r
+ 'Now lets add the info to the main form dropdowns\r
+ frmMain.drp_dvdtitle.Items.Add(str(0) & " (" & str(1) & ")")\r
+\r
+ Return 0\r
+ End Function\r
+\r
End Class
\ No newline at end of file
--- /dev/null
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _\r
+Partial Class frmSelectDVD\r
+ Inherits System.Windows.Forms.Form\r
+\r
+ 'Form overrides dispose to clean up the component list.\r
+ <System.Diagnostics.DebuggerNonUserCode()> _\r
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)\r
+ If disposing AndAlso components IsNot Nothing Then\r
+ components.Dispose()\r
+ End If\r
+ MyBase.Dispose(disposing)\r
+ End Sub\r
+\r
+ 'Required by the Windows Form Designer\r
+ Private components As System.ComponentModel.IContainer\r
+\r
+ 'NOTE: The following procedure is required by the Windows Form Designer\r
+ 'It can be modified using the Windows Form Designer. \r
+ 'Do not modify it using the code editor.\r
+ <System.Diagnostics.DebuggerStepThrough()> _\r
+ Private Sub InitializeComponent()\r
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSelectDVD))\r
+ Me.RadioDVD = New System.Windows.Forms.RadioButton\r
+ Me.RadioISO = New System.Windows.Forms.RadioButton\r
+ Me.btn_Browse = New System.Windows.Forms.Button\r
+ Me.Label17 = New System.Windows.Forms.Label\r
+ Me.text_source = New System.Windows.Forms.TextBox\r
+ Me.Label1 = New System.Windows.Forms.Label\r
+ Me.btn_close = New System.Windows.Forms.Button\r
+ Me.ISO_Open = New System.Windows.Forms.OpenFileDialog\r
+ Me.DVD_Open = New System.Windows.Forms.FolderBrowserDialog\r
+ Me.SuspendLayout()\r
+ '\r
+ 'RadioDVD\r
+ '\r
+ Me.RadioDVD.AutoSize = True\r
+ Me.RadioDVD.Checked = True\r
+ Me.RadioDVD.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.RadioDVD.Location = New System.Drawing.Point(265, 30)\r
+ Me.RadioDVD.Name = "RadioDVD"\r
+ Me.RadioDVD.Size = New System.Drawing.Size(51, 17)\r
+ Me.RadioDVD.TabIndex = 45\r
+ Me.RadioDVD.TabStop = True\r
+ Me.RadioDVD.Text = "DVD"\r
+ Me.RadioDVD.UseVisualStyleBackColor = True\r
+ '\r
+ 'RadioISO\r
+ '\r
+ Me.RadioISO.AutoSize = True\r
+ Me.RadioISO.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.RadioISO.Location = New System.Drawing.Point(265, 46)\r
+ Me.RadioISO.Name = "RadioISO"\r
+ Me.RadioISO.Size = New System.Drawing.Size(47, 17)\r
+ Me.RadioISO.TabIndex = 44\r
+ Me.RadioISO.Text = "ISO"\r
+ Me.RadioISO.UseVisualStyleBackColor = True\r
+ '\r
+ 'btn_Browse\r
+ '\r
+ Me.btn_Browse.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
+ Me.btn_Browse.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
+ Me.btn_Browse.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.btn_Browse.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
+ Me.btn_Browse.Location = New System.Drawing.Point(321, 35)\r
+ Me.btn_Browse.Name = "btn_Browse"\r
+ Me.btn_Browse.Size = New System.Drawing.Size(78, 22)\r
+ Me.btn_Browse.TabIndex = 41\r
+ Me.btn_Browse.Text = "Browse"\r
+ Me.btn_Browse.UseVisualStyleBackColor = True\r
+ '\r
+ 'Label17\r
+ '\r
+ Me.Label17.AutoSize = True\r
+ Me.Label17.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.Label17.ForeColor = System.Drawing.Color.Black\r
+ Me.Label17.Location = New System.Drawing.Point(-97, 30)\r
+ Me.Label17.Name = "Label17"\r
+ Me.Label17.Size = New System.Drawing.Size(52, 13)\r
+ Me.Label17.TabIndex = 42\r
+ Me.Label17.Text = "Source:"\r
+ '\r
+ 'text_source\r
+ '\r
+ Me.text_source.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle\r
+ Me.text_source.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.text_source.Location = New System.Drawing.Point(16, 36)\r
+ Me.text_source.Name = "text_source"\r
+ Me.text_source.Size = New System.Drawing.Size(242, 21)\r
+ Me.text_source.TabIndex = 40\r
+ '\r
+ 'Label1\r
+ '\r
+ Me.Label1.AutoSize = True\r
+ Me.Label1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.Label1.Location = New System.Drawing.Point(13, 13)\r
+ Me.Label1.Name = "Label1"\r
+ Me.Label1.Size = New System.Drawing.Size(126, 13)\r
+ Me.Label1.TabIndex = 46\r
+ Me.Label1.Text = "Select DVD Source"\r
+ '\r
+ 'btn_close\r
+ '\r
+ Me.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
+ Me.btn_close.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
+ Me.btn_close.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
+ Me.btn_close.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
+ Me.btn_close.Location = New System.Drawing.Point(321, 77)\r
+ Me.btn_close.Name = "btn_close"\r
+ Me.btn_close.Size = New System.Drawing.Size(78, 22)\r
+ Me.btn_close.TabIndex = 47\r
+ Me.btn_close.Text = "Close"\r
+ Me.btn_close.UseVisualStyleBackColor = True\r
+ '\r
+ 'ISO_Open\r
+ '\r
+ Me.ISO_Open.DefaultExt = "iso"\r
+ Me.ISO_Open.Filter = "iso|*.iso"\r
+ '\r
+ 'frmReadDVD\r
+ '\r
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)\r
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\r
+ Me.ClientSize = New System.Drawing.Size(418, 111)\r
+ Me.Controls.Add(Me.btn_close)\r
+ Me.Controls.Add(Me.Label1)\r
+ Me.Controls.Add(Me.RadioDVD)\r
+ Me.Controls.Add(Me.RadioISO)\r
+ Me.Controls.Add(Me.btn_Browse)\r
+ Me.Controls.Add(Me.Label17)\r
+ Me.Controls.Add(Me.text_source)\r
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)\r
+ Me.Name = "frmReadDVD"\r
+ Me.Text = "Read DVD"\r
+ Me.TopMost = True\r
+ Me.ResumeLayout(False)\r
+ Me.PerformLayout()\r
+\r
+ End Sub\r
+ Friend WithEvents RadioDVD As System.Windows.Forms.RadioButton\r
+ Friend WithEvents RadioISO As System.Windows.Forms.RadioButton\r
+ Friend WithEvents btn_Browse As System.Windows.Forms.Button\r
+ Friend WithEvents Label17 As System.Windows.Forms.Label\r
+ Friend WithEvents text_source As System.Windows.Forms.TextBox\r
+ Friend WithEvents Label1 As System.Windows.Forms.Label\r
+ Friend WithEvents btn_close As System.Windows.Forms.Button\r
+ Friend WithEvents ISO_Open As System.Windows.Forms.OpenFileDialog\r
+ Friend WithEvents DVD_Open As System.Windows.Forms.FolderBrowserDialog\r
+End Class\r
<resheader name="writer">\r
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
</resheader>\r
+ <metadata name="ISO_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>536, 17</value>\r
+ </metadata>\r
+ <metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>638, 17</value>\r
+ </metadata>\r
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
--- /dev/null
+Public Class frmSelectDVD\r
+\r
+ Private Sub btn_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Browse.Click\r
+ Dim filename As String\r
+ If RadioDVD.Checked Then\r
+ DVD_Open.ShowDialog()\r
+ filename = DVD_Open.SelectedPath\r
+ text_source.Text = filename\r
+ frmMain.text_source.Text = filename\r
+ If filename <> "" Then\r
+ frmReadDVD.Show()\r
+ Me.Close()\r
+ End If\r
+\r
+ Else\r
+ ISO_Open.ShowDialog()\r
+ filename = ISO_Open.FileName\r
+ text_source.Text = filename\r
+ frmMain.text_source.Text = filename\r
+ If filename <> "" Then\r
+ frmReadDVD.Show()\r
+ Me.Close()\r
+ End If\r
+ End If\r
+ End Sub\r
+\r
+ Private Sub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.Click\r
+ Me.Close()\r
+ End Sub\r
+End Class
\ No newline at end of file
\r
'Copyright info\r
'CLIV.Text = My.Application.Info.Copyright\r
+ Version.Text = "Version: " & My.Settings.HandbrakeGUIVersion & " (beta)"\r
+ CLIV.Text = "Windows CLI Version: " & My.Settings.HandbrakeCLIVersion\r
End Sub\r
\r
\r
+ \r
End Class\r
+++ /dev/null
-<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _\r
-Partial Class frmStatus\r
- Inherits System.Windows.Forms.Form\r
-\r
- 'Form overrides dispose to clean up the component list.\r
- <System.Diagnostics.DebuggerNonUserCode()> _\r
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)\r
- If disposing AndAlso components IsNot Nothing Then\r
- components.Dispose()\r
- End If\r
- MyBase.Dispose(disposing)\r
- End Sub\r
-\r
- 'Required by the Windows Form Designer\r
- Private components As System.ComponentModel.IContainer\r
-\r
- 'NOTE: The following procedure is required by the Windows Form Designer\r
- 'It can be modified using the Windows Form Designer. \r
- 'Do not modify it using the code editor.\r
- <System.Diagnostics.DebuggerStepThrough()> _\r
- Private Sub InitializeComponent()\r
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStatus))\r
- Me.Label1 = New System.Windows.Forms.Label\r
- Me.Label2 = New System.Windows.Forms.Label\r
- Me.Label3 = New System.Windows.Forms.Label\r
- Me.btn_ok = New System.Windows.Forms.Button\r
- Me.SuspendLayout()\r
- '\r
- 'Label1\r
- '\r
- Me.Label1.AutoSize = True\r
- Me.Label1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.Label1.Location = New System.Drawing.Point(81, 42)\r
- Me.Label1.Name = "Label1"\r
- Me.Label1.Size = New System.Drawing.Size(364, 13)\r
- Me.Label1.TabIndex = 20\r
- Me.Label1.Text = "Please click OK to continue, This process may take a moment."\r
- '\r
- 'Label2\r
- '\r
- Me.Label2.AutoSize = True\r
- Me.Label2.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.Label2.Location = New System.Drawing.Point(23, 20)\r
- Me.Label2.Name = "Label2"\r
- Me.Label2.Size = New System.Drawing.Size(52, 13)\r
- Me.Label2.TabIndex = 21\r
- Me.Label2.Text = "Status:"\r
- '\r
- 'Label3\r
- '\r
- Me.Label3.AutoSize = True\r
- Me.Label3.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.Label3.Location = New System.Drawing.Point(81, 21)\r
- Me.Label3.Name = "Label3"\r
- Me.Label3.Size = New System.Drawing.Size(124, 13)\r
- Me.Label3.TabIndex = 22\r
- Me.Label3.Text = "Reading Disc Data..."\r
- '\r
- 'btn_ok\r
- '\r
- Me.btn_ok.BackColor = System.Drawing.SystemColors.ActiveBorder\r
- Me.btn_ok.FlatAppearance.BorderColor = System.Drawing.Color.Black\r
- Me.btn_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat\r
- Me.btn_ok.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
- Me.btn_ok.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))\r
- Me.btn_ok.Location = New System.Drawing.Point(454, 69)\r
- Me.btn_ok.Name = "btn_ok"\r
- Me.btn_ok.Size = New System.Drawing.Size(56, 22)\r
- Me.btn_ok.TabIndex = 23\r
- Me.btn_ok.TabStop = False\r
- Me.btn_ok.Text = "Ok"\r
- Me.btn_ok.UseVisualStyleBackColor = False\r
- '\r
- 'frmStatus\r
- '\r
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)\r
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\r
- Me.BackColor = System.Drawing.SystemColors.Control\r
- Me.ClientSize = New System.Drawing.Size(518, 98)\r
- Me.ControlBox = False\r
- Me.Controls.Add(Me.btn_ok)\r
- Me.Controls.Add(Me.Label3)\r
- Me.Controls.Add(Me.Label2)\r
- Me.Controls.Add(Me.Label1)\r
- Me.Cursor = System.Windows.Forms.Cursors.Default\r
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)\r
- Me.Name = "frmStatus"\r
- Me.Padding = New System.Windows.Forms.Padding(1)\r
- Me.ShowIcon = False\r
- Me.ShowInTaskbar = False\r
- Me.Text = "Reading DVD..."\r
- Me.TopMost = True\r
- Me.ResumeLayout(False)\r
- Me.PerformLayout()\r
-\r
- End Sub\r
- Friend WithEvents Label1 As System.Windows.Forms.Label\r
- Friend WithEvents Label2 As System.Windows.Forms.Label\r
- Friend WithEvents Label3 As System.Windows.Forms.Label\r
- Friend WithEvents btn_ok As System.Windows.Forms.Button\r
-End Class\r
+++ /dev/null
-Imports System.IO\r
-Imports System\r
-Imports System.Diagnostics\r
-Imports System.Threading\r
-\r
-Public Class frmStatus\r
-\r
- '#\r
- '# Start Reading the DVD as soon as the window launches\r
- '# Write the output to dvdinfo.dat\r
- '#\r
- Private Sub frmStatus_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\r
- Me.Show()\r
- Dim ApplicationPath As String = Application.StartupPath\r
-\r
- Try\r
- Shell("cmd /c """"" + ApplicationPath + "\hbcli.exe"" -i """ + frmMain.text_source.Text + """" & " -t0 >" + """" + ApplicationPath + "\dvdinfo.dat""" + " 2>&1""")\r
- Catch ex As Exception\r
- MessageBox.Show("ERROR: There was a problem launching the encoder. Code: frmS-1")\r
- MessageBox.Show(ex.ToString)\r
- End Try\r
- End Sub\r
-\r
- '#\r
- '#\r
- '# Ok Button Handler\r
- '# Stage 1 - Wait til hbcli.exe has finished writing data out to file dvdinfo.dat\r
- '# Stage 2 - Parse the dvdinfo.dat file\r
- '# Stage 3 - output the parsed version to dvd.dat or handle errors if any\r
- '#\r
- '#\r
-\r
- Private Sub btn_ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ok.Click\r
- '# Stage 1 - Wait til the hbcli exe has finished\r
- Dim isRunning As Integer\r
- Dim process2 As Process = New Process\r
- Dim running As Boolean = True\r
- Dim hbProcess As Process() = Process.GetProcesses()\r
-\r
- While running\r
- Thread.Sleep(1000)\r
- hbProcess = Process.GetProcesses()\r
- running = False\r
- Dim processArr2 As Process() = hbProcess\r
- Dim i As Integer = 0\r
- While i < CInt(processArr2.Length)\r
- Dim process1 As Process = processArr2(i)\r
- If process1.ProcessName.Equals("hbcli") Then\r
- running = True\r
- End If\r
- i = i + 1\r
- End While\r
- End While\r
- isRunning = 0\r
-\r
-\r
- '# Stage 2 - Parse the dvdinfo.dat file\r
- '# This involves creating a string for each title and putting it into an array.\r
- '# This array is called dvdData()\r
-\r
-\r
- ' Lets clean any previous contents out of the DVD Title dropdown.\r
- frmMain.drp_dvdtitle.Items.Clear()\r
-\r
- Dim file_path As String = Application.StartupPath\r
- Dim errStatus As Integer = 0\r
- Dim dvdData(150) As String\r
- Dim break As Boolean = False\r
- Dim titleError As Boolean = False\r
-\r
- Try\r
- ' Parse the Data into a Single String with ~ Sepeartor\r
- Dim RlineFile As StreamReader = File.OpenText(file_path & "\dvdinfo.dat")\r
- Dim RLine As String\r
- Dim titleData As String = ""\r
- Dim ChaptStatus As Integer = 0\r
- Dim AudioTrackStatus As Integer = 0\r
- Dim SubtitleStatus As Integer = 0\r
- Dim counter As Integer = 0\r
- Dim counter2 As String = 0\r
- Dim ErrorCounter As Integer = 0\r
- RLine = "---"\r
- dvdData(counter2) = "---Start---"\r
-\r
- While RLine <> Nothing\r
- If (RLine.Contains("+ title")) Then\r
- If (titleData <> "") Then\r
- dvdData(counter2) = titleData\r
- add(titleData)\r
- counter2 = counter2 + 1\r
- End If\r
- ChaptStatus = 0\r
- AudioTrackStatus = 0\r
- SubtitleStatus = 0\r
- titleData = RLine.Trim\r
- ElseIf (RLine.Contains("exited.")) Then\r
- add(titleData)\r
- dvdData(counter2) = titleData\r
- counter2 = counter2 + 1\r
- ChaptStatus = 0\r
- AudioTrackStatus = 0\r
- SubtitleStatus = 0\r
- break = True\r
- ElseIf (RLine.Contains("***")) Then\r
- errStatus = 1\r
- ElseIf (RLine.Contains("No title")) Then\r
- titleError = True\r
- break = True\r
- ElseIf (RLine.Contains("+ duration")) Then\r
- titleData = titleData & " ~ " & RLine.Trim\r
- ElseIf (RLine.Contains("+ size")) Then\r
- titleData = titleData & " ~ " & RLine.Trim\r
- ElseIf (RLine.Contains("+ autocrop")) Then\r
- titleData = titleData & " ~ " & RLine.Trim\r
- ElseIf (RLine.Contains("+ chapters")) Then\r
- titleData = titleData & " ~ " & RLine.Trim\r
- ChaptStatus = 1\r
- AudioTrackStatus = 0\r
- SubtitleStatus = 0\r
- ElseIf (RLine.Contains("+ audio")) Then\r
- titleData = titleData & " ~ " & RLine.Trim\r
- ChaptStatus = 0\r
- AudioTrackStatus = 1\r
- SubtitleStatus = 0\r
- ElseIf (RLine.Contains("+ subtitle tracks")) Then\r
- titleData = titleData & " ~ " & RLine.Trim\r
- ChaptStatus = 0\r
- AudioTrackStatus = 0\r
- SubtitleStatus = 1\r
-\r
- ElseIf (ChaptStatus = 1) Then\r
- ' This IF statment is here incase no chapters appear.\r
- If (RLine.Contains("+ audio")) Then\r
- ChaptStatus = 0\r
- AudioTrackStatus = 1\r
- SubtitleStatus = 0\r
- End If\r
- titleData = titleData & " & " & RLine.Trim\r
-\r
- ElseIf (AudioTrackStatus = 1) Then\r
- 'This if statment is here incase there was no audio tracks\r
- If (RLine.Contains("+ subtitle tracks")) Then\r
- ChaptStatus = 0\r
- AudioTrackStatus = 1\r
- SubtitleStatus = 0\r
- End If\r
- titleData = titleData & " & " & RLine.Trim\r
-\r
- ElseIf (SubtitleStatus = 1) Then\r
- If (RLine.Contains("+ title")) Then\r
- If (titleData <> "") Then\r
- dvdData(counter2) = titleData\r
- counter2 = counter2 + 1\r
- End If\r
- ChaptStatus = 0\r
- AudioTrackStatus = 0\r
- SubtitleStatus = 0\r
- titleData = RLine.Trim\r
- Else\r
- titleData = titleData & " & " & RLine.Trim\r
- End If\r
- End If\r
- RLine = RlineFile.ReadLine()\r
- \r
- If break = True Then\r
- RLine = Nothing\r
- ElseIf RLine = "" Then\r
- RLine = " "\r
- ErrorCounter = ErrorCounter + 1\r
- If ErrorCounter = 50 Then\r
- RLine = Nothing\r
- End If\r
- End If\r
-\r
- counter = counter + 1\r
- End While\r
- '# Close the file. Its no longer needed here.\r
- RlineFile.Close()\r
-\r
- Catch ex As Exception\r
- MessageBox.Show(ex.ToString) ' Debug\r
- End Try\r
-\r
- '# Stage 4 - Write the parsed data out into a file. \r
- '# But, if theres a problem, display an error message instead\r
- If errStatus = 1 Then\r
- MessageBox.Show("ERROR: Error Reading the DVD. Some Title information may not be available.")\r
- End If\r
-\r
- If titleError = True Then\r
- MessageBox.Show("ERROR: No Title(s) found.")\r
- End If\r
-\r
- Try\r
- Dim DataWriter As StreamWriter = New StreamWriter(file_path & "\dvd.dat")\r
- Dim dvdCount As Integer = dvdData.Length\r
- Dim counter As String = 0\r
-\r
- While counter <> dvdCount\r
- DataWriter.WriteLine(dvdData(counter))\r
- counter = counter + 1\r
- End While\r
- DataWriter.Close()\r
-\r
- Catch ex As Exception\r
- MessageBox.Show("ERROR: Unable to write Data file. Please make sure the application has admin privileges.")\r
- End Try\r
- \r
- Me.Close()\r
- End Sub\r
-\r
- '# A function to Add data to frmSelects Select Title Tab and also populate frmMains dvdTitle Tab\r
- Function add(ByVal titleData)\r
- Dim titleInfo() As String\r
- Dim str(7) As String\r
- Dim data As String = ""\r
-\r
- titleInfo = titleData.Split("~")\r
- Try\r
- str(0) = titleInfo(0).Trim.Substring(8).Replace(":", "") 'Title\r
- str(1) = titleInfo(1).Trim.Substring(12) ' Duration\r
- Catch ex As Exception\r
- MessageBox.Show(ex.ToString)\r
- MessageBox.Show("ERROR: Incomplete DVD data found. Please copy the data on the View DVD Information tab and report this error.")\r
- End Try\r
-\r
- 'Now lets add the info to the main form dropdowns\r
- frmMain.drp_dvdtitle.Items.Add(str(0) & " (" & str(1) & ")")\r
-\r
- Return 0\r
- End Function\r
-\r
-End Class
\ No newline at end of file
Me.Version.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
Me.Version.Location = New System.Drawing.Point(125, 100)\r
Me.Version.Name = "Version"\r
- Me.Version.Size = New System.Drawing.Size(32, 13)\r
+ Me.Version.Size = New System.Drawing.Size(64, 13)\r
Me.Version.TabIndex = 41\r
- Me.Version.Text = "2.25"\r
+ Me.Version.Text = "{Version}"\r
Me.Version.TextAlign = System.Drawing.ContentAlignment.TopCenter\r
'\r
'Label4\r
Me.cliVersion.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))\r
Me.cliVersion.Location = New System.Drawing.Point(450, 100)\r
Me.cliVersion.Name = "cliVersion"\r
- Me.cliVersion.Size = New System.Drawing.Size(50, 13)\r
+ Me.cliVersion.Size = New System.Drawing.Size(64, 13)\r
Me.cliVersion.TabIndex = 51\r
- Me.cliVersion.Text = "0.8.5b1"\r
+ Me.cliVersion.Text = "{Version}"\r
Me.cliVersion.TextAlign = System.Drawing.ContentAlignment.TopCenter\r
'\r
'Label8\r
Private Sub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.Click\r
Me.Close()\r
End Sub\r
+\r
End Class
\ No newline at end of file