neu
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
Public Class usrCntlMessenger_ChatElement
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
'Property BG_COLOR As Color = Color.FromArgb(192, 255, 192) ' Color.Azure
|
||||
Dim ttp As New System.Windows.Forms.ToolTip
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -28,17 +29,32 @@ Public Class usrCntlMessenger_ChatElement
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlMessenger_ChatElement_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
ttp.SetToolTip(lblDel, "Element innerhalb 60 Sek. löschen")
|
||||
' setBgCOLOR(Color.Azure)
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
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_type.Contains("DEL_") Then
|
||||
txtChatmessage.Text = "*gelöscht"
|
||||
Else
|
||||
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
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
|
||||
|
||||
Sub setRead()
|
||||
@@ -48,4 +64,23 @@ Public Class usrCntlMessenger_ChatElement
|
||||
End If
|
||||
Next
|
||||
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_ChatElement_Load(Me, New EventArgs)
|
||||
lblDel.Visible = False
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user