Imports System.IO
Imports System.Text
Public Class 線路選擇
    Private Sub 線路選擇_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        If PA49 = "36.64.59.26,2433" Then : Me.ActiveControl = 總部_rbt : Else : Me.ActiveControl = 工地_rbt : End If
    End Sub
    Private Sub 線路選擇_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
        If 系統語言 = "繁體中文" Then : Me.Text = "線路選擇"
        ElseIf 系統語言 = "English" Then : Me.Text = "Line Selection"
        ElseIf 系統語言 = "Indonesian" Then : Me.Text = "Pemilihan Jalur" : End If
    End Sub
    Private Sub 總部_rbt_Click(sender As Object, e As EventArgs) Handles 總部_rbt.Click
        PA49 = "36.64.59.26,2433"
        Dim strDirName As String : Dim Strs As String = Application.StartupPath
        If File.Exists(Strs & "\HXLINE.txt") Then : File.Delete(Strs & "\HXLINE.txt") : End If
        strDirName = Strs & "\HXLINE.txt"
        Try
            Using fs As IO.FileStream = New IO.FileStream(strDirName, FileMode.Append)
                Using sw As StreamWriter = New StreamWriter(fs, Encoding.Default)
                    Dim str As String = "3MBPS-LINE"
                    sw.WriteLine(str)   '插入一整行
                    sw.Flush()
                End Using
            End Using
        Catch ex As Exception
        End Try
        Me.Close()
    End Sub
    Private Sub 工地_rbt_Click(sender As Object, e As EventArgs) Handles 工地_rbt.Click
        PA49 = "36.64.59.26,2433"
        Dim strDirName As String : Dim Strs As String = Application.StartupPath
        If File.Exists(Strs & "\HXLINE.txt") Then : File.Delete(Strs & "\HXLINE.txt") : End If
        strDirName = Strs & "\HXLINE.txt"
        Try
            Using fs As IO.FileStream = New IO.FileStream(strDirName, FileMode.Append)
                Using sw As StreamWriter = New StreamWriter(fs, Encoding.Default)
                    Dim str As String = "20MBPS-LINE"
                    sw.WriteLine(str)   '插入一整行
                    sw.Flush()
                End Using
            End Using
        Catch ex As Exception
        End Try
        Me.Close()
    End Sub
    Private Sub 測試_rbt_Click(sender As Object, e As EventArgs) Handles 測試_rbt.Click
        PA49 = "106.1.48.106,4567" : Me.Close()
    End Sub
End Class