1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- 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
- Private Sub 風格()
- If 深色風格 = False Then
- Me.BackColor = Color.White : Me.BackgroundImage = My.Resources._62951168976601486
- Else
- Me.BackColor = Color.Black : Me.BackgroundImage = My.Resources._20157059_MotionElements_diagonal_lines
- End If
- End Sub
- End Class
|