jj: add try-catch in drag drop
This commit is contained in:
parent
72c71ae651
commit
cf5c295801
@ -30,6 +30,7 @@ Public Class ClassDragDrop
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub view_MouseMove(sender As Object, e As MouseEventArgs)
|
Private Sub view_MouseMove(sender As Object, e As MouseEventArgs)
|
||||||
|
Try
|
||||||
Dim view As GridView = sender
|
Dim view As GridView = sender
|
||||||
Dim hitInfo As GridHitInfo = view.CalcHitInfo(New Point(e.X, e.Y))
|
Dim hitInfo As GridHitInfo = view.CalcHitInfo(New Point(e.X, e.Y))
|
||||||
|
|
||||||
@ -56,7 +57,6 @@ Public Class ClassDragDrop
|
|||||||
Dim row As DataRow = view.GetDataRow(downHitInfo.RowHandle)
|
Dim row As DataRow = view.GetDataRow(downHitInfo.RowHandle)
|
||||||
Dim source As String = view.GridControl.Name
|
Dim source As String = view.GridControl.Name
|
||||||
|
|
||||||
|
|
||||||
dragDropData = row.Item("GUID") & "|" & source
|
dragDropData = row.Item("GUID") & "|" & source
|
||||||
|
|
||||||
view.GridControl.DoDragDrop(dragDropData, DragDropEffects.Move)
|
view.GridControl.DoDragDrop(dragDropData, DragDropEffects.Move)
|
||||||
@ -65,6 +65,9 @@ Public Class ClassDragDrop
|
|||||||
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = True
|
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Error in view_MouseMove: " & ex.Message, MsgBoxStyle.Critical)
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub grid_DragOver(sender As Object, e As DragEventArgs)
|
Private Sub grid_DragOver(sender As Object, e As DragEventArgs)
|
||||||
|
|||||||
@ -124,8 +124,6 @@ Public Class frmSQL_DESIGNER
|
|||||||
Dim pattern As New clsPatterns.Pattern(placeholder)
|
Dim pattern As New clsPatterns.Pattern(placeholder)
|
||||||
|
|
||||||
query = clsPatterns.ReplacePattern(query, pattern.Type, replacement)
|
query = clsPatterns.ReplacePattern(query, pattern.Type, replacement)
|
||||||
|
|
||||||
'query = query.Replace(placeholder, replacement)
|
|
||||||
Else
|
Else
|
||||||
MsgBox("Bitte geben Sie für den Platzhalter " & placeholder & " einen Wert an!", MsgBoxStyle.Exclamation, "Fehlende Platzhalter Ersetzung")
|
MsgBox("Bitte geben Sie für den Platzhalter " & placeholder & " einen Wert an!", MsgBoxStyle.Exclamation, "Fehlende Platzhalter Ersetzung")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -229,21 +227,28 @@ Public Class frmSQL_DESIGNER
|
|||||||
|
|
||||||
Private Sub btnAddControl_Click(sender As Object, e As EventArgs) Handles btnAddControl.Click
|
Private Sub btnAddControl_Click(sender As Object, e As EventArgs) Handles btnAddControl.Click
|
||||||
If cmbControls.SelectedIndex <> -1 Then
|
If cmbControls.SelectedIndex <> -1 Then
|
||||||
Dim value As String = clsPatterns.WrapPatternValue("CTRL", cmbControls.Text)
|
Dim value As String = clsPatterns.WrapPatternValue(clsPatterns.PATTERN_CTRL, cmbControls.Text)
|
||||||
InsertAtSelection(value)
|
InsertAtSelection(value)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnAddStatic_Click(sender As Object, e As EventArgs) Handles btnAddStatic.Click
|
Private Sub btnAddStatic_Click(sender As Object, e As EventArgs) Handles btnAddStatic.Click
|
||||||
If cmbStatic.SelectedIndex <> -1 Then
|
If cmbStatic.SelectedIndex <> -1 Then
|
||||||
Dim value As String = clsPatterns.WrapPatternValue("INT", cmbStatic.Text)
|
Dim value As String = clsPatterns.WrapPatternValue(clsPatterns.PATTERN_INT, cmbStatic.Text)
|
||||||
InsertAtSelection(value)
|
InsertAtSelection(value)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnAddIndex.Click
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnAddIndex.Click
|
||||||
If cmbIndexe.SelectedIndex <> -1 Then
|
If cmbIndexe.SelectedIndex <> -1 Then
|
||||||
Dim value As String = clsPatterns.WrapPatternValue("WMI", cmbIndexe.Text)
|
Dim value As String = clsPatterns.WrapPatternValue(clsPatterns.PATTERN_WMI, cmbIndexe.Text)
|
||||||
|
InsertAtSelection(value)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAddUser_Click(sender As Object, e As EventArgs) Handles btnAddUser.Click
|
||||||
|
If cmbUser.SelectedIndex <> -1 Then
|
||||||
|
Dim value As String = clsPatterns.WrapPatternValue(clsPatterns.PATTERN_USER, cmbUser.Text)
|
||||||
InsertAtSelection(value)
|
InsertAtSelection(value)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@ -257,11 +262,4 @@ Public Class frmSQL_DESIGNER
|
|||||||
Private Sub btnShowConnections_Click(sender As Object, e As EventArgs) Handles btnShowConnections.Click
|
Private Sub btnShowConnections_Click(sender As Object, e As EventArgs) Handles btnShowConnections.Click
|
||||||
frmConnection.ShowDialog()
|
frmConnection.ShowDialog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnAddUser_Click(sender As Object, e As EventArgs) Handles btnAddUser.Click
|
|
||||||
If cmbUser.SelectedIndex <> -1 Then
|
|
||||||
Dim value As String = clsPatterns.WrapPatternValue("USER", cmbUser.Text)
|
|
||||||
InsertAtSelection(value)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
End Class
|
||||||
Loading…
x
Reference in New Issue
Block a user