prepare release and fix marvman's bugs
This commit is contained in:
@@ -8,18 +8,22 @@ Public Class frmControlCapture
|
||||
Public Property BottomRight As RectangleInfo
|
||||
|
||||
Public Property ControlName As String
|
||||
Public Property ControlBounds As String
|
||||
|
||||
Private WithEvents Watcher As ClipboardWatcher = ClipboardWatcher.Singleton
|
||||
Private Window As Window
|
||||
|
||||
Private EditMode As Boolean = False
|
||||
|
||||
Public Sub New(EditMode As Boolean)
|
||||
|
||||
Public Sub New(EditMode As Boolean, Optional ControlBounds As String = "", Optional ControlName As String = "")
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
EditMode = EditMode
|
||||
Me.EditMode = EditMode
|
||||
Me.ControlName = ControlName
|
||||
Me.ControlBounds = ControlBounds
|
||||
End Sub
|
||||
|
||||
Private Sub frmControlCapture_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -27,6 +31,16 @@ Public Class frmControlCapture
|
||||
|
||||
rbControlName.Checked = True
|
||||
|
||||
If ControlName <> String.Empty Then
|
||||
rbControlName.Checked = True
|
||||
txtControlName.Text = ControlName
|
||||
End If
|
||||
|
||||
If ControlBounds <> String.Empty Then
|
||||
rbControlPosition.Checked = True
|
||||
txtControlBounds.Text = ControlBounds
|
||||
End If
|
||||
|
||||
AddHandler Watcher.Changed, AddressOf Watcher_Changed
|
||||
End Sub
|
||||
|
||||
@@ -36,7 +50,7 @@ Public Class frmControlCapture
|
||||
Dim oControl As WindowInfo = Window.GetFocusedControl(Handle)
|
||||
|
||||
If oControl IsNot Nothing Then
|
||||
TextBox1.Text = oControl.ControlName
|
||||
txtControlName.Text = oControl.ControlName
|
||||
ControlName = oControl.ControlName
|
||||
End If
|
||||
|
||||
@@ -67,11 +81,11 @@ Public Class frmControlCapture
|
||||
End If
|
||||
End Select
|
||||
|
||||
TextBox2.Text = GetBoundsString()
|
||||
txtControlBounds.Text = GetBoundsString(TopLeft, TopRight, BottomLeft, BottomRight)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Function GetBoundsString()
|
||||
Public Shared Function GetBoundsString(TopLeft As RectangleInfo, TopRight As RectangleInfo, BottomLeft As RectangleInfo, BottomRight As RectangleInfo)
|
||||
Dim oResult As String = String.Empty
|
||||
|
||||
If TopLeft IsNot Nothing Then
|
||||
@@ -90,6 +104,7 @@ Public Class frmControlCapture
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles rbControlName.CheckedChanged
|
||||
gbControlName.Enabled = rbControlName.Checked
|
||||
gbControlPosition.Enabled = Not rbControlName.Checked
|
||||
@@ -101,14 +116,14 @@ Public Class frmControlCapture
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
If TextBox1.Text = String.Empty And TextBox2.Text = String.Empty Then
|
||||
If txtControlName.Text = String.Empty And txtControlBounds.Text = String.Empty Then
|
||||
MsgBox("Kein Control gefunden!")
|
||||
DialogResult = DialogResult.Cancel
|
||||
End If
|
||||
|
||||
If rbControlPosition.Checked Then
|
||||
ControlName = String.Empty
|
||||
Else
|
||||
ElseIf rbControlName.Checked Then
|
||||
TopLeft = New RectangleInfo()
|
||||
TopRight = New RectangleInfo()
|
||||
BottomLeft = New RectangleInfo()
|
||||
|
||||
Reference in New Issue
Block a user