diff --git a/GUIs.ZooFlow/frmFlowForm_Test1.Designer.vb b/GUIs.ZooFlow/frmFlowForm_Test1.Designer.vb index bb70ee53..7240d71a 100644 --- a/GUIs.ZooFlow/frmFlowForm_Test1.Designer.vb +++ b/GUIs.ZooFlow/frmFlowForm_Test1.Designer.vb @@ -29,7 +29,7 @@ Partial Class frmFlowForm_Test1 ' Me.SimpleButton1.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer)) Me.SimpleButton1.Appearance.Options.UseBackColor = True - Me.SimpleButton1.Location = New System.Drawing.Point(179, 12) + Me.SimpleButton1.Location = New System.Drawing.Point(171, 12) Me.SimpleButton1.Name = "SimpleButton1" Me.SimpleButton1.Size = New System.Drawing.Size(75, 41) Me.SimpleButton1.TabIndex = 0 @@ -41,11 +41,12 @@ Partial Class frmFlowForm_Test1 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackgroundImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZOOFLOW_Home_klein Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None - Me.ClientSize = New System.Drawing.Size(249, 254) + Me.ClientSize = New System.Drawing.Size(250, 250) Me.Controls.Add(Me.SimpleButton1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "frmFlowForm_Test1" Me.Text = "frmFlowForm_Test1" + Me.TopMost = True Me.TransparencyKey = System.Drawing.SystemColors.Control Me.ResumeLayout(False) diff --git a/GUIs.ZooFlow/frmFlowForm_Test1.vb b/GUIs.ZooFlow/frmFlowForm_Test1.vb index 1c31976a..9a313154 100644 --- a/GUIs.ZooFlow/frmFlowForm_Test1.vb +++ b/GUIs.ZooFlow/frmFlowForm_Test1.vb @@ -1,17 +1,71 @@ -Public Class frmFlowForm_Test1 - ''' - ''' Make button with rounded borders by custom painting the background - ''' +Imports DigitalData.Modules.Logging - Private Sub frmFlowForm_Test1_Load(sender As Object, e As EventArgs) Handles Me.Load - Opacity = 0.2 +Public Class frmFlowForm_Test1 + Private Const OPACITY_HIDDEN = 0.2 + Private Const OPACITY_SHOWN = 1 + + Private ActiveModules As List(Of String) + Private Logger As Logger + + Private ESCHitCount As Integer = 0 + + Public Event ClipboardChanged As EventHandler(Of IDataObject) + + Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles Me.Load + ' === Initialize Logger === + Logger = My.LogConfig.GetLogger() + + ' === Set Form Properties === + TopMost = True + AllowDrop = True + ShowInTaskbar = False + Opacity = OPACITY_HIDDEN + SetFormLocation() + + AddHandler KeyDown, AddressOf frmFlowForm_KeyDown + AddHandler KeyUp, AddressOf frmFlowForm_KeyDown End Sub - Private Sub frmFlowForm_Test1_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave - Opacity = 0.2 + Public Sub SetFormLocation() + Location = My.UIConfig.FlowForm.Location End Sub - Private Sub frmFlowForm_Test1_MouseHover(sender As Object, e As EventArgs) Handles Me.MouseHover - Opacity = 1 + Private Sub frmFlowForm_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave + Opacity = OPACITY_HIDDEN + End Sub + + Private Sub frmFlowForm_MouseHover(sender As Object, e As EventArgs) Handles Me.MouseHover + Opacity = OPACITY_SHOWN + End Sub + + Private Sub frmFlowForm_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove + If e.Button = MouseButtons.Left Then + ClassWin32.ReleaseCapture() + ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0) + End If + End Sub + + Private Sub frmFlowForm_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) + If e.KeyCode = Keys.Escape Then + If ESCHitCount > 0 Then + Dim oResult As DialogResult = MessageBox.Show("Exit Zooflow", "Please Varify", MessageBoxButtons.YesNo) + If oResult = DialogResult.Yes Then + ' Save Settings + My.UIConfig.FlowForm.Location = Location + My.UIConfigManager.Save() + + ' Exit + Application.Exit() + Else + ESCHitCount = 0 + End If + Else + ESCHitCount += 1 + End If + ElseIf e.KeyCode = Keys.D AndAlso (e.Control) Then + If ActiveModules.Contains(ClassConstants.MODULE_ZOOFLOW) Then + MsgBox("Search") + End If + End If End Sub End Class \ No newline at end of file