Skip to content

Commit 47b803e

Browse files
committed
Removing Form-wide manual update variable
Variable was essentially unused except for within the Update GUI trigger function, when it's predetermined anyways.
1 parent f741891 commit 47b803e

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

WinNUT_V2/WinNUT-Client/WinNUT.vb

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@ Imports WinNUT_Client_Common
1212
Public Class WinNUT
1313
#Region "Properties"
1414

15-
Public Property UpdateMethod() As String
16-
Get
17-
If mUpdate Then
18-
mUpdate = False
19-
Return True
20-
Else
21-
Return False
22-
End If
23-
End Get
24-
Set(Value As String)
25-
mUpdate = Value
26-
End Set
27-
End Property
28-
2915
Public WriteOnly Property HasCrashed() As Boolean
3016
Set(Value As Boolean)
3117
WinNUT_Crashed = Value
@@ -78,7 +64,6 @@ Public Class WinNUT
7864
Public UPS_InputA As Double
7965

8066
Private HasFocus As Boolean = True
81-
Private mUpdate As Boolean = False
8267
Private FormText As String
8368
Private WinNUT_Crashed As Boolean = False
8469

@@ -349,10 +334,10 @@ Public Class WinNUT
349334
LogFile.LogTracing("Suspending WinNUT operations...", LogLvl.LOG_NOTICE, Me, StrLog.Item(AppResxStr.STR_MAIN_GOTOSLEEP))
350335
UPSDisconnect()
351336
Case Microsoft.Win32.PowerModes.Resume
352-
LogFile.LogTracing("Restarting WinNUT after waking up from Windows", LogLvl.LOG_NOTICE, Me, StrLog.Item(AppResxStr.STR_MAIN_EXITSLEEP))
353337
If My.Settings.NUT_AutoReconnect Then
354-
UPS_Connect(True)
355-
End If
338+
LogFile.LogTracing("Reconnecting after system resume.", LogLvl.LOG_NOTICE, Me, StrLog.Item(AppResxStr.STR_MAIN_EXITSLEEP))
339+
UPS_Connect(True)
340+
End If
356341
End Select
357342
End Sub
358343

@@ -1048,12 +1033,11 @@ Public Class WinNUT
10481033
End Sub
10491034

10501035
Private Sub Menu_Update_Click(sender As Object, e As EventArgs) Handles Menu_Update.Click
1051-
mUpdate = True
10521036
'Dim th As System.Threading.Thread = New Threading.Thread(New System.Threading.ParameterizedThreadStart(AddressOf Run_Update))
10531037
'th.SetApartmentState(System.Threading.ApartmentState.STA)
10541038
'th.Start(Me.UpdateMethod)
10551039
LogFile.LogTracing("Open About Gui From Menu", LogLvl.LOG_DEBUG, Me)
1056-
Dim Update_Frm = New Update_Gui(mUpdate)
1040+
Dim Update_Frm = New Update_Gui(True)
10571041
Update_Frm.Activate()
10581042
Update_Frm.Visible = True
10591043
HasFocus = False

0 commit comments

Comments
 (0)