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