prepare release and fix marvman's bugs

This commit is contained in:
Developer02 Digital Data
2019-10-15 16:16:50 +02:00
parent 341c719777
commit 80029dcb99
13 changed files with 653 additions and 123 deletions

View File

@@ -4,6 +4,7 @@ Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DigitalData.Controls.RegexEditor
Imports DigitalData.Modules.Windows.Window
Public Class ctrlApplicationAssignment
Public AppSelectionString As String
@@ -164,6 +165,8 @@ Public Class ctrlApplicationAssignment
TBCW_PROF_REL_WINDOWTableAdapter.Update(MyDataset.TBCW_PROF_REL_WINDOW)
Return True
End If
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
@@ -219,9 +222,50 @@ Public Class ctrlApplicationAssignment
End Function
Public Function Control_EditAssignment() As Boolean
Dim oForm As New frmControlCapture(EditMode:=True)
Dim oHandles As List(Of Integer) = GridView_Control.
GetSelectedRows().
ToList()
If oHandles.Count <> 1 Then
Return False
End If
Dim oHandle As Integer = oHandles.FirstOrDefault()
Dim oRow = GridView_Control.GetDataRow(oHandle)
Dim oControlName As String = oRow.Item("CONTROL_NAME")
Dim oTopLeft As New RectangleInfo() With {
.Top = oRow.Item("TOPLEFT_TOP"),
.Left = oRow.Item("TOPLEFT_LEFT"),
.Right = oRow.Item("TOPLEFT_RIGHT"),
.Bottom = oRow.Item("TOPLEFT_BOTTOM")
}
Dim oTopRight As New RectangleInfo() With {
.Top = oRow.Item("TOPRIGHT_TOP"),
.Left = oRow.Item("TOPRIGHT_LEFT"),
.Right = oRow.Item("TOPRIGHT_RIGHT"),
.Bottom = oRow.Item("TOPRIGHT_BOTTOM")
}
Dim oBottomLeft As New RectangleInfo() With {
.Top = oRow.Item("BOTTOMLEFT_TOP"),
.Left = oRow.Item("BOTTOMLEFT_LEFT"),
.Right = oRow.Item("BOTTOMLEFT_RIGHT"),
.Bottom = oRow.Item("BOTTOMLEFT_BOTTOM")
}
Dim oBottomRight As New RectangleInfo() With {
.Top = oRow.Item("BOTTOMRIGHT_TOP"),
.Left = oRow.Item("BOTTOMRIGHT_LEFT"),
.Right = oRow.Item("BOTTOMRIGHT_RIGHT"),
.Bottom = oRow.Item("BOTTOMRIGHT_BOTTOM")
}
Dim oBounds As String = frmControlCapture.GetBoundsString(oTopLeft, oTopRight, oBottomLeft, oBottomRight)
Dim oForm As New frmControlCapture(EditMode:=True, ControlBounds:=oBounds, ControlName:=oControlName)
Dim oResult = oForm.ShowDialog()
Dim oControlId As Integer() = GridView_Control.GetSelectedRows()
If oResult = DialogResult.OK Then
Try
@@ -296,6 +340,9 @@ Public Class ctrlApplicationAssignment
End Function
Private Sub GridViewProcessProfile_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewProcessProfile.FocusedRowChanged
MyDataset.TBCW_PROF_REL_CONTROL.Clear()
MyDataset.TBCW_PROF_REL_WINDOW.Clear()
If e.FocusedRowHandle < 0 Then
Exit Sub
End If
@@ -306,8 +353,6 @@ Public Class ctrlApplicationAssignment
AppSelectionString = $"Selected Profile: {oPRocessGUID}-{oProcessName}"
CURRENT_PROCESSID = oPRocessGUID
CURRENT_PROCESSNAME = oProcessName
MyDataset.TBCW_PROF_REL_CONTROL.Clear()
MyDataset.TBCW_PROF_REL_WINDOW.Clear()
If Window_Load() = False Then
MsgBox($"Error while loading windows for process {oProcessName}", vbCritical, "")