Skip to content

Commit f904ba4

Browse files
committed
Move changestatus method
Relocating the Event_ChangeStatus method to be closer to other NotifyIcon-related code.
1 parent d5f124d commit f904ba4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

WinNUT_V2/WinNUT-Client/WinNUT.vb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -618,18 +618,6 @@ Public Class WinNUT
618618
HasFocus = False
619619
End Sub
620620

621-
Public Shared Sub Event_ChangeStatus() Handles Me.On_Battery, Me.On_Line,
622-
UPS_Device.Lost_Connect, UPS_Device.Connected, UPS_Device.Disconnected
623-
624-
WinNUT.NotifyIcon.BalloonTipText = WinNUT.NotifyIcon.Text
625-
If WinNUT.AllowToast And WinNUT.NotifyIcon.BalloonTipText <> "" Then
626-
Dim Toastparts As String() = WinNUT.NotifyIcon.BalloonTipText.Split(New String() {Environment.NewLine}, StringSplitOptions.None)
627-
WinNUT.ToastPopup.SendToast(Toastparts)
628-
ElseIf WinNUT.NotifyIcon.Visible = True And WinNUT.NotifyIcon.BalloonTipText <> "" Then
629-
WinNUT.NotifyIcon.ShowBalloonTip(10000)
630-
End If
631-
End Sub
632-
633621
Private Sub Update_UPS_Data() Handles UPS_Device.DataUpdated
634622
LogFile.LogTracing("Updating UPS data for Form.", LogLvl.LOG_DEBUG, Me)
635623

@@ -875,6 +863,18 @@ Public Class WinNUT
875863
End If
876864
End Sub
877865

866+
Public Shared Sub Event_ChangeStatus() Handles Me.On_Battery, Me.On_Line,
867+
UPS_Device.Lost_Connect, UPS_Device.Connected, UPS_Device.Disconnected
868+
869+
WinNUT.NotifyIcon.BalloonTipText = WinNUT.NotifyIcon.Text
870+
If WinNUT.AllowToast And WinNUT.NotifyIcon.BalloonTipText <> "" Then
871+
Dim Toastparts As String() = WinNUT.NotifyIcon.BalloonTipText.Split(New String() {Environment.NewLine}, StringSplitOptions.None)
872+
WinNUT.ToastPopup.SendToast(Toastparts)
873+
ElseIf WinNUT.NotifyIcon.Visible = True And WinNUT.NotifyIcon.BalloonTipText <> "" Then
874+
WinNUT.NotifyIcon.ShowBalloonTip(10000)
875+
End If
876+
End Sub
877+
878878
Private Function GetIcon(IconIdx As Integer) As Icon
879879
Select Case IconIdx
880880
Case 1025

0 commit comments

Comments
 (0)