OSDN Git Service

MacGui: ScanController modification so it skips the opening scan choice sheet and...
[handbrake-jp/handbrake-jp-git.git] / win / Handbrake / frmSelect.vb
1 Imports System.IO\r
2 \r
3 Public Class frmSelect\r
4 \r
5 \r
6     Private Sub frmSelect_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\r
7         Dim break As Boolean = False\r
8         Dim ErrorCounter As Integer = 0\r
9 \r
10         Try\r
11             Dim file_path As String = Application.StartupPath\r
12             rtf_dvdInfo.Text = ""\r
13 \r
14             Dim line As StreamReader = File.OpenText(file_path & "\dvdinfo.dat")\r
15             Dim readLine\r
16 \r
17             readLine = "------- DVD Information -------"\r
18             While readLine <> Nothing\r
19 \r
20                 If (rtf_dvdInfo.Text = "") Then\r
21                     rtf_dvdInfo.Text = readLine\r
22                 Else\r
23                     rtf_dvdInfo.Text = rtf_dvdInfo.Text & vbCrLf & readLine\r
24                 End If\r
25                 readLine = line.ReadLine()\r
26 \r
27                 If break = True Then\r
28                     readLine = Nothing\r
29                 ElseIf readLine = "" Then\r
30                     readLine = " "\r
31                     ErrorCounter = ErrorCounter + 1\r
32                     If ErrorCounter = 5 Then\r
33                         readLine = Nothing\r
34                     End If\r
35                     readLine = Nothing\r
36                 Else\r
37                     ErrorCounter = 0\r
38                 End If\r
39 \r
40             End While\r
41         Catch ex As Exception\r
42             MessageBox.Show(ex.ToString) ' Debug\r
43         End Try\r
44         '# -- END\r
45     End Sub\r
46 \r
47     Private Sub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.Click\r
48         Me.Close()\r
49     End Sub\r
50 End Class