This commit is contained in:
SchreiberM 2020-11-11 17:43:59 +01:00
commit 0cd5d46094
3 changed files with 31 additions and 10 deletions

View File

@ -62,18 +62,19 @@ Public Class frmDocumentResultList
SplitContainerControl2.SplitterPosition = _Config.Config.SplitContainer2Distance SplitContainerControl2.SplitterPosition = _Config.Config.SplitContainer2Distance
SwitchDetailContainerHorizontal.Checked = _Config.Config.SplitContainer2Horizontal SwitchDetailContainerHorizontal.Checked = _Config.Config.SplitContainer2Horizontal
If Utils.IsVisibleOnAnyScreen(_Config.Config.WindowLocation) Then
If Utils.LocationIsVisible(_Config.Config.WindowLocation) Then
Location = _Config.Config.WindowLocation
End If
If Utils.SizeIsVisible(_Config.Config.WindowSize) Then
Size = _Config.Config.WindowSize
End If
End If
If _IsLegacy = True Then If _IsLegacy = True Then
RibbonPageGroupNavigation.Visible = True RibbonPageGroupNavigation.Visible = True
Else Else
' Location and size will be managed by the ZooFlow Search Window
If Utils.IsVisibleOnAnyScreen(_Config.Config.WindowLocation) Then
If Utils.LocationIsVisible(_Config.Config.WindowLocation) Then
Location = _Config.Config.WindowLocation
End If
If Utils.SizeIsVisible(_Config.Config.WindowSize) Then
Size = _Config.Config.WindowSize
End If
End If
RibbonPageGroupNavigation.Visible = False RibbonPageGroupNavigation.Visible = False
End If End If

View File

@ -103,7 +103,7 @@ Public Class frmFlowForm
Opacity = OPACITY_SHOWN Opacity = OPACITY_SHOWN
End Sub End Sub
Private Sub frmFlowForm_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove Private Sub frmFlowForm_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove, PictureBox1.MouseMove
If e.Button = MouseButtons.Left Then If e.Button = MouseButtons.Left Then
ClassWin32.ReleaseCapture() ClassWin32.ReleaseCapture()
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0) ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)

View File

@ -906,15 +906,35 @@ Public Class frmSearchStart
Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams) Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams)
oForm.Show() oForm.Show()
' Position Result Window below this window
oForm.Location = GetResultFormLocation()
oForm.Size = GetResultFormSize()
Else Else
Display_InfoItem("No results for this searchcombination!", Color.OrangeRed) Display_InfoItem("No results for this searchcombination!", Color.OrangeRed)
End If End If
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
Finally Finally
SplashScreenManager.CloseOverlayForm(oHandle) SplashScreenManager.CloseOverlayForm(oHandle)
End Try End Try
End Sub End Sub
Private Function GetResultFormLocation() As Point
Dim oX = Location.X
Dim oY = Location.Y + Size.Height
Return New Point(oX, oY)
End Function
Private Function GetResultFormSize() As Size
Dim oWidth = Size.Width
' TODO: Smarter height calculation, maybe depending on screen height and parent form location
Dim oHeight = 400
Return New Size(oWidth, oHeight)
End Function
Private Sub frmSearchStart_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp Private Sub frmSearchStart_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.F2 Then If e.KeyCode = Keys.F2 Then
Start_Search() Start_Search()