neu
This commit is contained in:
@@ -36,6 +36,8 @@ Partial Class frmMessenger
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.cbxInaktiveChats = New System.Windows.Forms.CheckBox()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.MyTextBox1 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||
Me.lbl = New System.Windows.Forms.Label()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
@@ -67,6 +69,7 @@ Partial Class frmMessenger
|
||||
CType(Me.dgvChats, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel2.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
@@ -95,7 +98,7 @@ Partial Class frmMessenger
|
||||
'
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.SplitContainer1)
|
||||
Me.SplitContainer.Size = New System.Drawing.Size(817, 728)
|
||||
Me.SplitContainer.SplitterDistance = 272
|
||||
Me.SplitContainer.SplitterDistance = 271
|
||||
Me.SplitContainer.TabIndex = 0
|
||||
'
|
||||
'dgvChats
|
||||
@@ -125,7 +128,7 @@ Partial Class frmMessenger
|
||||
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
|
||||
Me.dgvChats.DefaultCellStyle = DataGridViewCellStyle2
|
||||
Me.dgvChats.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.dgvChats.Location = New System.Drawing.Point(0, 42)
|
||||
Me.dgvChats.Location = New System.Drawing.Point(0, 63)
|
||||
Me.dgvChats.Name = "dgvChats"
|
||||
Me.dgvChats.ReadOnly = True
|
||||
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
@@ -141,7 +144,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(272, 656)
|
||||
Me.dgvChats.Size = New System.Drawing.Size(271, 635)
|
||||
Me.dgvChats.TabIndex = 0
|
||||
'
|
||||
'btnTEST
|
||||
@@ -163,7 +166,7 @@ Partial Class frmMessenger
|
||||
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel2.Location = New System.Drawing.Point(0, 698)
|
||||
Me.Panel2.Name = "Panel2"
|
||||
Me.Panel2.Size = New System.Drawing.Size(272, 30)
|
||||
Me.Panel2.Size = New System.Drawing.Size(271, 30)
|
||||
Me.Panel2.TabIndex = 6
|
||||
'
|
||||
'cbxInaktiveChats
|
||||
@@ -179,15 +182,50 @@ Partial Class frmMessenger
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.White
|
||||
Me.Panel1.Controls.Add(Me.MyTextBox1)
|
||||
Me.Panel1.Controls.Add(Me.PictureBox1)
|
||||
Me.Panel1.Controls.Add(Me.lbl)
|
||||
Me.Panel1.Controls.Add(Me.Button2)
|
||||
Me.Panel1.Controls.Add(Me.Button1)
|
||||
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(272, 42)
|
||||
Me.Panel1.Size = New System.Drawing.Size(271, 63)
|
||||
Me.Panel1.TabIndex = 1
|
||||
'
|
||||
'MyTextBox1
|
||||
'
|
||||
Me.MyTextBox1._DateTimeOnly = False
|
||||
Me.MyTextBox1._numbersOnly = False
|
||||
Me.MyTextBox1._numbersOnlyKommastellen = ""
|
||||
Me.MyTextBox1._Prozent = False
|
||||
Me.MyTextBox1._ShortDateNew = False
|
||||
Me.MyTextBox1._ShortDateOnly = False
|
||||
Me.MyTextBox1._TimeOnly = False
|
||||
Me.MyTextBox1._value = ""
|
||||
Me.MyTextBox1._Waehrung = False
|
||||
Me.MyTextBox1._WaehrungZeichen = True
|
||||
Me.MyTextBox1.ForeColor = System.Drawing.Color.Black
|
||||
Me.MyTextBox1.Location = New System.Drawing.Point(20, 40)
|
||||
Me.MyTextBox1.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.MyTextBox1.MaxLineLength = -1
|
||||
Me.MyTextBox1.MaxLines_Warning = ""
|
||||
Me.MyTextBox1.MaxLines_Warning_Label = Nothing
|
||||
Me.MyTextBox1.Name = "MyTextBox1"
|
||||
Me.MyTextBox1.Size = New System.Drawing.Size(250, 20)
|
||||
Me.MyTextBox1.TabIndex = 4
|
||||
'
|
||||
'PictureBox1
|
||||
'
|
||||
Me.PictureBox1.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.search
|
||||
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.PictureBox1.Location = New System.Drawing.Point(3, 40)
|
||||
Me.PictureBox1.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.PictureBox1.Name = "PictureBox1"
|
||||
Me.PictureBox1.Size = New System.Drawing.Size(13, 18)
|
||||
Me.PictureBox1.TabIndex = 5
|
||||
Me.PictureBox1.TabStop = False
|
||||
'
|
||||
'lbl
|
||||
'
|
||||
Me.lbl.AutoSize = True
|
||||
@@ -237,8 +275,8 @@ Partial Class frmMessenger
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.pnl)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(541, 728)
|
||||
Me.SplitContainer1.SplitterDistance = 464
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(542, 728)
|
||||
Me.SplitContainer1.SplitterDistance = 446
|
||||
Me.SplitContainer1.TabIndex = 0
|
||||
'
|
||||
'MyFlowLayoutPanel1
|
||||
@@ -252,14 +290,15 @@ Partial Class frmMessenger
|
||||
Me.MyFlowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyFlowLayoutPanel1.Location = New System.Drawing.Point(0, 44)
|
||||
Me.MyFlowLayoutPanel1.Name = "MyFlowLayoutPanel1"
|
||||
Me.MyFlowLayoutPanel1.Size = New System.Drawing.Size(541, 420)
|
||||
Me.MyFlowLayoutPanel1.Size = New System.Drawing.Size(542, 402)
|
||||
Me.MyFlowLayoutPanel1.TabIndex = 0
|
||||
'
|
||||
'UsrCntlMessenger_ChatElement1
|
||||
'
|
||||
Me.UsrCntlMessenger_ChatElement1.BackColor = System.Drawing.Color.White
|
||||
Me.UsrCntlMessenger_ChatElement1.CHAT_MSG = Nothing
|
||||
Me.UsrCntlMessenger_ChatElement1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.UsrCntlMessenger_ChatElement1.Location = New System.Drawing.Point(4, 5)
|
||||
Me.UsrCntlMessenger_ChatElement1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.UsrCntlMessenger_ChatElement1.Name = "UsrCntlMessenger_ChatElement1"
|
||||
Me.UsrCntlMessenger_ChatElement1.Size = New System.Drawing.Size(378, 48)
|
||||
Me.UsrCntlMessenger_ChatElement1.TabIndex = 4
|
||||
@@ -270,7 +309,8 @@ Partial Class frmMessenger
|
||||
Me.UsrCntlMessenger_ChatAnhang1.BackColor = System.Drawing.Color.White
|
||||
Me.UsrCntlMessenger_ChatAnhang1.BG_COLOR = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.UsrCntlMessenger_ChatAnhang1.CHAT_MSG = Nothing
|
||||
Me.UsrCntlMessenger_ChatAnhang1.Location = New System.Drawing.Point(3, 57)
|
||||
Me.UsrCntlMessenger_ChatAnhang1.Location = New System.Drawing.Point(4, 63)
|
||||
Me.UsrCntlMessenger_ChatAnhang1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.UsrCntlMessenger_ChatAnhang1.Name = "UsrCntlMessenger_ChatAnhang1"
|
||||
Me.UsrCntlMessenger_ChatAnhang1.Size = New System.Drawing.Size(378, 72)
|
||||
Me.UsrCntlMessenger_ChatAnhang1.TabIndex = 3
|
||||
@@ -279,7 +319,8 @@ Partial Class frmMessenger
|
||||
'
|
||||
Me.UsrCntlMessenger_ChatElement2.BackColor = System.Drawing.Color.White
|
||||
Me.UsrCntlMessenger_ChatElement2.CHAT_MSG = Nothing
|
||||
Me.UsrCntlMessenger_ChatElement2.Location = New System.Drawing.Point(3, 135)
|
||||
Me.UsrCntlMessenger_ChatElement2.Location = New System.Drawing.Point(4, 145)
|
||||
Me.UsrCntlMessenger_ChatElement2.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.UsrCntlMessenger_ChatElement2.Name = "UsrCntlMessenger_ChatElement2"
|
||||
Me.UsrCntlMessenger_ChatElement2.Size = New System.Drawing.Size(378, 48)
|
||||
Me.UsrCntlMessenger_ChatElement2.TabIndex = 5
|
||||
@@ -288,7 +329,8 @@ Partial Class frmMessenger
|
||||
'
|
||||
Me.UsrCntlMessenger_ChatElement3.BackColor = System.Drawing.Color.White
|
||||
Me.UsrCntlMessenger_ChatElement3.CHAT_MSG = Nothing
|
||||
Me.UsrCntlMessenger_ChatElement3.Location = New System.Drawing.Point(3, 189)
|
||||
Me.UsrCntlMessenger_ChatElement3.Location = New System.Drawing.Point(4, 203)
|
||||
Me.UsrCntlMessenger_ChatElement3.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.UsrCntlMessenger_ChatElement3.Name = "UsrCntlMessenger_ChatElement3"
|
||||
Me.UsrCntlMessenger_ChatElement3.Size = New System.Drawing.Size(378, 48)
|
||||
Me.UsrCntlMessenger_ChatElement3.TabIndex = 6
|
||||
@@ -303,7 +345,7 @@ Partial Class frmMessenger
|
||||
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Panel3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Panel3.Name = "Panel3"
|
||||
Me.Panel3.Size = New System.Drawing.Size(541, 44)
|
||||
Me.Panel3.Size = New System.Drawing.Size(542, 44)
|
||||
Me.Panel3.TabIndex = 9
|
||||
'
|
||||
'Button5
|
||||
@@ -314,7 +356,7 @@ Partial Class frmMessenger
|
||||
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(488, 4)
|
||||
Me.Button5.Location = New System.Drawing.Point(489, 4)
|
||||
Me.Button5.Name = "Button5"
|
||||
Me.Button5.Size = New System.Drawing.Size(49, 33)
|
||||
Me.Button5.TabIndex = 8
|
||||
@@ -327,7 +369,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(533, 1)
|
||||
Me.Panel4.Size = New System.Drawing.Size(534, 1)
|
||||
Me.Panel4.TabIndex = 6
|
||||
'
|
||||
'lblChatName
|
||||
@@ -346,7 +388,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(376, 4)
|
||||
Me.lblOnlineOffline.Location = New System.Drawing.Point(377, 4)
|
||||
Me.lblOnlineOffline.Name = "lblOnlineOffline"
|
||||
Me.lblOnlineOffline.Size = New System.Drawing.Size(106, 33)
|
||||
Me.lblOnlineOffline.TabIndex = 5
|
||||
@@ -365,14 +407,14 @@ Partial Class frmMessenger
|
||||
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(541, 260)
|
||||
Me.pnl.Size = New System.Drawing.Size(542, 278)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'pic
|
||||
'
|
||||
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(488, 93)
|
||||
Me.pic.Location = New System.Drawing.Point(489, 94)
|
||||
Me.pic.Name = "pic"
|
||||
Me.pic.Size = New System.Drawing.Size(49, 26)
|
||||
Me.pic.TabIndex = 7
|
||||
@@ -387,7 +429,7 @@ 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(533, 136)
|
||||
Me.FlowLayoutPanel.Size = New System.Drawing.Size(534, 136)
|
||||
Me.FlowLayoutPanel.TabIndex = 6
|
||||
'
|
||||
'Button3
|
||||
@@ -421,7 +463,7 @@ Partial Class frmMessenger
|
||||
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.Location = New System.Drawing.Point(3, 3)
|
||||
Me.rtbChatMessage.Name = "rtbChatMessage"
|
||||
Me.rtbChatMessage.Size = New System.Drawing.Size(452, 112)
|
||||
Me.rtbChatMessage.Size = New System.Drawing.Size(453, 112)
|
||||
Me.rtbChatMessage.TabIndex = 0
|
||||
Me.rtbChatMessage.Text = ""
|
||||
'
|
||||
@@ -435,6 +477,7 @@ Partial Class frmMessenger
|
||||
'
|
||||
'cntxt
|
||||
'
|
||||
Me.cntxt.ImageScalingSize = New System.Drawing.Size(24, 24)
|
||||
Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ChatDeaktivierenToolStripMenuItem})
|
||||
Me.cntxt.Name = "cntxt"
|
||||
Me.cntxt.Size = New System.Drawing.Size(167, 26)
|
||||
@@ -464,6 +507,7 @@ Partial Class frmMessenger
|
||||
Me.Panel2.PerformLayout()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@@ -508,4 +552,6 @@ Partial Class frmMessenger
|
||||
Friend WithEvents lblChatName As Label
|
||||
Friend WithEvents Panel4 As Panel
|
||||
Friend WithEvents Button5 As Button
|
||||
Friend WithEvents PictureBox1 As PictureBox
|
||||
Friend WithEvents MyTextBox1 As MyTextBox
|
||||
End Class
|
||||
|
||||
@@ -153,20 +153,29 @@ Public Class frmMessenger
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Sub intiDGVChats(Optional dgv_ChatID = -1, Optional reloadChat = True)
|
||||
Sub intiDGVChats(Optional dgv_ChatID = -1, Optional reloadChat = True, Optional selFirst = False)
|
||||
With dgvChats
|
||||
Dim loadedTmp = loaded
|
||||
If Not reloadChat Then
|
||||
loaded = False
|
||||
End If
|
||||
.DataSource = SQL.loadDgvBySql("SELECT [chat_id],CASE WHEN chat_name<>'' THEN chat_name ELSE (SELECT TOP 1 mit_vname + ' ' + mit_nname FROM tblMessenger_ChatMembers INNER JOIN tblMitarbeiter ON mit_id=chatMb_maId where chatMb_chatId=chat_id AND chatMb_maId <>" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & ") END as chat_name
|
||||
,(SELECT REPLACE(COUNT(*),'0','') FROM tblMessenger_ChatMessages INNER JOIN tblMessenger_ChatMessageStatus ON chatMgSt_chatMsgId=chatMg_id WHERE [chat_id]=chatMg_chatId AND chatMgSt_MaId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & " AND chatMgSt_gelesen=0) as ungelesen
|
||||
FROM [tblMessenger_Chat] WHERE (SELECT COUNT(*) FROM tblMessenger_ChatMembers WHERE chatMB_chatId=chat_id AND chatMB_maId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & ")>0
|
||||
AND chat_aktiv='" & (Not cbxInaktiveChats.Checked) & "' ORDER BY chat_lastMsg DESC", "ADMIN")
|
||||
|
||||
Dim whereName = ""
|
||||
If MyTextBox1.Text.Trim <> String.Empty Then
|
||||
whereName = " WHERE chat_name LIKE '%" & MyTextBox1.Text.Trim & "%' "
|
||||
End If
|
||||
|
||||
.DataSource = SQL.loadDgvBySql("SELECT * FROM(
|
||||
SELECT [chat_id],CASE WHEN chat_name<>'' THEN chat_name ELSE (SELECT TOP 1 mit_vname + ' ' + mit_nname FROM tblMessenger_ChatMembers INNER JOIN tblMitarbeiter ON mit_id=chatMb_maId where chatMb_chatId=chat_id AND chatMb_maId <>" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & ") END as chat_name
|
||||
,(SELECT REPLACE(COUNT(*),'0','') FROM tblMessenger_ChatMessages INNER JOIN tblMessenger_ChatMessageStatus ON chatMgSt_chatMsgId=chatMg_id WHERE [chat_id]=chatMg_chatId AND chatMgSt_MaId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & " AND chatMgSt_gelesen=0) as ungelesen ,chat_lastMsg
|
||||
FROM [tblMessenger_Chat] WHERE (SELECT COUNT(*) FROM tblMessenger_ChatMembers WHERE chatMB_chatId=chat_id AND chatMB_maId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & ")>0
|
||||
AND chat_aktiv='" & (Not cbxInaktiveChats.Checked) & "'
|
||||
) as T " & whereName & " ORDER BY chat_lastMsg DESC", "ADMIN")
|
||||
|
||||
If .Columns.Count = 0 Then Exit Sub
|
||||
|
||||
.Columns("chat_id").Visible = False
|
||||
.Columns("chat_lastMsg").Visible = False
|
||||
.Columns("chat_name").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.Columns("ungelesen").Width = 30
|
||||
.Columns("ungelesen").HeaderText = "neu"
|
||||
@@ -176,32 +185,46 @@ Public Class frmMessenger
|
||||
|
||||
dgvChats.GetOrder()
|
||||
|
||||
If Not reloadChat Then
|
||||
If selFirst Then
|
||||
dgvChats.ClearSelection()
|
||||
If dgv_ChatID > 0 Then
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
If r.Cells("chat_id").Value = dgv_ChatID Then
|
||||
dgvChats.ClearSelection()
|
||||
r.Selected = True : Exit For
|
||||
End If
|
||||
Next
|
||||
SplitContainer1.Enabled = False
|
||||
|
||||
If .Rows.Count > 0 Then
|
||||
loaded = True
|
||||
SplitContainer1.Enabled = True
|
||||
.Rows(0).Selected = True
|
||||
End If
|
||||
loaded = loadedTmp
|
||||
Else
|
||||
|
||||
dgvChats.ClearSelection()
|
||||
SplitContainer1.Enabled = False
|
||||
|
||||
If dgv_ChatID > 0 Then
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
If r.Cells("chat_id").Value = dgv_ChatID Then
|
||||
dgvChats.ClearSelection()
|
||||
SplitContainer1.Enabled = True
|
||||
r.Selected = True : Exit For
|
||||
End If
|
||||
Next
|
||||
If Not reloadChat Then
|
||||
dgvChats.ClearSelection()
|
||||
If dgv_ChatID > 0 Then
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
If r.Cells("chat_id").Value = dgv_ChatID Then
|
||||
dgvChats.ClearSelection()
|
||||
r.Selected = True : Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
loaded = loadedTmp
|
||||
Else
|
||||
|
||||
dgvChats.ClearSelection()
|
||||
SplitContainer1.Enabled = False
|
||||
|
||||
If dgv_ChatID > 0 Then
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
If r.Cells("chat_id").Value = dgv_ChatID Then
|
||||
dgvChats.ClearSelection()
|
||||
SplitContainer1.Enabled = True
|
||||
r.Selected = True : Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
dgvChats.SetOrder()
|
||||
If dgvChats.SelectedRows.Count > 0 Then dgvChats.FirstDisplayedCell = dgvChats.SelectedRows(0).Cells("chat_name")
|
||||
@@ -218,8 +241,9 @@ Public Class frmMessenger
|
||||
' Next
|
||||
'End If
|
||||
|
||||
|
||||
End With
|
||||
rtbChatMessage.Focus()
|
||||
If Not selFirst Then rtbChatMessage.Focus()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -527,7 +551,7 @@ Public Class frmMessenger
|
||||
Try
|
||||
|
||||
Dim Dt_New As DataTable = SQL.loadDgvBySql("SELECT [chat_id],CASE WHEN chat_name<>'' THEN chat_name ELSE (SELECT TOP 1 mit_vname + ' ' + mit_nname FROM tblMessenger_ChatMembers INNER JOIN tblMitarbeiter ON mit_id=chatMb_maId where chatMb_chatId=chat_id AND chatMb_maId <>" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & ") END as chat_name
|
||||
,(SELECT REPLACE(COUNT(*),'0','') FROM tblMessenger_ChatMessages INNER JOIN tblMessenger_ChatMessageStatus ON chatMgSt_chatMsgId=chatMg_id WHERE [chat_id]=chatMg_chatId AND chatMgSt_MaId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & " AND chatMgSt_gelesen=0) as ungelesen
|
||||
,(SELECT REPLACE(COUNT(*),'0','') FROM tblMessenger_ChatMessages INNER JOIN tblMessenger_ChatMessageStatus ON chatMgSt_chatMsgId=chatMg_id WHERE [chat_id]=chatMg_chatId AND chatMgSt_MaId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & " AND chatMgSt_gelesen=0) as ungelesen
|
||||
FROM [tblMessenger_Chat] WHERE (SELECT COUNT(*) FROM tblMessenger_ChatMembers WHERE chatMB_chatId=chat_id AND chatMB_maId=" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & ")>0
|
||||
AND chat_aktiv='" & (Not cbxInaktiveChats.Checked) & "' ORDER BY chat_lastMsg DESC", "ADMIN")
|
||||
Dim Dt_Current As DataTable = dgvChats.DataSource
|
||||
@@ -809,6 +833,23 @@ Public Class frmMessenger
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox1_TextChanged(sender As Object, e As EventArgs) Handles MyTextBox1.Leave
|
||||
intiDGVChats(, False, True)
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles MyTextBox1.KeyUp
|
||||
If e.KeyCode = Keys.Return Or MyTextBox1.Text = "" Then
|
||||
intiDGVChats(, False, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
|
||||
MyTextBox1.Text = ""
|
||||
intiDGVChats(, False, True)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'Private Sub rtbChatMessage_TextChanged(sender As Object, e As EventArgs) Handles rtbChatMessage.TextChanged
|
||||
' FlowLayoutPanel.Enabled = (rtbChatMessage.Text = "")
|
||||
'End Sub
|
||||
|
||||
Reference in New Issue
Block a user