暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

線路選擇.vb 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Imports System.IO
  2. Imports System.Text
  3. Public Class 線路選擇
  4. Private Sub 線路選擇_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  5. 風格() : If PA49 = "36.64.59.26,2433" Then : Me.ActiveControl = 總部_rbt : Else : Me.ActiveControl = 工地_rbt : End If
  6. End Sub
  7. Private Sub 線路選擇_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
  8. If 系統語言 = "繁體中文" Then : Me.Text = "線路選擇"
  9. ElseIf 系統語言 = "English" Then : Me.Text = "Line Selection"
  10. ElseIf 系統語言 = "Indonesian" Then : Me.Text = "Pemilihan Jalur" : End If
  11. End Sub
  12. Private Sub 總部_rbt_Click(sender As Object, e As EventArgs) Handles 總部_rbt.Click
  13. PA49 = "36.64.59.26,2433"
  14. Dim strDirName As String : Dim Strs As String = Application.StartupPath
  15. If File.Exists(Strs & "\HXLINE.txt") Then : File.Delete(Strs & "\HXLINE.txt") : End If
  16. strDirName = Strs & "\HXLINE.txt"
  17. Try
  18. Using fs As IO.FileStream = New IO.FileStream(strDirName, FileMode.Append)
  19. Using sw As StreamWriter = New StreamWriter(fs, Encoding.Default)
  20. Dim str As String = "3MBPS-LINE"
  21. sw.WriteLine(str) '插入一整行
  22. sw.Flush()
  23. End Using
  24. End Using
  25. Catch ex As Exception
  26. End Try
  27. Me.Close()
  28. End Sub
  29. Private Sub 工地_rbt_Click(sender As Object, e As EventArgs) Handles 工地_rbt.Click
  30. PA49 = "36.64.59.26,2433"
  31. Dim strDirName As String : Dim Strs As String = Application.StartupPath
  32. If File.Exists(Strs & "\HXLINE.txt") Then : File.Delete(Strs & "\HXLINE.txt") : End If
  33. strDirName = Strs & "\HXLINE.txt"
  34. Try
  35. Using fs As IO.FileStream = New IO.FileStream(strDirName, FileMode.Append)
  36. Using sw As StreamWriter = New StreamWriter(fs, Encoding.Default)
  37. Dim str As String = "20MBPS-LINE"
  38. sw.WriteLine(str) '插入一整行
  39. sw.Flush()
  40. End Using
  41. End Using
  42. Catch ex As Exception
  43. End Try
  44. Me.Close()
  45. End Sub
  46. Private Sub 測試_rbt_Click(sender As Object, e As EventArgs) Handles 測試_rbt.Click
  47. PA49 = "106.1.48.106,4567" : Me.Close()
  48. End Sub
  49. Private Sub 風格()
  50. If 深色風格 = False Then
  51. Me.BackColor = Color.White : Me.BackgroundImage = My.Resources._62951168976601486
  52. Else
  53. Me.BackColor = Color.Black : Me.BackgroundImage = My.Resources._20157059_MotionElements_diagonal_lines
  54. End If
  55. End Sub
  56. End Class