Anpassung Dakosy BOX 9.2,
CHAT->Aus Zw.Ablage einfügen
This commit is contained in:
@@ -8,9 +8,13 @@ Public Class cMessenger
|
||||
|
||||
Shared SQL As New SQL
|
||||
|
||||
Public Shared Function GEN_NEW_CHAT(chat_name As String, MaIds As List(Of Integer), Optional ByRef CHAT As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_Chat = Nothing) As Boolean
|
||||
Public Shared Function GEN_NEW_CHAT(chat_name As String, MaIds As List(Of Integer), Optional ByRef CHAT As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_Chat = Nothing, Optional chat_art As String = "CHAT", Optional chat_AvisoId As Integer = -1, Optional chat_SendungsId As Integer = -1) As Boolean
|
||||
CHAT = New VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_Chat
|
||||
CHAT.chat_erstelltAm = Now
|
||||
If chat_art <> "" Then CHAT.chat_art = chat_art
|
||||
If chat_AvisoId > 0 Then CHAT.chat_AvisoId = chat_AvisoId
|
||||
If chat_SendungsId > 0 Then CHAT.chat_SendungsId = chat_SendungsId
|
||||
|
||||
CHAT.chat_erstelltMaId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
CHAT.chat_name = chat_name
|
||||
|
||||
@@ -23,6 +27,8 @@ Public Class cMessenger
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Shared Function CHECK_EXISTS(MaId As Integer, Optional ByRef toChatID As Integer = -1) As Boolean
|
||||
Dim sqlStr = "Select TOP 1 chat_id FROM [tblMessenger_Chat] inner join tblMessenger_ChatMembers On chatMb_chatId=chat_id where chat_name='' AND [chat_aktiv]=1
|
||||
And (SELECT COUNT(*) FROM tblMessenger_ChatMembers WHERE chatMb_chatId=chat_id And chatMb_maId='" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "' ) >0
|
||||
@@ -58,6 +64,8 @@ Public Class cMessenger
|
||||
Property chat_art As String = "CHAT"
|
||||
Property chat_erstelltAm As Date = Now
|
||||
Property chat_erstelltMaId As Integer
|
||||
Property chat_AvisoId As Integer = -1
|
||||
Property chat_SendungsId As Integer = -1
|
||||
Property chat_aktiv As Boolean = True
|
||||
Property chat_freigegeben As Boolean = True
|
||||
|
||||
@@ -78,6 +86,16 @@ Public Class cMessenger
|
||||
Me.chat_erstelltAm = Now
|
||||
LOAD(topMax, dateTmp)
|
||||
End Sub
|
||||
Sub New(chat_AvisoId As Integer, chat_SendungsId As Integer, Optional topMax As String = "", Optional dateTmp As Object = Nothing)
|
||||
Me.chat_id = chat_id
|
||||
Me.chat_erstelltMaId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
Me.chat_erstelltAm = Now
|
||||
Me.chat_art = "LKW_CHAT"
|
||||
LOAD_ByLKW(chat_AvisoId, chat_SendungsId, topMax, dateTmp)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
@@ -87,6 +105,8 @@ Public Class cMessenger
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_art", chat_art))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_erstelltAm", chat_erstelltAm))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_erstelltMaId", chat_erstelltMaId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_AvisoId", chat_AvisoId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_SendungsId", chat_SendungsId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_aktiv", chat_aktiv))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chat_freigegeben", chat_freigegeben))
|
||||
|
||||
@@ -146,6 +166,43 @@ Public Class cMessenger
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub LOAD_ByLKW(chat_AvisoId As Integer, chat_SendungsId As Integer, Optional topMax As String = "", Optional dateTmp As Object = Nothing)
|
||||
Try
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionADMIN()
|
||||
Using cmd As New SqlCommand("Select * FROM tblMessenger_Chat WHERE chat_AvisoId=@chat_AvisoId " & If(chat_SendungsId > 0, " AND chat_SendungsId=chat_SendungsId ", "") & " AND chat_art='LKW_CHAT'", conn)
|
||||
cmd.Parameters.AddWithValue("@chat_AvisoId", chat_AvisoId)
|
||||
cmd.Parameters.AddWithValue("@chat_SendungsId", chat_SendungsId)
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Me.LOAD_MEMBERS()
|
||||
If dateTmp Is Nothing Then
|
||||
Me.LOAD_MESSAGES()
|
||||
Else
|
||||
Me.LOAD_MESSAGES_DATE(dateTmp)
|
||||
End If
|
||||
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function SAVE_MEMBERS() As Boolean
|
||||
Try
|
||||
|
||||
106
VERAG_PROG_ALLGEMEIN/Messenger/frmMessenger.Designer.vb
generated
106
VERAG_PROG_ALLGEMEIN/Messenger/frmMessenger.Designer.vb
generated
@@ -24,7 +24,6 @@ Partial Class frmMessenger
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
@@ -36,10 +35,10 @@ Partial Class frmMessenger
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMessenger))
|
||||
Me.SplitContainer = New System.Windows.Forms.SplitContainer()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.dgvChats = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.dgvChats = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
Me.Panel6 = New System.Windows.Forms.Panel()
|
||||
Me.cbxInaktiveChats = New System.Windows.Forms.CheckBox()
|
||||
Me.DGVSonstige = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.DGVSonstige = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
Me.Panel5 = New System.Windows.Forms.Panel()
|
||||
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
|
||||
@@ -56,26 +55,27 @@ Partial Class frmMessenger
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel(Me.components)
|
||||
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel()
|
||||
Me.UsrCntlMessenger_ChatElement1 = New VERAG_PROG_ALLGEMEIN.usrCntlMessenger_ChatElement()
|
||||
Me.UsrCntlMessenger_ChatAnhang1 = New VERAG_PROG_ALLGEMEIN.usrCntlMessenger_ChatAnhang()
|
||||
Me.UsrCntlMessenger_ChatElement2 = New VERAG_PROG_ALLGEMEIN.usrCntlMessenger_ChatElement()
|
||||
Me.UsrCntlMessenger_ChatElement3 = New VERAG_PROG_ALLGEMEIN.usrCntlMessenger_ChatElement()
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.Button5 = New System.Windows.Forms.Button()
|
||||
Me.btnTeilnehmer = New System.Windows.Forms.Button()
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.lblChatName = New System.Windows.Forms.Label()
|
||||
Me.lblOnlineOffline = New System.Windows.Forms.Label()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.Button4 = New System.Windows.Forms.Button()
|
||||
Me.pic = New System.Windows.Forms.PictureBox()
|
||||
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.btn = New System.Windows.Forms.Button()
|
||||
Me.rtbChatMessage = New System.Windows.Forms.RichTextBox()
|
||||
Me.TimerNEW_MESSAGE = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Timer_REFRESH = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.TimerNEW_MESSAGE = New System.Windows.Forms.Timer()
|
||||
Me.Timer_REFRESH = New System.Windows.Forms.Timer()
|
||||
Me.cntxt = New System.Windows.Forms.ContextMenuStrip()
|
||||
Me.ChatDeaktivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer.Panel1.SuspendLayout()
|
||||
@@ -120,8 +120,8 @@ Partial Class frmMessenger
|
||||
'SplitContainer.Panel2
|
||||
'
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.SplitContainer1)
|
||||
Me.SplitContainer.Size = New System.Drawing.Size(817, 1052)
|
||||
Me.SplitContainer.SplitterDistance = 270
|
||||
Me.SplitContainer.Size = New System.Drawing.Size(821, 1052)
|
||||
Me.SplitContainer.SplitterDistance = 274
|
||||
Me.SplitContainer.TabIndex = 0
|
||||
'
|
||||
'SplitContainer2
|
||||
@@ -142,7 +142,7 @@ Partial Class frmMessenger
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.DGVSonstige)
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.Panel5)
|
||||
Me.SplitContainer2.Panel2Collapsed = True
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(270, 966)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(274, 966)
|
||||
Me.SplitContainer2.SplitterDistance = 590
|
||||
Me.SplitContainer2.SplitterWidth = 3
|
||||
Me.SplitContainer2.TabIndex = 8
|
||||
@@ -191,7 +191,7 @@ Partial Class frmMessenger
|
||||
Me.dgvChats.RowsDefaultCellStyle = DataGridViewCellStyle4
|
||||
Me.dgvChats.RowTemplate.Height = 30
|
||||
Me.dgvChats.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvChats.Size = New System.Drawing.Size(270, 945)
|
||||
Me.dgvChats.Size = New System.Drawing.Size(274, 945)
|
||||
Me.dgvChats.TabIndex = 0
|
||||
'
|
||||
'Panel6
|
||||
@@ -200,7 +200,7 @@ Partial Class frmMessenger
|
||||
Me.Panel6.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel6.Location = New System.Drawing.Point(0, 945)
|
||||
Me.Panel6.Name = "Panel6"
|
||||
Me.Panel6.Size = New System.Drawing.Size(270, 21)
|
||||
Me.Panel6.Size = New System.Drawing.Size(274, 21)
|
||||
Me.Panel6.TabIndex = 7
|
||||
'
|
||||
'cbxInaktiveChats
|
||||
@@ -363,7 +363,7 @@ Partial Class frmMessenger
|
||||
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel2.Location = New System.Drawing.Point(0, 1029)
|
||||
Me.Panel2.Name = "Panel2"
|
||||
Me.Panel2.Size = New System.Drawing.Size(270, 23)
|
||||
Me.Panel2.Size = New System.Drawing.Size(274, 23)
|
||||
Me.Panel2.TabIndex = 6
|
||||
'
|
||||
'CheckBox1
|
||||
@@ -388,7 +388,7 @@ Partial Class frmMessenger
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(270, 63)
|
||||
Me.Panel1.Size = New System.Drawing.Size(274, 63)
|
||||
Me.Panel1.TabIndex = 1
|
||||
'
|
||||
'MyTextBox1
|
||||
@@ -538,7 +538,7 @@ Partial Class frmMessenger
|
||||
'Panel3
|
||||
'
|
||||
Me.Panel3.BackColor = System.Drawing.Color.White
|
||||
Me.Panel3.Controls.Add(Me.Button5)
|
||||
Me.Panel3.Controls.Add(Me.btnTeilnehmer)
|
||||
Me.Panel3.Controls.Add(Me.Panel4)
|
||||
Me.Panel3.Controls.Add(Me.lblChatName)
|
||||
Me.Panel3.Controls.Add(Me.lblOnlineOffline)
|
||||
@@ -548,19 +548,19 @@ Partial Class frmMessenger
|
||||
Me.Panel3.Size = New System.Drawing.Size(543, 44)
|
||||
Me.Panel3.TabIndex = 9
|
||||
'
|
||||
'Button5
|
||||
'btnTeilnehmer
|
||||
'
|
||||
Me.Button5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button5.BackColor = System.Drawing.Color.MediumSeaGreen
|
||||
Me.Button5.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.person
|
||||
Me.Button5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button5.ForeColor = System.Drawing.Color.White
|
||||
Me.Button5.Location = New System.Drawing.Point(490, 4)
|
||||
Me.Button5.Name = "Button5"
|
||||
Me.Button5.Size = New System.Drawing.Size(49, 33)
|
||||
Me.Button5.TabIndex = 8
|
||||
Me.Button5.UseVisualStyleBackColor = False
|
||||
Me.btnTeilnehmer.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnTeilnehmer.BackColor = System.Drawing.Color.MediumSeaGreen
|
||||
Me.btnTeilnehmer.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.person
|
||||
Me.btnTeilnehmer.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btnTeilnehmer.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnTeilnehmer.ForeColor = System.Drawing.Color.White
|
||||
Me.btnTeilnehmer.Location = New System.Drawing.Point(487, 4)
|
||||
Me.btnTeilnehmer.Name = "btnTeilnehmer"
|
||||
Me.btnTeilnehmer.Size = New System.Drawing.Size(49, 33)
|
||||
Me.btnTeilnehmer.TabIndex = 8
|
||||
Me.btnTeilnehmer.UseVisualStyleBackColor = False
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
@@ -569,7 +569,7 @@ Partial Class frmMessenger
|
||||
Me.Panel4.BackColor = System.Drawing.Color.Black
|
||||
Me.Panel4.Location = New System.Drawing.Point(4, 43)
|
||||
Me.Panel4.Name = "Panel4"
|
||||
Me.Panel4.Size = New System.Drawing.Size(535, 1)
|
||||
Me.Panel4.Size = New System.Drawing.Size(468, 1)
|
||||
Me.Panel4.TabIndex = 6
|
||||
'
|
||||
'lblChatName
|
||||
@@ -588,7 +588,7 @@ Partial Class frmMessenger
|
||||
Me.lblOnlineOffline.BackColor = System.Drawing.Color.MediumSeaGreen
|
||||
Me.lblOnlineOffline.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
|
||||
Me.lblOnlineOffline.ForeColor = System.Drawing.Color.White
|
||||
Me.lblOnlineOffline.Location = New System.Drawing.Point(378, 4)
|
||||
Me.lblOnlineOffline.Location = New System.Drawing.Point(375, 4)
|
||||
Me.lblOnlineOffline.Name = "lblOnlineOffline"
|
||||
Me.lblOnlineOffline.Size = New System.Drawing.Size(106, 33)
|
||||
Me.lblOnlineOffline.TabIndex = 5
|
||||
@@ -599,6 +599,7 @@ Partial Class frmMessenger
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.BackColor = System.Drawing.Color.White
|
||||
Me.pnl.Controls.Add(Me.Button6)
|
||||
Me.pnl.Controls.Add(Me.Button4)
|
||||
Me.pnl.Controls.Add(Me.pic)
|
||||
Me.pnl.Controls.Add(Me.FlowLayoutPanel)
|
||||
@@ -611,14 +612,30 @@ Partial Class frmMessenger
|
||||
Me.pnl.Size = New System.Drawing.Size(543, 320)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button6.BackColor = System.Drawing.Color.SteelBlue
|
||||
Me.Button6.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.ZwAbEinfuegen_white
|
||||
Me.Button6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button6.ForeColor = System.Drawing.Color.White
|
||||
Me.Button6.Location = New System.Drawing.Point(501, 44)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.Button6.Size = New System.Drawing.Size(39, 41)
|
||||
Me.Button6.TabIndex = 9
|
||||
Me.Button6.UseVisualStyleBackColor = False
|
||||
'
|
||||
'Button4
|
||||
'
|
||||
Me.Button4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button4.BackColor = System.Drawing.Color.SteelBlue
|
||||
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button4.ForeColor = System.Drawing.Color.White
|
||||
Me.Button4.Location = New System.Drawing.Point(462, 90)
|
||||
Me.Button4.Location = New System.Drawing.Point(436, 90)
|
||||
Me.Button4.Name = "Button4"
|
||||
Me.Button4.Size = New System.Drawing.Size(76, 25)
|
||||
Me.Button4.Size = New System.Drawing.Size(104, 25)
|
||||
Me.Button4.TabIndex = 8
|
||||
Me.Button4.Text = "Chat History"
|
||||
Me.Button4.UseVisualStyleBackColor = False
|
||||
@@ -627,9 +644,9 @@ Partial Class frmMessenger
|
||||
'
|
||||
Me.pic.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.pic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.pic.Location = New System.Drawing.Point(11, 299)
|
||||
Me.pic.Location = New System.Drawing.Point(-56, 299)
|
||||
Me.pic.Name = "pic"
|
||||
Me.pic.Size = New System.Drawing.Size(524, 20)
|
||||
Me.pic.Size = New System.Drawing.Size(592, 20)
|
||||
Me.pic.TabIndex = 7
|
||||
Me.pic.TabStop = False
|
||||
Me.pic.WaitOnLoad = True
|
||||
@@ -642,29 +659,31 @@ Partial Class frmMessenger
|
||||
Me.FlowLayoutPanel.AutoScroll = True
|
||||
Me.FlowLayoutPanel.Location = New System.Drawing.Point(4, 121)
|
||||
Me.FlowLayoutPanel.Name = "FlowLayoutPanel"
|
||||
Me.FlowLayoutPanel.Size = New System.Drawing.Size(534, 176)
|
||||
Me.FlowLayoutPanel.Size = New System.Drawing.Size(535, 176)
|
||||
Me.FlowLayoutPanel.TabIndex = 6
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button3.BackColor = System.Drawing.Color.SteelBlue
|
||||
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button3.ForeColor = System.Drawing.Color.White
|
||||
Me.Button3.Location = New System.Drawing.Point(461, 44)
|
||||
Me.Button3.Location = New System.Drawing.Point(436, 44)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(76, 40)
|
||||
Me.Button3.Size = New System.Drawing.Size(65, 41)
|
||||
Me.Button3.TabIndex = 2
|
||||
Me.Button3.Text = "+ Anhang"
|
||||
Me.Button3.UseVisualStyleBackColor = False
|
||||
'
|
||||
'btn
|
||||
'
|
||||
Me.btn.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btn.BackColor = System.Drawing.Color.SteelBlue
|
||||
Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btn.ForeColor = System.Drawing.Color.White
|
||||
Me.btn.Location = New System.Drawing.Point(461, 4)
|
||||
Me.btn.Location = New System.Drawing.Point(436, 4)
|
||||
Me.btn.Name = "btn"
|
||||
Me.btn.Size = New System.Drawing.Size(76, 40)
|
||||
Me.btn.Size = New System.Drawing.Size(103, 40)
|
||||
Me.btn.TabIndex = 1
|
||||
Me.btn.Text = "Senden"
|
||||
Me.btn.UseVisualStyleBackColor = False
|
||||
@@ -673,10 +692,10 @@ Partial Class frmMessenger
|
||||
'
|
||||
Me.rtbChatMessage.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.rtbChatMessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.rtbChatMessage.Font = New System.Drawing.Font("Comic Sans MS", 11.0!)
|
||||
Me.rtbChatMessage.Location = New System.Drawing.Point(3, 3)
|
||||
Me.rtbChatMessage.Name = "rtbChatMessage"
|
||||
Me.rtbChatMessage.Size = New System.Drawing.Size(454, 112)
|
||||
Me.rtbChatMessage.Size = New System.Drawing.Size(427, 112)
|
||||
Me.rtbChatMessage.TabIndex = 0
|
||||
Me.rtbChatMessage.Text = ""
|
||||
'
|
||||
@@ -705,7 +724,7 @@ Partial Class frmMessenger
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(817, 1052)
|
||||
Me.ClientSize = New System.Drawing.Size(821, 1052)
|
||||
Me.Controls.Add(Me.SplitContainer)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmMessenger"
|
||||
@@ -772,7 +791,7 @@ Partial Class frmMessenger
|
||||
Friend WithEvents Panel3 As Panel
|
||||
Friend WithEvents lblChatName As Label
|
||||
Friend WithEvents Panel4 As Panel
|
||||
Friend WithEvents Button5 As Button
|
||||
Friend WithEvents btnTeilnehmer As Button
|
||||
Friend WithEvents PictureBox1 As PictureBox
|
||||
Friend WithEvents MyTextBox1 As MyTextBox
|
||||
Friend WithEvents Button4 As Button
|
||||
@@ -788,4 +807,5 @@ Partial Class frmMessenger
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents Panel6 As Panel
|
||||
Friend WithEvents CheckBox1 As CheckBox
|
||||
Friend WithEvents Button6 As Button
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Drawing
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
|
||||
@@ -11,6 +12,7 @@ Public Class frmMessenger
|
||||
Dim loaded = False
|
||||
Public EMOJI_PATH_MAIN = DATENVERVER_OPTIONS.getRootDir & "\DOKUMENTE\CHAT_EMOJIS\"
|
||||
Public EMOJI_PATH = ""
|
||||
Public AvisoId As Integer = -1
|
||||
|
||||
Dim alloweasteregg = False
|
||||
|
||||
@@ -23,6 +25,8 @@ Public Class frmMessenger
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Sub initEMOJI_PATH()
|
||||
|
||||
EMOJI_PATH = EMOJI_PATH_MAIN
|
||||
@@ -77,7 +81,26 @@ Public Class frmMessenger
|
||||
rtbChatMessage.AllowDrop = True
|
||||
MSG_LISTENDER.START()
|
||||
TimerNEW_MESSAGE.Enabled = True
|
||||
intiDGVChats()
|
||||
|
||||
|
||||
If AvisoId > 0 Then
|
||||
|
||||
CHAT = New VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_Chat(AvisoId, -1, topMessages, topMessagesDateHistory)
|
||||
SplitContainer1.Enabled = True
|
||||
RELOAD_CHAT()
|
||||
SplitContainer.Panel1Collapsed = True
|
||||
SplitContainer.Panel1.Enabled = False
|
||||
' Panel3.Enabled = True
|
||||
|
||||
SplitContainer1.Enabled = True
|
||||
|
||||
'MsgBox("O")
|
||||
Else
|
||||
intiDGVChats()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGIMEX", "SDL") Then
|
||||
' Button8.Visible = True
|
||||
@@ -358,6 +381,7 @@ Public Class frmMessenger
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub dgvChats_SelectionChanged(sender As Object, e As EventArgs) Handles dgvChats.SelectionChanged
|
||||
If Not loaded Then Exit Sub
|
||||
topMessagesDateHistory = Nothing ' zurücksetzen des HistoryDate
|
||||
@@ -389,10 +413,10 @@ Public Class frmMessenger
|
||||
|
||||
If CHAT.chat_name <> "" Then
|
||||
lblChatName.Text = CHAT.chat_name
|
||||
Button5.BackgroundImage = My.Resources.people
|
||||
btnTeilnehmer.BackgroundImage = My.Resources.people
|
||||
Else
|
||||
lblChatName.Text = SQL.getValueTxtBySql("SELECT isnull(mit_vname,'') + ' ' + isnull(mit_nname,'') FROM [tblMessenger_ChatMembers] inner join tblMitarbeiter on mit_id=chatMb_maId where chatMb_chatId ='" & CHAT.chat_id & "' and chatMb_maId<>'" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "'", "ADMIN")
|
||||
Button5.BackgroundImage = My.Resources.person
|
||||
btnTeilnehmer.BackgroundImage = My.Resources.person
|
||||
End If
|
||||
End If
|
||||
checkOnlineOffline()
|
||||
@@ -416,18 +440,18 @@ Public Class frmMessenger
|
||||
Try
|
||||
|
||||
If CHAT Is Nothing OrElse CHAT.chat_name <> "" Then
|
||||
lblOnlineOffline.Visible = False
|
||||
Else
|
||||
lblOnlineOffline.Visible = False
|
||||
Else
|
||||
lblOnlineOffline.Visible = True
|
||||
Dim cntOnline = SQL.getValueTxtBySql("SELECT count(*) FROM [tblMessenger_ChatMembers] inner join tblSessions ON sess_maId=[chatMb_maId] and sess_lastRm > dateadd(MINUTE,-2, getdate()) where chatMb_chatId ='" & CHAT.chat_id & "' and chatMb_maId<>'" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "'", "ADMIN")
|
||||
If cntOnline > 0 Then
|
||||
lblOnlineOffline.Text = "ONLINE"
|
||||
lblOnlineOffline.BackColor = Color.MediumSeaGreen
|
||||
Else
|
||||
lblOnlineOffline.Text = "OFFLINE"
|
||||
lblOnlineOffline.BackColor = Color.Red
|
||||
lblOnlineOffline.Text = "ONLINE"
|
||||
lblOnlineOffline.BackColor = Color.MediumSeaGreen
|
||||
Else
|
||||
lblOnlineOffline.Text = "OFFLINE"
|
||||
lblOnlineOffline.BackColor = Color.Red
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
@@ -721,6 +745,9 @@ Public Class frmMessenger
|
||||
AND chat_aktiv='" & (Not cbxInaktiveChats.Checked) & "' ORDER BY chat_lastMsg DESC", "ADMIN")
|
||||
Dim Dt_Current As DataTable = dgvChats.DataSource
|
||||
|
||||
If Dt_New Is Nothing Then Return True
|
||||
If Dt_Current Is Nothing Then Return True
|
||||
|
||||
If Dt_Current.Rows.Count <> Dt_New.Rows.Count Then Return True
|
||||
|
||||
For Each r As DataRow In Dt_New.Rows
|
||||
@@ -742,7 +769,7 @@ Public Class frmMessenger
|
||||
|
||||
Private Sub frmMessenger_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
dgvChats.ClearSelection()
|
||||
SplitContainer1.Enabled = False
|
||||
If AvisoId <= 0 Then SplitContainer1.Enabled = False
|
||||
loaded = True
|
||||
End Sub
|
||||
|
||||
@@ -864,7 +891,7 @@ Public Class frmMessenger
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub saveFileAtt(filePath)
|
||||
Sub saveFileAtt(filePath, Optional reloadChat = True)
|
||||
Dim fileName = New IO.FileInfo(filePath).Name
|
||||
Dim docId = -1
|
||||
If saveToDS(fileName, filePath, docId) Then
|
||||
@@ -877,12 +904,14 @@ Public Class frmMessenger
|
||||
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()
|
||||
If reloadChat 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
|
||||
End Sub
|
||||
@@ -984,7 +1013,7 @@ Public Class frmMessenger
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles btnTeilnehmer.Click
|
||||
If CHAT Is Nothing Then Exit Sub
|
||||
|
||||
If CHAT.chat_name <> "" Then
|
||||
@@ -1045,4 +1074,62 @@ Public Class frmMessenger
|
||||
Dim f As New frmMessenger_SonstigeNEW()
|
||||
f.ShowDialog(Me)
|
||||
End Sub
|
||||
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
|
||||
|
||||
If Not CHAT.chat_aktiv Then MsgBox("Chat inaktiv!") : Exit Sub
|
||||
If CHAT IsNot Nothing Then
|
||||
Dim data As IDataObject = Clipboard.GetDataObject
|
||||
If True Then 'data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
Dim added = False
|
||||
|
||||
If My.Computer.Clipboard.ContainsImage() Then
|
||||
Dim grabpicture As System.Drawing.Image
|
||||
|
||||
grabpicture = My.Computer.Clipboard.GetImage()
|
||||
Dim imagePath = IO.Path.GetTempPath & "\Screenshot_" & Now.ToString("ddMMyyyy_HHmmss") & ".jpg"
|
||||
While IO.File.Exists(imagePath)
|
||||
imagePath = IO.Path.GetTempPath & "\Screenshot_" & Now.ToString("ddMMyyyy_HHmmss") & ".jpg"
|
||||
End While
|
||||
grabpicture.Save(imagePath)
|
||||
saveFileAtt(imagePath, False)
|
||||
added = True
|
||||
Else
|
||||
For Each s As String In My.Computer.Clipboard.GetFileDropList() 'GetData(DataFormats.) 'data.GetData(DataFormats.FileDrop) 'DataFormats.FileDrop)
|
||||
' Dim F_listItem As String = Path.Combine("c:\mynewpath", Path.GetFileName(s))
|
||||
' File.Copy(s, newFile)
|
||||
' MsgBox(s)
|
||||
If IO.File.Exists(s) Then
|
||||
saveFileAtt(s, False)
|
||||
added = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If added Then
|
||||
'CHAT neu laden!
|
||||
SEND_TOKEN_NEW_MESSAGE()
|
||||
SET_ALL_READ()
|
||||
REFRESH_CHAT()
|
||||
rtbChatMessage.Text = ""
|
||||
rtbChatMessage.Focus()
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Function getFileTypeValid(extension, ByRef Typ) As Boolean
|
||||
Select Case extension.ToString.Replace(".", "").ToUpper
|
||||
Case "PDF" : Typ = "PDF"
|
||||
Case "XLS", "XLM", "XLSM", "XLSX", "CSV" : Typ = "EXCEL"
|
||||
Case "DOC", "DOCX" : Typ = "WORD"
|
||||
Case "TXT" : Typ = "TEXT"
|
||||
Case "JPEG", "JPG", "GIF", "TFF" : Typ = "BILD"
|
||||
Case "EXE" : MsgBox("Aviso-Anhänge: Ungültiges Datei-Format!") : Return False
|
||||
Case Else : Typ = "SONSTIGES"
|
||||
End Select
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
@@ -579,5 +579,25 @@ Namespace My.Resources
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property ZwAbEinfuegen() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("ZwAbEinfuegen", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property ZwAbEinfuegen_white() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("ZwAbEinfuegen_white", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
VERAG_PROG_ALLGEMEIN/Resources/ZwAbEinfuegen.png
Normal file
BIN
VERAG_PROG_ALLGEMEIN/Resources/ZwAbEinfuegen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
VERAG_PROG_ALLGEMEIN/Resources/ZwAbEinfuegen_white.png
Normal file
BIN
VERAG_PROG_ALLGEMEIN/Resources/ZwAbEinfuegen_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
@@ -1179,6 +1179,12 @@
|
||||
<LastGenOutput>Reference.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ZwAbEinfuegen.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ZwAbEinfuegen_white.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<ProjectExtensions />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
Reference in New Issue
Block a user