This commit is contained in:
2026-04-29 15:47:45 +02:00
parent ded64d3192
commit 6b2a46f20a

View File

@@ -1007,40 +1007,15 @@ Public Class frmMessenger
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles btnSendAtt.Click
If Not CHAT.chat_aktiv Then MsgBox("Chat inaktiv!") : Exit Sub
If CHAT IsNot Nothing Then
Dim fd As New OpenFileDialog
' fd.Filter = "Excel Dateien|*.xls;*.xlsx"
fd.RestoreDirectory = True
fd.Title = "Datei auswählen"
' fd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
'fd.Filter = "Image Files(*.BMP;*.JPG;*.GIF;*.PNG)|*.BMP;*.JPG;*.GIF;*.PNG"
'fd.FilterIndex = 2
If fd.ShowDialog() = System.Windows.Forms.DialogResult.OK And fd.FileName <> "" Then
saveFileAtt(fd.FileName)
'Dim fileName = New System.IO.FileInfo(fd.FileName).Name
'Dim docId = -1
'If saveToDS(fileName, fd.FileName, docId) Then
' Dim MSG As New VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages(CHAT.chat_id, VERAG_PROG_ALLGEMEIN.cAllgemein.USRID)
' MSG.chatMg_type = "ATTACHMENT"
' MSG.chatMg_text = fileName
' MSG.chatMg_anhang_docId = docId
' MSG.chatMg_maName = VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.Fullname
' MSG.chatMg_maFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
' If MSG.SAVE(True, CHAT.CHAT_MEMBERS) Then
' SEND_TOKEN_NEW_MESSAGE()
' ' CHAT.CHAT_MESSAGES.Add(MSG)
' SET_ALL_READ()
' REFRESH_CHAT()
' rtbChatMessage.Text = ""
' rtbChatMessage.Focus()
' End If
' End If
End If
Using fd As New OpenFileDialog()
fd.Title = "Datei auswählen"
fd.RestoreDirectory = True
fd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
If fd.ShowDialog(Me) = DialogResult.OK AndAlso Not String.IsNullOrEmpty(fd.FileName) Then
saveFileAtt(fd.FileName)
End If
End Using
End If
End Sub