Drag and Drop Outlook und NodeNavigation Testbutton entfernt
This commit is contained in:
@@ -222,6 +222,12 @@ Public Class frmNodeNavigation
|
||||
End Try
|
||||
|
||||
Await Load_nodes()
|
||||
AddHandler ClassDragDrop.FilesDroppedReady, Sub(files As String())
|
||||
' Hier deine bisherige Verarbeitung von files_dropped triggern.
|
||||
' Beispiel:
|
||||
LOGGER?.Info("FilesDroppedReady: " & String.Join("; ", files))
|
||||
' ... bestehende Routine aufrufen ...
|
||||
End Sub
|
||||
End Function
|
||||
Private Async Function Load_nodes() As Task
|
||||
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||
@@ -2124,115 +2130,96 @@ Public Class frmNodeNavigation
|
||||
End Sub
|
||||
#Region "Dropping Files"
|
||||
Sub Drag_Enter(e As DragEventArgs)
|
||||
If _EntityId <> 0 Then
|
||||
If WM_READ_ONLY = False Then
|
||||
ClassDragDrop.Drag_enter(e)
|
||||
Else
|
||||
Update_Notification_Label(True, "READ ONLY ACCESS", "Yellow")
|
||||
End If
|
||||
Else
|
||||
If _EntityId = 0 Then
|
||||
Update_Notification_Label(True, "No entity selected", "Yellow")
|
||||
e.Effect = DragDropEffects.None
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If WM_READ_ONLY Then
|
||||
Update_Notification_Label(True, "READ ONLY ACCESS", "Yellow")
|
||||
e.Effect = DragDropEffects.None
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Delegiere die Priorisierung (Outlook > FileDrop) an die zentrale Routine
|
||||
ClassDragDrop.Drag_enter(e)
|
||||
End Sub
|
||||
Private Async Function Drag_Drop(e As DragEventArgs) As Task
|
||||
Try
|
||||
If ClassDragDrop.Drop_File(e) = False Then
|
||||
Exit Function
|
||||
End If
|
||||
' Basis-Prechecks – bevor wir irgendetwas verarbeiten
|
||||
If USER_PERSONIFIED_TEST = True Then
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "You are using orgFLOW in personified mode! Adding files is not allowed!")
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
If WMMOD.SessionLoggedin = False Then
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "Check Your windream-connection and restart orgFLOW afterwards.", "Could not create a windream session!")
|
||||
Exit Function
|
||||
End If
|
||||
If _EntityId <> 0 And (RIGHT_READ_ONLY_DOC = False And GridControlDocSearch.ContextMenuStrip.Name = "ContextMenuStripResultFiles") Or RIGHT_ADD_DOC = True Then
|
||||
Dim sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORMVIEW_ID = " & FORMVIEW_ID
|
||||
Dim count_DT = MYDB_ECM.GetScalarValue(sql)
|
||||
If count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID = 0 Then
|
||||
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
|
||||
Exit Function
|
||||
ElseIf count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID <> 0 Then
|
||||
sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORM_ID = " & CURRENT_ENTITY_REDUNDANT_ID
|
||||
count_DT = MYDB_ECM.GetScalarValue(sql)
|
||||
If count_DT = 0 Then
|
||||
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
|
||||
Exit Function
|
||||
End If
|
||||
End If
|
||||
If RECORD_CHANGED = True Then
|
||||
If Save_Record() = False Then
|
||||
Exit Function
|
||||
End If
|
||||
End If
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = 0
|
||||
If CONTROL_DOCTYPE_MATCH <> 0 Then
|
||||
Try
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = ""
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = ClassControlValues.GetControlValuesREC_CONTROL(CURRENT_RECORD_ID, CONTROL_DOCTYPE_MATCH)
|
||||
Catch ex As Exception
|
||||
NNLogger.Error(ex)
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = 0
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = ""
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
DROPPED_CHECKED = False
|
||||
If e.Data.GetDataPresent(DataFormats.StringFormat) Then
|
||||
Dim Wert As String = CType(e.Data.GetData(DataFormats.StringFormat), Object)
|
||||
Console.WriteLine("DragDrop-Wert: " & Wert)
|
||||
If Wert.Contains("SCAN") Then
|
||||
Dim split() = Wert.Split(";")
|
||||
If IsNumeric(split(1)) Then
|
||||
CURRENT_FILEID = split(1)
|
||||
|
||||
CURRENT_FORMVIEW_ID = FORMVIEW_ID
|
||||
ClassHelper.Create_USER_FILE_TABLE()
|
||||
If Not IsNothing(CURRENT_TBPMO_FILES_USER) Then
|
||||
If CURRENT_TBPMO_FILES_USER.Rows.Count > 0 Then
|
||||
frmWM_IndexFile.ShowDialog()
|
||||
End If
|
||||
End If
|
||||
|
||||
'RUN_WD_SEARCH(WD_Suche, "RECORD")
|
||||
End If
|
||||
ElseIf (e.Data.GetDataPresent("FileGroupDescriptor")) AndAlso (e.Data.GetDataPresent("FileContents")) Then
|
||||
If ClassDragDrop.Drop_File(e) = True Then
|
||||
Check_Dropped_Files()
|
||||
End If
|
||||
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
|
||||
If ClassDragDrop.Drop_File(e) = True Then
|
||||
Check_Dropped_Files()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ClassDragDrop.Drop_File(e) = True Then
|
||||
Check_Dropped_Files()
|
||||
End If
|
||||
|
||||
End If
|
||||
'Nur wenn neue Dateien abgelegt wurden muss die Prozedur zur aktualisierung der windream Dateien ausgeführt werden...ansonsten muss nichts passieren
|
||||
If NEW_FILES_ADDED = True Then
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Await RUN_DOCSEARCH(True)
|
||||
ClassHelper.GetDocrecordLinks(CURRENT_RECORD_ID)
|
||||
TimerClearResultfiles.Start()
|
||||
Else
|
||||
NNLogger.Debug("No new files were added or windream tab is not focused!")
|
||||
End If
|
||||
Me.Cursor = Cursors.Default
|
||||
Else
|
||||
'If RIGHT_RECORD_AND_FILE_READ_ONLY = True Then
|
||||
' NNLogger.Warn("RIGHT_RECORD_AND_FILE_READ_ONLY is set! No DragDrop allowed")
|
||||
'End If
|
||||
' Rechte-/Kontextprüfung
|
||||
If Not (_EntityId <> 0 AndAlso ((RIGHT_READ_ONLY_DOC = False AndAlso GridControlDocSearch.ContextMenuStrip.Name = "ContextMenuStripResultFiles") OrElse RIGHT_ADD_DOC = True)) Then
|
||||
If RIGHT_READ_ONLY_DOC = True Then
|
||||
NNLogger.Warn("RIGHT_WD_FORBIDDEN is set! No DragDrop allowed")
|
||||
Else
|
||||
NNLogger.Warn("No DragDrop allowed - ELSE")
|
||||
End If
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
' Dokumenttypen-Konfiguration prüfen (wie gehabt)
|
||||
Dim sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORMVIEW_ID = " & FORMVIEW_ID
|
||||
Dim count_DT = MYDB_ECM.GetScalarValue(sql)
|
||||
If count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID = 0 Then
|
||||
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
|
||||
Exit Function
|
||||
ElseIf count_DT = 0 And CURRENT_ENTITY_REDUNDANT_ID <> 0 Then
|
||||
sql = "select count(*) from VWPMO_DOKUMENTTYPES where FORM_ID = " & CURRENT_ENTITY_REDUNDANT_ID
|
||||
count_DT = MYDB_ECM.GetScalarValue(sql)
|
||||
If count_DT = 0 Then
|
||||
MsgBox("No documenttypes for this entity configured! Indexing is not possible!" & vbNewLine & "Please check the configuration!", MsgBoxStyle.Exclamation)
|
||||
Exit Function
|
||||
End If
|
||||
End If
|
||||
|
||||
' Ungespeicherte Änderungen sichern
|
||||
If RECORD_CHANGED = True Then
|
||||
If Save_Record() = False Then Exit Function
|
||||
End If
|
||||
|
||||
' Doctype-Match ermitteln (wie gehabt)
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = 0
|
||||
If CONTROL_DOCTYPE_MATCH <> 0 Then
|
||||
Try
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = ""
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = ClassControlValues.GetControlValuesREC_CONTROL(CURRENT_RECORD_ID, CONTROL_DOCTYPE_MATCH)
|
||||
Catch ex As Exception
|
||||
NNLogger.Error(ex)
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = 0
|
||||
CURRENT_CONTROL_DOCTYPE_MATCH = ""
|
||||
End Try
|
||||
End If
|
||||
|
||||
DROPPED_CHECKED = False
|
||||
|
||||
' Zentrale Verarbeitung: genau EIN Aufruf – Outlook/Filesystem/SCAN wird intern erkannt und geschrieben
|
||||
If ClassDragDrop.Drop_File(e) = False Then
|
||||
NNLogger.Debug("Drag_Drop: No supported data format detected by ClassDragDrop.")
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
' Nach erfolgreichem Drop die User-File-Tabelle konsolidieren und ggf. Indexdialog öffnen
|
||||
Check_Dropped_Files()
|
||||
|
||||
' Falls Dateien hinzugefügt wurden, Ergebnisliste aktualisieren
|
||||
If NEW_FILES_ADDED = True Then
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Await RUN_DOCSEARCH(True)
|
||||
ClassHelper.GetDocrecordLinks(CURRENT_RECORD_ID)
|
||||
TimerClearResultfiles.Start()
|
||||
Else
|
||||
NNLogger.Debug("No new files were added or windream tab is not focused!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
NNLogger.Error(ex)
|
||||
@@ -3750,14 +3737,4 @@ Public Class frmNodeNavigation
|
||||
MessageBox.Show("Unerwarteter Fehler beim Springen zum Filestore-Knoten: " & ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub FindNode_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles FindNode.ItemClick
|
||||
Dim oNode = TreeListDevexpress.FindNodeByFieldValue("GUID", BarEditItem1.EditValue)
|
||||
If Not IsNothing(oNode) Then
|
||||
TreeListDevexpress.FocusedNode = oNode
|
||||
TreeListDevexpress.MakeNodeVisible(oNode)
|
||||
Else
|
||||
MessageBox.Show("Knoten nicht gefunden!", "Knoten nicht gefunden", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user