neu
This commit is contained in:
@@ -96,10 +96,13 @@ Public Class frmMessenger
|
||||
|
||||
' If IO.Directory.Exists(My.Application.roo "") Then
|
||||
|
||||
Dim spezialEmoji = False
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME = "ADMIN" Then spezialEmoji = True
|
||||
|
||||
If IO.Directory.Exists(EMOJI_PATH) Then
|
||||
For Each aa In IO.Directory.GetFiles(EMOJI_PATH) '.OrderBy(Function(f) f)
|
||||
If alloweasteregg Or Not aa.Contains("easteregg") Then
|
||||
If IO.File.Exists(aa) And aa.Contains(".png") And aa.Contains("emoji_") Then
|
||||
If IO.File.Exists(aa) And aa.Contains(".png") And (aa.Contains("emoji_") Or spezialEmoji) Then
|
||||
|
||||
Dim p As New PictureBox
|
||||
p.Size = New Size(40, 40)
|
||||
@@ -349,7 +352,11 @@ Public Class frmMessenger
|
||||
' CHAT_ITEM.txtChatmessage.Text = MSG.chatMg_text
|
||||
'CHAT_ITEM.lblName.Text = MSG.chatMg_maId
|
||||
Return (CHAT_ITEM)
|
||||
Case "DEL_TEXT", "DEL_ATTACHMENT", "DEL_EMOJI"
|
||||
|
||||
Dim CHAT_ITEM As New usrCntlMessenger_ChatElementDEL(MSG)
|
||||
checkUsrId(MSG, CHAT_ITEM)
|
||||
Return (CHAT_ITEM)
|
||||
End Select
|
||||
Return Nothing
|
||||
End Function
|
||||
@@ -378,6 +385,10 @@ Public Class frmMessenger
|
||||
If DirectCast(I, usrCntlMessenger_ChatEmoji).CHAT_MSG.chatMg_id = MSG.chatMg_id Then
|
||||
found = True
|
||||
End If
|
||||
Case GetType(usrCntlMessenger_ChatElementDEL).ToString
|
||||
If DirectCast(I, usrCntlMessenger_ChatElementDEL).CHAT_MSG.chatMg_id = MSG.chatMg_id Then
|
||||
found = True
|
||||
End If
|
||||
End Select
|
||||
|
||||
Next
|
||||
@@ -437,6 +448,16 @@ Public Class frmMessenger
|
||||
CHAT_ITEM.setBgCOLOR(Color.FromArgb(192, 255, 192))
|
||||
End If
|
||||
End Sub
|
||||
Sub checkUsrId(MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages, CHAT_ITEM As usrCntlMessenger_ChatElementDEL)
|
||||
If MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
CHAT_ITEM.Margin = New Padding(MyFlowLayoutPanel1.Width - CHAT_ITEM.Width - 30, 0, 0, 0)
|
||||
'CHAT_ITEM.Left = (MyFlowLayoutPanel1.Width - CHAT_ITEM.Width - 30)
|
||||
'CHAT_ITEM.Anchor = AnchorStyles.None
|
||||
'CHAT_ITEM.Dock = DockStyle.Right
|
||||
' CHAT_ITEM.Dock = DockStyle.Right
|
||||
' CHAT_ITEM.setBgCOLOR(Color.FromArgb(192, 255, 192))
|
||||
End If
|
||||
End Sub
|
||||
Sub checkUsrId(MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages, CHAT_ITEM As usrCntlMessenger_ChatEmoji)
|
||||
If MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
CHAT_ITEM.Margin = New Padding(MyFlowLayoutPanel1.Width - CHAT_ITEM.Width - 30, 0, 0, 0)
|
||||
|
||||
@@ -24,19 +24,23 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.pic = New System.Windows.Forms.PictureBox()
|
||||
Me.lblDateTime = New System.Windows.Forms.Label()
|
||||
Me.lblNewMsg = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.lblDel = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.lblDel)
|
||||
Me.pnl.Controls.Add(Me.Panel1)
|
||||
Me.pnl.Controls.Add(Me.txtChatmessage)
|
||||
Me.pnl.Controls.Add(Me.pic)
|
||||
@@ -46,6 +50,34 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Me.pnl.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 4
|
||||
'
|
||||
'txtChatmessage
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.White
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(113, 17)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(260, 37)
|
||||
Me.txtChatmessage.TabIndex = 1
|
||||
Me.txtChatmessage.Text = "Anhangdokument.pdf"
|
||||
'
|
||||
'pic
|
||||
'
|
||||
Me.pic.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.docAllgemein
|
||||
@@ -95,33 +127,23 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Me.lblName.TabIndex = 4
|
||||
Me.lblName.Text = "Max Mustermann (VERAG)"
|
||||
'
|
||||
'Panel1
|
||||
'Timer1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 4
|
||||
Me.Timer1.Interval = 2000
|
||||
'
|
||||
'txtChatmessage
|
||||
'lblDel
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.White
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(113, 17)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(260, 37)
|
||||
Me.txtChatmessage.TabIndex = 1
|
||||
Me.txtChatmessage.Text = "Anhangdokument.pdf"
|
||||
Me.lblDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDel.AutoSize = True
|
||||
Me.lblDel.BackColor = System.Drawing.Color.Red
|
||||
Me.lblDel.Font = New System.Drawing.Font("Arial Black", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblDel.ForeColor = System.Drawing.Color.White
|
||||
Me.lblDel.Location = New System.Drawing.Point(360, 0)
|
||||
Me.lblDel.Name = "lblDel"
|
||||
Me.lblDel.Size = New System.Drawing.Size(15, 14)
|
||||
Me.lblDel.TabIndex = 7
|
||||
Me.lblDel.Text = "X"
|
||||
Me.lblDel.Visible = False
|
||||
'
|
||||
'usrCntlMessenger_ChatAnhang
|
||||
'
|
||||
@@ -135,6 +157,7 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Me.Name = "usrCntlMessenger_ChatAnhang"
|
||||
Me.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
@@ -148,4 +171,6 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Friend WithEvents lblNewMsg As Label
|
||||
Friend WithEvents lblName As Label
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents Timer1 As Timer
|
||||
Friend WithEvents lblDel As Label
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -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
|
||||
|
||||
@@ -24,12 +24,15 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.lblDel = New System.Windows.Forms.Label()
|
||||
Me.lblDateTime = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.lblNewMsg = New System.Windows.Forms.Label()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
@@ -52,29 +55,26 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Controls.Add(Me.lblDel)
|
||||
Me.Panel1.Controls.Add(Me.txtChatmessage)
|
||||
Me.Panel1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 32)
|
||||
Me.Panel1.TabIndex = 2
|
||||
'
|
||||
'txtChatmessage
|
||||
'lblDel
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.Azure
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(4, 4)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(368, 25)
|
||||
Me.txtChatmessage.TabIndex = 0
|
||||
Me.txtChatmessage.Text = "Hallo, wie gehts?"
|
||||
Me.lblDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDel.AutoSize = True
|
||||
Me.lblDel.BackColor = System.Drawing.Color.Red
|
||||
Me.lblDel.Font = New System.Drawing.Font("Arial Black", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblDel.ForeColor = System.Drawing.Color.White
|
||||
Me.lblDel.Location = New System.Drawing.Point(357, 0)
|
||||
Me.lblDel.Name = "lblDel"
|
||||
Me.lblDel.Size = New System.Drawing.Size(15, 14)
|
||||
Me.lblDel.TabIndex = 5
|
||||
Me.lblDel.Text = "X"
|
||||
Me.lblDel.Visible = False
|
||||
'
|
||||
'lblDateTime
|
||||
'
|
||||
@@ -114,6 +114,28 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Me.lblNewMsg.Text = "!"
|
||||
Me.lblNewMsg.Visible = False
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
Me.Timer1.Interval = 2000
|
||||
'
|
||||
'txtChatmessage
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.Azure
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(4, 4)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(368, 25)
|
||||
Me.txtChatmessage.TabIndex = 0
|
||||
Me.txtChatmessage.Text = "Hallo, wie gehts?"
|
||||
'
|
||||
'usrCntlMessenger_ChatElement
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -125,6 +147,7 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -135,4 +158,6 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents txtChatmessage As VERAG_PROG_ALLGEMEIN.MyRichTextBox
|
||||
Friend WithEvents lblNewMsg As Label
|
||||
Friend WithEvents lblDel As Label
|
||||
Friend WithEvents Timer1 As Timer
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -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
|
||||
|
||||
66
VERAG_PROG_ALLGEMEIN/Messenger/usrCntlMessenger_ChatElementDEL.Designer.vb
generated
Normal file
66
VERAG_PROG_ALLGEMEIN/Messenger/usrCntlMessenger_ChatElementDEL.Designer.vb
generated
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class usrCntlMessenger_ChatElementDEL
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.lblName)
|
||||
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.pnl.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnl.Name = "pnl"
|
||||
Me.pnl.Size = New System.Drawing.Size(378, 18)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'lblName
|
||||
'
|
||||
Me.lblName.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle))
|
||||
Me.lblName.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.lblName.Location = New System.Drawing.Point(4, 1)
|
||||
Me.lblName.Name = "lblName"
|
||||
Me.lblName.Size = New System.Drawing.Size(193, 13)
|
||||
Me.lblName.TabIndex = 0
|
||||
Me.lblName.Text = "*gelöschtes Element"
|
||||
'
|
||||
'usrCntlMessenger_ChatElementDEL
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.Controls.Add(Me.pnl)
|
||||
Me.Name = "usrCntlMessenger_ChatElementDEL"
|
||||
Me.Size = New System.Drawing.Size(378, 18)
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents pnl As Panel
|
||||
Friend WithEvents lblName As Label
|
||||
End Class
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,27 @@
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class usrCntlMessenger_ChatElementDEL
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
'Property BG_COLOR As Color = Color.FromArgb(192, 255, 192) ' Color.Azure
|
||||
|
||||
Sub New()
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
Me.CHAT_MSG = CHAT_MSG
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -24,18 +24,22 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.pic = New System.Windows.Forms.PictureBox()
|
||||
Me.lblDateTime = New System.Windows.Forms.Label()
|
||||
Me.lblNewMsg = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.lblDel = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.lblDel)
|
||||
Me.pnl.Controls.Add(Me.Panel1)
|
||||
Me.pnl.Controls.Add(Me.pic)
|
||||
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
@@ -44,6 +48,16 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Me.pnl.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 3
|
||||
'
|
||||
'pic
|
||||
'
|
||||
Me.pic.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
@@ -95,15 +109,23 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Me.lblName.TabIndex = 4
|
||||
Me.lblName.Text = "Max Mustermann (VERAG)"
|
||||
'
|
||||
'Panel1
|
||||
'Timer1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 3
|
||||
Me.Timer1.Interval = 2000
|
||||
'
|
||||
'lblDel
|
||||
'
|
||||
Me.lblDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDel.AutoSize = True
|
||||
Me.lblDel.BackColor = System.Drawing.Color.Red
|
||||
Me.lblDel.Font = New System.Drawing.Font("Arial Black", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblDel.ForeColor = System.Drawing.Color.White
|
||||
Me.lblDel.Location = New System.Drawing.Point(364, 0)
|
||||
Me.lblDel.Name = "lblDel"
|
||||
Me.lblDel.Size = New System.Drawing.Size(15, 14)
|
||||
Me.lblDel.TabIndex = 8
|
||||
Me.lblDel.Text = "X"
|
||||
Me.lblDel.Visible = False
|
||||
'
|
||||
'usrCntlMessenger_ChatEmoji
|
||||
'
|
||||
@@ -117,6 +139,7 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Me.Name = "usrCntlMessenger_ChatEmoji"
|
||||
Me.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
@@ -129,4 +152,6 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Friend WithEvents lblNewMsg As Label
|
||||
Friend WithEvents lblName As Label
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents Timer1 As Timer
|
||||
Friend WithEvents lblDel As Label
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -5,6 +5,7 @@ Public Class usrCntlMessenger_ChatEmoji
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
Dim frmM As frmMessenger
|
||||
'Public FI As String = ""
|
||||
Dim ttp As New System.Windows.Forms.ToolTip
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -29,40 +30,52 @@ Public Class usrCntlMessenger_ChatEmoji
|
||||
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
|
||||
If CHAT_MSG.chatMg_type.Contains("DEL_") Then
|
||||
pic.Visible = False
|
||||
Else
|
||||
' txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
|
||||
Dim imgPath = CHAT_MSG.chatMg_text
|
||||
Try
|
||||
'Dim frmM As frmMessenger = DirectCast(Me.Parent, frmMessenger)
|
||||
If frmM.EMOJI_PATH <> frmM.EMOJI_PATH_MAIN Then
|
||||
If IO.File.Exists(imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)) Then
|
||||
imgPath = imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)
|
||||
Dim imgPath = CHAT_MSG.chatMg_text
|
||||
Try
|
||||
'Dim frmM As frmMessenger = DirectCast(Me.Parent, frmMessenger)
|
||||
If frmM.EMOJI_PATH <> frmM.EMOJI_PATH_MAIN Then
|
||||
If IO.File.Exists(imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)) Then
|
||||
imgPath = imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
Try
|
||||
pic.BackgroundImage = Image.FromFile(imgPath)
|
||||
pic.BackgroundImageLayout = Windows.Forms.ImageLayout.Zoom
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
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
|
||||
|
||||
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
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
Try
|
||||
pic.BackgroundImage = Image.FromFile(imgPath)
|
||||
pic.BackgroundImageLayout = Windows.Forms.ImageLayout.Zoom
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
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
|
||||
|
||||
setRead()
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -81,5 +94,22 @@ Public Class usrCntlMessenger_ChatEmoji
|
||||
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