bugfixing all day long
- wix setup missing devexpress dll - rework profile filter and control capture
This commit is contained in:
@@ -45,44 +45,58 @@ Public Class frmControlCapture
|
||||
End Sub
|
||||
|
||||
Private Sub Watcher_Changed(sender As Object, e As EventArgs)
|
||||
' === CONTROL NAME ===
|
||||
Try
|
||||
' === CONTROL NAME ===
|
||||
Dim oControl As WindowInfo = Window.GetFocusedControl(Handle)
|
||||
|
||||
Dim oControl As WindowInfo = Window.GetFocusedControl(Handle)
|
||||
If oControl IsNot Nothing Then
|
||||
txtControlName.Text = oControl.ControlName
|
||||
ControlName = oControl.ControlName
|
||||
End If
|
||||
|
||||
If oControl IsNot Nothing Then
|
||||
txtControlName.Text = oControl.ControlName
|
||||
ControlName = oControl.ControlName
|
||||
End If
|
||||
|
||||
' === CONTROL POSITION ===
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox($"Control Name konnte nicht ausgelesen werden!{vbNewLine}Dies kann ein temporärer Fehler sein. Bitte versuchen Sie es noch einmal.", MsgBoxStyle.Exclamation, Text)
|
||||
Finally
|
||||
Logger.EndBlock()
|
||||
End Try
|
||||
|
||||
For Each oAnchor As Anchor In [Enum].GetValues(GetType(Anchor))
|
||||
Dim oRect As RectangleInfo = Window.GetFocusedControlLocation(Handle, oAnchor)
|
||||
Try
|
||||
' === CONTROL POSITION ===
|
||||
Dim oRectangles As Dictionary(Of String, RectangleInfo) = Window.GetFocusedControlLocation(Handle)
|
||||
|
||||
Select Case oAnchor
|
||||
Case Window.Anchor.TopLeft
|
||||
If oRect IsNot Nothing Then
|
||||
TopLeft = oRect
|
||||
End If
|
||||
For Each oRect As KeyValuePair(Of String, RectangleInfo) In oRectangles
|
||||
Select Case oRect.Key
|
||||
Case Window.Anchor.TopLeft.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
TopLeft = oRect.Value
|
||||
End If
|
||||
|
||||
Case Window.Anchor.TopRight
|
||||
If oRect IsNot Nothing Then
|
||||
TopRight = oRect
|
||||
End If
|
||||
Case Window.Anchor.TopRight.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
TopRight = oRect.Value
|
||||
End If
|
||||
|
||||
Case Window.Anchor.BottomLeft
|
||||
If oRect IsNot Nothing Then
|
||||
BottomLeft = oRect
|
||||
End If
|
||||
Case Window.Anchor.BottomLeft.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
BottomLeft = oRect.Value
|
||||
End If
|
||||
|
||||
Case Window.Anchor.BottomRight
|
||||
If oRect IsNot Nothing Then
|
||||
BottomRight = oRect
|
||||
End If
|
||||
End Select
|
||||
Case Window.Anchor.BottomRight.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
BottomRight = oRect.Value
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
|
||||
txtControlBounds.Text = GetBoundsString(TopLeft, TopRight, BottomLeft, BottomRight)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox($"Control Koordinaten konnten nicht ausgelesen werden!{vbNewLine}Dies kann ein temporärer Fehler sein. Bitte versuchen Sie es noch einmal.", MsgBoxStyle.Exclamation, Text)
|
||||
Finally
|
||||
Logger.EndBlock()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetBoundsString(TopLeft As RectangleInfo, TopRight As RectangleInfo, BottomLeft As RectangleInfo, BottomRight As RectangleInfo)
|
||||
|
||||
Reference in New Issue
Block a user