summaryrefslogtreecommitdiffstats
path: root/win/Handbrake/frmDVDData.vb
blob: ca2d5f53f94a40d8f29393d0262218e5c979a8bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Imports System.IO

Public Class frmDvdData


    Private Sub frmSelect_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim break As Boolean = False
        Dim ErrorCounter As Integer = 0

        Try
            Dim file_path As String = Application.StartupPath
            rtf_dvdInfo.Text = ""

            Dim line As StreamReader = File.OpenText(file_path & "\dvdinfo.dat")
            Dim readLine

            readLine = "------- DVD Information -------"
            While readLine <> Nothing

                If (rtf_dvdInfo.Text = "") Then
                    rtf_dvdInfo.Text = readLine
                Else
                    rtf_dvdInfo.Text = rtf_dvdInfo.Text & vbCrLf & readLine
                End If
                readLine = line.ReadLine()

                If break = True Then
                    readLine = Nothing
                ElseIf readLine = "" Then
                    readLine = " "
                    ErrorCounter = ErrorCounter + 1
                    If ErrorCounter = 5 Then
                        readLine = Nothing
                    End If
                    readLine = Nothing
                Else
                    ErrorCounter = 0
                End If

            End While
        Catch ex As Exception
            MessageBox.Show(ex.ToString) ' Debug
        End Try
        '# -- END
    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