1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Private WithEvents mobContextMenu As New Windows.Forms.ContextMenuStrip()
Private Sub _CreateMenu()
Try
mobContextMenu.Items.Add("Connexion", Nothing, New EventHandler(AddressOf _Connexion))
mobContextMenu.Items.Add("Deconnexion", Nothing, New EventHandler(AddressOf _Deconnexion))
mobContextMenu.Items.Add("Initialiser", Nothing, New EventHandler(AddressOf _Init))
mobContextMenu.Items.Add("-")
mobContextMenu.Items.Add("About", Nothing, New EventHandler(AddressOf AboutBox))
SystrayIcon.ContextMenuStrip = mobContextMenu
Catch ex As Exception
Log.WriteError("[_CreateMenu] " & ex.Message)
End Try
End Sub
Private Sub AboutBox(ByVal sender As Object, ByVal e As EventArgs)
Using f As New AboutBox
f.ShowDialog()
End Using
End Sub
Private Sub _Init(ByVal sender As Object, ByVal e As EventArgs)
Service.Initialisation()
End Sub
Private Sub _Connexion(ByVal sender As Object, ByVal e As EventArgs)
Service.Connection()
End Sub
Private Sub _Deconnexion(ByVal sender As Object, ByVal e As EventArgs)
Service.Deconnection()
End Sub |
Partager