neu
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
Public Class usrCntlMessenger_ChatAnhang
|
||||
Property BG_COLOR As Color = Color.FromArgb(192, 255, 192) ' Color.Azure
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
Dim ttp As New System.Windows.Forms.ToolTip
|
||||
|
||||
'Public FI As String = ""
|
||||
|
||||
@@ -29,21 +30,35 @@ Public Class usrCntlMessenger_ChatAnhang
|
||||
Panel1.BackColor = BG_COLOR
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlMessenger_ChatAnhang_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Private Sub usrCntlMessenger_ChatAnhang_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
ttp.SetToolTip(lblDel, "Element innerhalb 60 Sek. löschen")
|
||||
init()
|
||||
End Sub
|
||||
|
||||
Sub init()
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
If CHAT_MSG.chatMg_type.Contains("DEL_") Then
|
||||
txtChatmessage.Text = "*gelöscht"
|
||||
Else
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
|
||||
Dim cnt = 0
|
||||
While (txtChatmessage.Size.Width - txtChatmessage.ClientSize.Width > 10) And cnt < 20 ' (txtChatmessage.Height - txtChatmessage.ClientSize.Height) > MyRTBInnerSize Or cnt > 100
|
||||
Me.Height += 20 : cnt += 1
|
||||
End While
|
||||
setRead()
|
||||
Dim cnt = 0
|
||||
While (txtChatmessage.Size.Width - txtChatmessage.ClientSize.Width > 10) And cnt < 20 ' (txtChatmessage.Height - txtChatmessage.ClientSize.Height) > MyRTBInnerSize Or cnt > 100
|
||||
Me.Height += 20 : cnt += 1
|
||||
End While
|
||||
setRead()
|
||||
|
||||
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Timer1.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -55,12 +70,29 @@ Public Class usrCntlMessenger_ChatAnhang
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub pic_Click(sender As Object, e As EventArgs) Handles pic.Click, txtChatmessage.Click
|
||||
Private Sub pic_Click(sender As Object, e As EventArgs) Handles txtChatmessage.Click, pic.Click
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
Dim PATH = cDATENSERVER.GET_PDFPath_BY_DocID(CHAT_MSG.chatMg_anhang_docId, True)
|
||||
'Process.Start(PATH)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Else
|
||||
lblDel.Visible = False
|
||||
Timer1.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lblDel_Click(sender As Object, e As EventArgs) Handles lblDel.Click
|
||||
CHAT_MSG.DELETE_MESSAGE()
|
||||
usrCntlMessenger_ChatAnhang_Load(Me, New EventArgs)
|
||||
lblDel.Visible = False
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user