Skip to content

Commit 3112532

Browse files
committed
2.0.1.2 提交
1 parent cf7b94d commit 3112532

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

QuickIPchange/Form1.vb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Imports System.Management
44
Imports System.Reflection
55
Imports System.Security.Principal
66
Imports Newtonsoft.Json.Linq
7-
7+
' 粗略版本,程式非常粗糙,建議使用V1 版本
88
Public 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

Comments
 (0)