Modules/ZooFlow/frmMain.vb
2019-09-06 15:56:48 +02:00

65 lines
1.9 KiB
VB.net

Imports DevExpress.XtraSplashScreen
Partial Public Class frmMain
Private WithEvents FlowForm As New frmFlowForm()
Public Sub New()
InitializeComponent()
InitializeApplication()
End Sub
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FlowForm.Show()
ToastNotificationsManager.ShowNotification(ToastNotificationsManager.Notifications.First)
End Sub
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Hide()
End Sub
Private Sub FlowForm_ClipboardChanged(sender As Object, e As IDataObject) Handles FlowForm.ClipboardChanged
MsgBox("Clipboard Changed!")
End Sub
#Region "Notify Icon Menu"
Private Sub BeendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BeendenToolStripMenuItem.Click
Application.Exit()
End Sub
Private Sub NotifyIconMain_DoubleClick(sender As Object, e As EventArgs) Handles NotifyIconMain.DoubleClick
ToggleVisibility()
End Sub
Private Sub AnzeigenVersteckenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AnzeigenVersteckenToolStripMenuItem.Click
ToggleVisibility()
End Sub
#End Region
Private Sub ToggleVisibility()
If Visible Then
Hide()
Else
Show()
End If
End Sub
Private Sub InitializeApplication()
SplashScreenManager.ShowForm(Me, GetType(frmSplash), False, False, False)
' The splash screen will be opened in a separate thread. To interact with it, use the SendCommand method.
For i As Integer = 1 To 100
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetProgress, i)
'To process commands, override the SplashScreen.ProcessCommand method.
Threading.Thread.Sleep(25)
Next i
SplashScreenManager.CloseForm(False)
End Sub
End Class