@@ -4,7 +4,7 @@ Imports System.Management
44Imports System.Reflection
55Imports System.Security.Principal
66Imports Newtonsoft.Json.Linq
7-
7+ ' 粗略版本,程式非常粗糙,建議使用V1 版本
88Public Class Form1
99
1010 Private Function GetNetworkAdapters() As List( Of NetworkInterface)
@@ -111,7 +111,7 @@ Public Class Form1
111111 p.Kill()
112112 Catch ex As Exception
113113 ' 處理任何錯誤
114- Console .WriteLine(ex.Message)
114+ Debug .WriteLine(ex.Message)
115115 End Try
116116 End If
117117 Next
@@ -124,6 +124,8 @@ Public Class Form1
124124 Label2.Text = ""
125125 Label3.Text = ""
126126 Label4.Text = ""
127+
128+ '關閉按鈕, 防止未選擇網卡時操作
127129 btn_dhcp.Enabled = False
128130 Button1.Enabled = False
129131 Button2.Enabled = False
@@ -133,7 +135,7 @@ Public Class Form1
133135
134136 End Sub
135137
136-
138+ # Region "檢查更新&檢什UAC權限"
137139 Private Async Function getGithubReleases() As Task( Of Dictionary( Of String , String ))
138140 Dim result As New Dictionary( Of String , String )
139141 Dim apiUrl As String = "https://api.github.com/repos/InterfaceGUI/QuickIPchange/releases/latest"
@@ -199,9 +201,9 @@ Public Class Form1
199201
200202 ElseIf comparisonResult = 0 Then
201203 ToolStripStatusLabel6.Text = $"已是最新版本"
202- Console .WriteLine( $"目前版本 {currentVersion} 已是最新版本" )
204+ Debug .WriteLine( $"目前版本 {currentVersion} 已是最新版本" )
203205 Else
204- Console .WriteLine( $"目前版本 {currentVersion} 高於 GitHub 上的版本 {latestVersion}" )
206+ Debug .WriteLine( $"目前版本 {currentVersion} 高於 GitHub 上的版本 {latestVersion}" )
205207 End If
206208
207209 End Sub
@@ -230,6 +232,8 @@ Public Class Form1
230232 End Try
231233 End Sub
232234
235+ # End Region
236+
233237 Private Sub Timer1_Tick(sender As Object , e As EventArgs) Handles Timer1.Tick
234238 DisplayNetworkAdapters()
235239 End Sub
0 commit comments