diff --git a/ChatTest/ChatTest.vbproj b/ChatTest/ChatTest.vbproj index 44fd2d82..87e2a246 100644 --- a/ChatTest/ChatTest.vbproj +++ b/ChatTest/ChatTest.vbproj @@ -48,6 +48,18 @@ On + + + + + + + ..\Controls.ChatNewConv\obj\Debug\DigitalData.Controls.ChatNewConv.dll + + + False + ..\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll + ..\packages\NLog.4.7.2\lib\net45\NLog.dll diff --git a/ChatTest/Form1.Designer.vb b/ChatTest/Form1.Designer.vb index 20415f86..93ba99c3 100644 --- a/ChatTest/Form1.Designer.vb +++ b/ChatTest/Form1.Designer.vb @@ -22,28 +22,39 @@ Partial Class Form1 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() + Me.ChatNewConv1 = New DigitalData.Controls.ChatNewConv.ChatNewConv() Me.ChatControl1 = New DigitalData.Controls.ChatControl.ChatControl() Me.SuspendLayout() ' + 'ChatNewConv1 + ' + Me.ChatNewConv1.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ChatNewConv1.Location = New System.Drawing.Point(479, 51) + Me.ChatNewConv1.Name = "ChatNewConv1" + Me.ChatNewConv1.Size = New System.Drawing.Size(497, 450) + Me.ChatNewConv1.TabIndex = 1 + ' 'ChatControl1 ' - Me.ChatControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.ChatControl1.Location = New System.Drawing.Point(0, 0) + Me.ChatControl1.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.ChatControl1.Location = New System.Drawing.Point(12, 12) + Me.ChatControl1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.ChatControl1.Name = "ChatControl1" - Me.ChatControl1.Size = New System.Drawing.Size(397, 384) - Me.ChatControl1.TabIndex = 0 + Me.ChatControl1.Size = New System.Drawing.Size(422, 587) + Me.ChatControl1.TabIndex = 2 ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(397, 384) + Me.ClientSize = New System.Drawing.Size(1044, 584) Me.Controls.Add(Me.ChatControl1) + Me.Controls.Add(Me.ChatNewConv1) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub - + Friend WithEvents ChatNewConv1 As DigitalData.Controls.ChatNewConv.ChatNewConv Friend WithEvents ChatControl1 As DigitalData.Controls.ChatControl.ChatControl End Class diff --git a/ChatTest/Form1.vb b/ChatTest/Form1.vb index 75c486cb..e75dbb85 100644 --- a/ChatTest/Form1.vb +++ b/ChatTest/Form1.vb @@ -1,11 +1,23 @@ Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.Database Public Class Form1 + Private _Database As MSSQLServer Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath) Dim oConnectionString = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=IDB_TEST;User Id=sa;Password=dd;" + Me._Database = New MSSQLServer(oLogConfig, oConnectionString) + ChatControl1.Init(oLogConfig, oConnectionString, "Email", "JenneJ") + ChatControl1.GetConversations(10070) + Dim oSQL = "SELECT GUID as UserID,NAME,USERNAME,EMAIL from TBDD_USER" + Dim oDTUSERS As DataTable = _Database.GetDatatable(oSQL) + + ChatNewConv1.Init(oLogConfig, oConnectionString, 10070, "SchreiberM", "de-DE", oDTUSERS, Nothing) + AddHandler ChatNewConv1.Conversation_Created, AddressOf onConversationCreated - ChatControl1.Init(oLogConfig, oConnectionString, "JenneJ") - ChatControl1.LoadConversations(10070) End Sub + Sub onConversationCreated() + MsgBox("Created") + End Sub + End Class diff --git a/Controls.ChatControl/ChatControl.Designer.vb b/Controls.ChatControl/ChatControl.Designer.vb index 076018dd..eb6ecb02 100644 --- a/Controls.ChatControl/ChatControl.Designer.vb +++ b/Controls.ChatControl/ChatControl.Designer.vb @@ -23,77 +23,73 @@ Partial Class ChatControl _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim ItemTemplate3 As DevExpress.XtraGrid.Views.Tile.ItemTemplate = New DevExpress.XtraGrid.Views.Tile.ItemTemplate() - Dim TableColumnDefinition7 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() - Dim TableColumnDefinition8 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() - Dim TileViewItemElement7 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TileViewItemElement8 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TileViewItemElement9 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TableRowDefinition7 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim TableRowDefinition8 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim ItemTemplate4 As DevExpress.XtraGrid.Views.Tile.ItemTemplate = New DevExpress.XtraGrid.Views.Tile.ItemTemplate() - Dim TableColumnDefinition9 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() - Dim TableColumnDefinition10 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() - Dim TileViewItemElement10 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TileViewItemElement11 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TileViewItemElement12 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() - Dim TableRowDefinition9 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim TableRowDefinition10 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim TableColumnDefinition11 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() - Dim TableColumnDefinition12 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() - Dim TableRowDefinition11 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim TableRowDefinition12 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() - Dim EditorButtonImageOptions2 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions() - Dim SerializableAppearanceObject5 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject6 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject7 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() - Dim SerializableAppearanceObject8 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject() + Dim ItemTemplate1 As DevExpress.XtraGrid.Views.Tile.ItemTemplate = New DevExpress.XtraGrid.Views.Tile.ItemTemplate() + Dim TableColumnDefinition1 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TableColumnDefinition2 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TileViewItemElement1 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TileViewItemElement2 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TileViewItemElement3 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TableRowDefinition1 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() + Dim TableRowDefinition2 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() + Dim ItemTemplate2 As DevExpress.XtraGrid.Views.Tile.ItemTemplate = New DevExpress.XtraGrid.Views.Tile.ItemTemplate() + Dim TableColumnDefinition3 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TableColumnDefinition4 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TileViewItemElement4 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TileViewItemElement5 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TileViewItemElement6 As DevExpress.XtraGrid.Views.Tile.TileViewItemElement = New DevExpress.XtraGrid.Views.Tile.TileViewItemElement() + Dim TableRowDefinition3 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() + Dim TableRowDefinition4 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() + Dim TableColumnDefinition5 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TableColumnDefinition6 As DevExpress.XtraEditors.TableLayout.TableColumnDefinition = New DevExpress.XtraEditors.TableLayout.TableColumnDefinition() + Dim TableRowDefinition5 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() + Dim TableRowDefinition6 As DevExpress.XtraEditors.TableLayout.TableRowDefinition = New DevExpress.XtraEditors.TableLayout.TableRowDefinition() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ChatControl)) Me.columnUsername = New DevExpress.XtraGrid.Columns.TileViewColumn() Me.columnMessage = New DevExpress.XtraGrid.Columns.TileViewColumn() Me.columnDate = New DevExpress.XtraGrid.Columns.TileViewColumn() Me.RepositoryItemHypertextLabel1 = New DevExpress.XtraEditors.Repository.RepositoryItemHypertextLabel() Me.RepositoryItemHyperLinkEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemHyperLinkEdit() - Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl() Me.GridChat = New DevExpress.XtraGrid.GridControl() Me.ChatView = New DevExpress.XtraGrid.Views.Tile.TileView() - Me.lookupConversations = New DigitalData.Controls.LookupGrid.LookupControl2() - Me.LookupControl21View = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.txtMessage = New DevExpress.XtraEditors.MemoEdit() Me.btnSendMessage = New DevExpress.XtraEditors.SimpleButton() Me.ChatSource = New System.Windows.Forms.BindingSource(Me.components) + Me.Panel1 = New System.Windows.Forms.Panel() + Me.txtMessage = New System.Windows.Forms.TextBox() + Me.lblTitle = New System.Windows.Forms.Label() CType(Me.RepositoryItemHypertextLabel1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemHyperLinkEdit1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainerControl1.SuspendLayout() CType(Me.GridChat, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ChatView, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.lookupConversations.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LookupControl21View, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.txtMessage.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ChatSource, System.ComponentModel.ISupportInitialize).BeginInit() + Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'columnUsername ' Me.columnUsername.FieldName = "USER_FROM" + Me.columnUsername.MinWidth = 23 Me.columnUsername.Name = "columnUsername" Me.columnUsername.Visible = True Me.columnUsername.VisibleIndex = 1 + Me.columnUsername.Width = 87 ' 'columnMessage ' Me.columnMessage.FieldName = "MESSAGE_TEXT" + Me.columnMessage.MinWidth = 23 Me.columnMessage.Name = "columnMessage" Me.columnMessage.Visible = True Me.columnMessage.VisibleIndex = 0 + Me.columnMessage.Width = 87 ' 'columnDate ' Me.columnDate.FieldName = "ADDED_WHEN" + Me.columnDate.MinWidth = 23 Me.columnDate.Name = "columnDate" Me.columnDate.Visible = True Me.columnDate.VisibleIndex = 2 + Me.columnDate.Width = 87 ' 'RepositoryItemHypertextLabel1 ' @@ -104,33 +100,21 @@ Partial Class ChatControl Me.RepositoryItemHyperLinkEdit1.AutoHeight = False Me.RepositoryItemHyperLinkEdit1.Name = "RepositoryItemHyperLinkEdit1" ' - 'SplitContainerControl1 - ' - Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerControl1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2 - Me.SplitContainerControl1.Horizontal = False - Me.SplitContainerControl1.IsSplitterFixed = True - Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 0) - Me.SplitContainerControl1.Name = "SplitContainerControl1" - Me.SplitContainerControl1.Panel1.Controls.Add(Me.GridChat) - Me.SplitContainerControl1.Panel1.Controls.Add(Me.lookupConversations) - Me.SplitContainerControl1.Panel1.Text = "Panel1" - Me.SplitContainerControl1.Panel2.Controls.Add(Me.txtMessage) - Me.SplitContainerControl1.Panel2.Controls.Add(Me.btnSendMessage) - Me.SplitContainerControl1.Panel2.Text = "Panel2" - Me.SplitContainerControl1.Size = New System.Drawing.Size(317, 314) - Me.SplitContainerControl1.SplitterPosition = 50 - Me.SplitContainerControl1.TabIndex = 0 - ' 'GridChat ' - Me.GridChat.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridChat.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.GridChat.BackgroundImage = Global.DigitalData.Controls.ChatControl.My.Resources.Resources.crop_php + Me.GridChat.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center + Me.GridChat.EmbeddedNavigator.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.GridChat.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.GridChat.Location = New System.Drawing.Point(0, 20) + Me.GridChat.Location = New System.Drawing.Point(0, 30) Me.GridChat.MainView = Me.ChatView + Me.GridChat.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.GridChat.Name = "GridChat" Me.GridChat.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemHyperLinkEdit1, Me.RepositoryItemHypertextLabel1}) - Me.GridChat.Size = New System.Drawing.Size(317, 234) + Me.GridChat.Size = New System.Drawing.Size(420, 454) Me.GridChat.TabIndex = 0 Me.GridChat.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.ChatView}) ' @@ -139,6 +123,7 @@ Partial Class ChatControl Me.ChatView.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.columnMessage, Me.columnUsername, Me.columnDate}) Me.ChatView.ContextButtonOptions.HoverStateOpacity = 0.75! Me.ChatView.ContextButtonOptions.TopPanelColor = System.Drawing.Color.White + Me.ChatView.DetailHeight = 431 Me.ChatView.GridControl = Me.GridChat Me.ChatView.Name = "ChatView" Me.ChatView.OptionsTiles.ColumnCount = 1 @@ -152,154 +137,163 @@ Partial Class ChatControl Me.ChatView.OptionsTiles.Padding = New System.Windows.Forms.Padding(5) Me.ChatView.OptionsTiles.RowCount = 0 Me.ChatView.OptionsTiles.ScrollMode = DevExpress.XtraEditors.TileControlScrollMode.ScrollBar - TableColumnDefinition7.Length.Value = 250.0R - TableColumnDefinition8.Length.Value = 100.0R - ItemTemplate3.Columns.Add(TableColumnDefinition7) - ItemTemplate3.Columns.Add(TableColumnDefinition8) - TileViewItemElement7.Column = Me.columnUsername - TileViewItemElement7.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement7.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside - TileViewItemElement7.Text = "columnUsername" - TileViewItemElement7.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft - TileViewItemElement7.TextLocation = New System.Drawing.Point(10, 0) - TileViewItemElement8.Column = Me.columnMessage - TileViewItemElement8.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement8.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside - TileViewItemElement8.RowIndex = 1 - TileViewItemElement8.Text = "columnMessage" - TileViewItemElement8.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft - TileViewItemElement8.TextLocation = New System.Drawing.Point(10, 0) - TileViewItemElement9.Column = Me.columnDate - TileViewItemElement9.ColumnIndex = 1 - TileViewItemElement9.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement9.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside - TileViewItemElement9.Text = "columnDate" - TileViewItemElement9.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleRight - TileViewItemElement9.TextLocation = New System.Drawing.Point(-10, 0) - ItemTemplate3.Elements.Add(TileViewItemElement7) - ItemTemplate3.Elements.Add(TileViewItemElement8) - ItemTemplate3.Elements.Add(TileViewItemElement9) - ItemTemplate3.Name = "ChatLeft" - TableRowDefinition7.Length.Value = 24.0R - TableRowDefinition8.Length.Value = 24.0R - ItemTemplate3.Rows.Add(TableRowDefinition7) - ItemTemplate3.Rows.Add(TableRowDefinition8) - TableColumnDefinition9.Length.Value = 100.0R - TableColumnDefinition10.Length.Value = 250.0R - ItemTemplate4.Columns.Add(TableColumnDefinition9) - ItemTemplate4.Columns.Add(TableColumnDefinition10) - TileViewItemElement10.Column = Me.columnUsername - TileViewItemElement10.ColumnIndex = 1 - TileViewItemElement10.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement10.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside - TileViewItemElement10.Text = "columnUsername" - TileViewItemElement10.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleRight - TileViewItemElement10.TextLocation = New System.Drawing.Point(-10, 0) - TileViewItemElement11.Column = Me.columnMessage - TileViewItemElement11.ColumnIndex = 1 - TileViewItemElement11.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement11.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside - TileViewItemElement11.RowIndex = 1 - TileViewItemElement11.Text = "columnMessage" - TileViewItemElement11.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleRight - TileViewItemElement11.TextLocation = New System.Drawing.Point(-10, 0) - TileViewItemElement12.Column = Me.columnDate - TileViewItemElement12.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter - TileViewItemElement12.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside - TileViewItemElement12.Text = "columnDate" - TileViewItemElement12.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft - TileViewItemElement12.TextLocation = New System.Drawing.Point(10, 0) - ItemTemplate4.Elements.Add(TileViewItemElement10) - ItemTemplate4.Elements.Add(TileViewItemElement11) - ItemTemplate4.Elements.Add(TileViewItemElement12) - ItemTemplate4.Name = "ChatRight" - TableRowDefinition9.Length.Value = 24.0R - TableRowDefinition10.Length.Value = 24.0R - ItemTemplate4.Rows.Add(TableRowDefinition9) - ItemTemplate4.Rows.Add(TableRowDefinition10) - Me.ChatView.Templates.Add(ItemTemplate3) - Me.ChatView.Templates.Add(ItemTemplate4) - Me.ChatView.TileColumns.Add(TableColumnDefinition11) - Me.ChatView.TileColumns.Add(TableColumnDefinition12) - Me.ChatView.TileRows.Add(TableRowDefinition11) - Me.ChatView.TileRows.Add(TableRowDefinition12) - ' - 'lookupConversations - ' - Me.lookupConversations.AllowAddNewValues = False - Me.lookupConversations.DataSource = Nothing - Me.lookupConversations.Dock = System.Windows.Forms.DockStyle.Top - Me.lookupConversations.Location = New System.Drawing.Point(0, 0) - Me.lookupConversations.MultiSelect = False - Me.lookupConversations.Name = "lookupConversations" - Me.lookupConversations.PreventDuplicates = False - Me.lookupConversations.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions2, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject5, SerializableAppearanceObject6, SerializableAppearanceObject7, SerializableAppearanceObject8, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])}) - Me.lookupConversations.Properties.NullText = "" - Me.lookupConversations.Properties.PopupView = Me.LookupControl21View - Me.lookupConversations.SelectedValues = CType(resources.GetObject("lookupConversations.SelectedValues"), System.Collections.Generic.List(Of String)) - Me.lookupConversations.Size = New System.Drawing.Size(317, 20) - Me.lookupConversations.TabIndex = 1 - ' - 'LookupControl21View - ' - Me.LookupControl21View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.LookupControl21View.Name = "LookupControl21View" - Me.LookupControl21View.OptionsSelection.EnableAppearanceFocusedCell = False - Me.LookupControl21View.OptionsView.ShowGroupPanel = False - ' - 'txtMessage - ' - Me.txtMessage.Dock = System.Windows.Forms.DockStyle.Fill - Me.txtMessage.Location = New System.Drawing.Point(0, 0) - Me.txtMessage.Name = "txtMessage" - Me.txtMessage.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.txtMessage.Properties.Appearance.Options.UseFont = True - Me.txtMessage.Size = New System.Drawing.Size(275, 50) - Me.txtMessage.TabIndex = 1 + TableColumnDefinition1.Length.Value = 250.0R + TableColumnDefinition2.Length.Value = 100.0R + ItemTemplate1.Columns.Add(TableColumnDefinition1) + ItemTemplate1.Columns.Add(TableColumnDefinition2) + TileViewItemElement1.Column = Me.columnUsername + TileViewItemElement1.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement1.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside + TileViewItemElement1.Text = "columnUsername" + TileViewItemElement1.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft + TileViewItemElement1.TextLocation = New System.Drawing.Point(10, 0) + TileViewItemElement2.Column = Me.columnMessage + TileViewItemElement2.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement2.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside + TileViewItemElement2.RowIndex = 1 + TileViewItemElement2.Text = "columnMessage" + TileViewItemElement2.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft + TileViewItemElement2.TextLocation = New System.Drawing.Point(10, 0) + TileViewItemElement3.Column = Me.columnDate + TileViewItemElement3.ColumnIndex = 1 + TileViewItemElement3.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement3.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside + TileViewItemElement3.Text = "columnDate" + TileViewItemElement3.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleRight + TileViewItemElement3.TextLocation = New System.Drawing.Point(-10, 0) + ItemTemplate1.Elements.Add(TileViewItemElement1) + ItemTemplate1.Elements.Add(TileViewItemElement2) + ItemTemplate1.Elements.Add(TileViewItemElement3) + ItemTemplate1.Name = "ChatLeft" + TableRowDefinition1.Length.Value = 24.0R + TableRowDefinition2.Length.Value = 24.0R + ItemTemplate1.Rows.Add(TableRowDefinition1) + ItemTemplate1.Rows.Add(TableRowDefinition2) + TableColumnDefinition3.Length.Value = 100.0R + TableColumnDefinition4.Length.Value = 250.0R + ItemTemplate2.Columns.Add(TableColumnDefinition3) + ItemTemplate2.Columns.Add(TableColumnDefinition4) + TileViewItemElement4.Column = Me.columnUsername + TileViewItemElement4.ColumnIndex = 1 + TileViewItemElement4.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement4.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside + TileViewItemElement4.Text = "columnUsername" + TileViewItemElement4.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleRight + TileViewItemElement4.TextLocation = New System.Drawing.Point(-10, 0) + TileViewItemElement5.Column = Me.columnMessage + TileViewItemElement5.ColumnIndex = 1 + TileViewItemElement5.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement5.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside + TileViewItemElement5.RowIndex = 1 + TileViewItemElement5.Text = "columnMessage" + TileViewItemElement5.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleRight + TileViewItemElement5.TextLocation = New System.Drawing.Point(-10, 0) + TileViewItemElement6.Column = Me.columnDate + TileViewItemElement6.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter + TileViewItemElement6.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside + TileViewItemElement6.Text = "columnDate" + TileViewItemElement6.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft + TileViewItemElement6.TextLocation = New System.Drawing.Point(10, 0) + ItemTemplate2.Elements.Add(TileViewItemElement4) + ItemTemplate2.Elements.Add(TileViewItemElement5) + ItemTemplate2.Elements.Add(TileViewItemElement6) + ItemTemplate2.Name = "ChatRight" + TableRowDefinition3.Length.Value = 24.0R + TableRowDefinition4.Length.Value = 24.0R + ItemTemplate2.Rows.Add(TableRowDefinition3) + ItemTemplate2.Rows.Add(TableRowDefinition4) + Me.ChatView.Templates.Add(ItemTemplate1) + Me.ChatView.Templates.Add(ItemTemplate2) + Me.ChatView.TileColumns.Add(TableColumnDefinition5) + Me.ChatView.TileColumns.Add(TableColumnDefinition6) + Me.ChatView.TileRows.Add(TableRowDefinition5) + Me.ChatView.TileRows.Add(TableRowDefinition6) ' 'btnSendMessage ' Me.btnSendMessage.Dock = System.Windows.Forms.DockStyle.Right + Me.btnSendMessage.ImageOptions.Image = CType(resources.GetObject("btnSendMessage.ImageOptions.Image"), System.Drawing.Image) Me.btnSendMessage.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.MiddleCenter - Me.btnSendMessage.ImageOptions.SvgImage = CType(resources.GetObject("btnSendMessage.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) - Me.btnSendMessage.Location = New System.Drawing.Point(275, 0) + Me.btnSendMessage.Location = New System.Drawing.Point(373, 0) + Me.btnSendMessage.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.btnSendMessage.Name = "btnSendMessage" Me.btnSendMessage.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light - Me.btnSendMessage.Size = New System.Drawing.Size(42, 50) + Me.btnSendMessage.Size = New System.Drawing.Size(49, 102) Me.btnSendMessage.TabIndex = 2 + Me.btnSendMessage.ToolTip = "Add message" + ' + 'Panel1 + ' + Me.Panel1.BackColor = System.Drawing.SystemColors.GradientActiveCaption + Me.Panel1.Controls.Add(Me.txtMessage) + Me.Panel1.Controls.Add(Me.btnSendMessage) + Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom + Me.Panel1.Location = New System.Drawing.Point(0, 485) + Me.Panel1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(422, 102) + Me.Panel1.TabIndex = 3 + ' + 'txtMessage + ' + Me.txtMessage.AcceptsReturn = True + Me.txtMessage.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.txtMessage.BackColor = System.Drawing.Color.GhostWhite + Me.txtMessage.BorderStyle = System.Windows.Forms.BorderStyle.None + Me.txtMessage.Font = New System.Drawing.Font("Calibri", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtMessage.ForeColor = System.Drawing.SystemColors.InfoText + Me.txtMessage.Location = New System.Drawing.Point(17, 15) + Me.txtMessage.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) + Me.txtMessage.Multiline = True + Me.txtMessage.Name = "txtMessage" + Me.txtMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical + Me.txtMessage.Size = New System.Drawing.Size(349, 70) + Me.txtMessage.TabIndex = 3 + ' + 'lblTitle + ' + Me.lblTitle.AutoSize = True + Me.lblTitle.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblTitle.Location = New System.Drawing.Point(3, 10) + Me.lblTitle.Name = "lblTitle" + Me.lblTitle.Size = New System.Drawing.Size(50, 16) + Me.lblTitle.TabIndex = 4 + Me.lblTitle.Text = "Label1" ' 'ChatControl ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.SplitContainerControl1) + Me.Controls.Add(Me.lblTitle) + Me.Controls.Add(Me.GridChat) + Me.Controls.Add(Me.Panel1) + Me.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.Name = "ChatControl" - Me.Size = New System.Drawing.Size(317, 314) + Me.Size = New System.Drawing.Size(422, 587) CType(Me.RepositoryItemHypertextLabel1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemHyperLinkEdit1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainerControl1.ResumeLayout(False) CType(Me.GridChat, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.ChatView, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.lookupConversations.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LookupControl21View, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.txtMessage.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.ChatSource, System.ComponentModel.ISupportInitialize).EndInit() + Me.Panel1.ResumeLayout(False) + Me.Panel1.PerformLayout() Me.ResumeLayout(False) + Me.PerformLayout() End Sub - - Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents GridChat As DevExpress.XtraGrid.GridControl Friend WithEvents ChatView As DevExpress.XtraGrid.Views.Tile.TileView - Friend WithEvents txtMessage As DevExpress.XtraEditors.MemoEdit Friend WithEvents columnMessage As DevExpress.XtraGrid.Columns.TileViewColumn Friend WithEvents columnUsername As DevExpress.XtraGrid.Columns.TileViewColumn Friend WithEvents columnDate As DevExpress.XtraGrid.Columns.TileViewColumn Friend WithEvents ChatSource As BindingSource - Friend WithEvents lookupConversations As LookupGrid.LookupControl2 - Friend WithEvents LookupControl21View As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents btnSendMessage As DevExpress.XtraEditors.SimpleButton Friend WithEvents RepositoryItemHyperLinkEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemHyperLinkEdit Friend WithEvents RepositoryItemHypertextLabel1 As DevExpress.XtraEditors.Repository.RepositoryItemHypertextLabel + Friend WithEvents txtMessage As TextBox + Friend WithEvents Panel1 As Panel + Friend WithEvents lblTitle As Label End Class diff --git a/Controls.ChatControl/ChatControl.resx b/Controls.ChatControl/ChatControl.resx index 9a8cb1e0..7b631f33 100644 --- a/Controls.ChatControl/ChatControl.resx +++ b/Controls.ChatControl/ChatControl.resx @@ -117,29 +117,42 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + - AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u - PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB - AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0 - ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs= - - - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALcBAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTmV4dCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIg - MzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9zdHls - ZT4NCiAgPHBhdGggZD0iTTguOSw0LjFDOC40LDMuOCw4LDQuMSw4LDQuNnYyMC43YzAsMC42LDAuNCww - LjgsMC45LDAuNWwxNi44LTEwLjNjMC41LTAuMywwLjUtMC44LDAtMS4xTDguOSw0LjF6IiBjbGFzcz0i - Qmx1ZSIgLz4NCjwvc3ZnPgs= + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACp0RVh0VGl0 + bGUARm9vdGVyO0FkZCBHcm91cCBGb290ZXI7Rm9vdGVyO0dyb3VwlRubyQAABwtJREFUWEetl3lQ1GUY + x38ddpl2Oh1/mV2THTOVZU79o+bYMdNtpplTjZV55VGGoKQisiDHLnKJIIggCOJRKl4pAiLHgiiQTXdc + oYAIArtcfXue5/29u0uxw9S0M5/5Pu8yvN/v876/991dg15XEFcSVxFXD8Gw/wDPy/PLC8AA+HXVliz7 + 8eTscgzKTqaM6jIkkSbRWKlJltItGhoLUtuRkFFynDw4PDc6aICr2ai//8//iX70mTVrQqadXa4hvAYY + xmn5H3r7+gentx89jDmW2hwPrPtMVN1HYTZnlLLLtYRsw2ABrkmkpfIagCbTtZgw2tQ06zaNWaXuUcoB + 4tOL2eU6wnsAXiZeLm3Gk7q69oT+pk0UNDbNunvMmnCa8FxxaUMHuHZzRokE0Mu4aYd9IBl/I92OONI4 + Wt7YdI1ddENCARzdva4AMamn2OV6wmuA6zZtVwFcnejOpFYd6q48cfT0EqayKcHKdHVTAJonKqWQXW4g + vAfgZeK02ihme6lJibtOo5qI9iS1BFFEdGoxqcISdwJdTg7QK9sWmVygA/B9MGiA63mZOICTOnF3R0pd + OP4GT6yg2jRiOllp3KlxqADWpHx2GU54D8DLxAHU8vUhalsxNgpFSlNYixCZUkwUwUZEbmVOUU1QbeOa + CIzJJfMedBC8ohEJeUMGuIGXidPK3jn7pAPpzLMjgSdW3YnSe2zEtWhXDy5rJZwUIDT+BLvcSHgNMJyX + iQNoEyt1Yk0+hQjCmlxIy1iIiCQaa7bwuBDhDNWasMSTWBN5TMzbCV7NkLjj7DKC8B6Al4mPn+rG3RF3 + I5id6bq9q9vEHHcqwzaXdqOto1sCWGK+HTLAjaHxubJf2pQ7CU0sQGgCKZ1rVRfIGRc2M/kK11i95289 + jEtkfolC8Haujz7KLiMJ/kAaNMAIXiZ+6vXSadqoS+mKYJXOTNiAkZoNiVaXOqXmZyhg4xF2uYnwHsAS + e0wCtNNkTEh8PoLj81wavImUkZqIY/JhoTqIsNCY4dov7BAuXnYKHfQ8rbUdYpebCa8BRq6POirnWi+d + 6sjp1svUFU2o4ck96wG0O9T+U0N8u/5a2zJkgJsCIo/IfmnDILrNgmIV60VzRYUYhsYmfO4D6T2luVgR + kiNXeMK+RfCNf87FfMu4Y/OCnzQ+tYwzfGKfFVwB1loPyRFspU65C3kGzL3/J/q50M+D+9ngBrh7PtIr + 4p5FdWMcKhtjUdkQjblBT+JMvc2oqLca5fXhxhdRE1wBbv4qPEfOf0u7k3B4qAPNVDe3EaRNbTSmWqkD + TZdMuCYuUM1wgOXRE5D742Kk2acKnwQ+gfK6MKOsNsSw1wQbSyPdAW5ZFZojR1BMaaLw3dUI212F0OxK + bCBCMs/CknkGQRkVWJdegYC001izrRyrU8rgn2JH9N5qFJ+7gF8a2vFzQxsd6X4s2zgBR39YiNTSqcJH + AY+jpCbIKK4JNIp+CzAWW8e7A/iF7JcjqLsKzjqLA9+3Yj9zrhXfMN+1YG+1Yjexq4qobMHOymbUtXUj + MmseltqewRLbeCyxKg5/Pw+pJVOwjfgs/GksCjMJfYp4+lsd4Fbf4H2yv3oJ120/TUYXEX2yQYgqIPIb + sDG/HpFMXj1shPUEU4faVicWR4xHWe0G2GtDUFoTjJLfg5Bz7mNsK56CFGJ/1YfI/2Ul8n72xYmffPC+ + /2PkrwLc5rP+a3mYzrc6cP5SF1Yl25FNnYkhGWlDW16dGEbkKsKZ47WooQALw57CwXNzxYzZKjyPlKLn + RZNZCVZmtt+j7gDLA/fIU9zY2iV8GV+E9NNN2F5+AWlEahlhP48UpvQ8thLJpY1IKm5EItFAWzA/ZBwO + VM8Rk61Fk02zyUg+RbASSVQrJmGWR4DbPw/YI0eosbUTjRc7sciWhw+CjmL2uiOYHXAYs9YcxMzVBzHD + PwfvrDyAaX778JbvPryx/Gu8Tpw8U481m+Zg+rKH8PbSBzGNmO33mBgpJmOW76N4bcEDxP14lXhl/n05 + OsCopWt3yR3wx8UuRUsnGgbQJVrfrMb1Zq25QNvGn3z62xQzy/cRZFfMwJbCScREvOvzCLtd8U3VHGPv + 2Q+Nl+fe6zoFo5aszpYLyNOUTRpaOpQZw2Y89jCua+Zxh2idjImmTgnAhpll05B4cqIw48uHJcCeiveM + XWfeM176eIwrwG2f+Wej5TLdARSihS4agS8jvoDoaPLdoC+bJvMiUpcQ1aLm3/gUkfJFNJMMM+xvIoHM + mXeWj5UAWeUzjKzy6cb0z8e6Aoz81Cc1d9GqnWAWrsoawIKVmViglfHLxHytwg6lvqYS5VW1WGaZiRc/ + GkPcgxfmCAc5wNQPRhtT3h9tTF/mDsC/2/gLwyjiDuJOL9z1L7jbVJ6PPwm9/DaE8RdajUyGSTHyEAAA + AABJRU5ErkJggg== diff --git a/Controls.ChatControl/ChatControl.vb b/Controls.ChatControl/ChatControl.vb index 86c29b3d..d140ef7b 100644 --- a/Controls.ChatControl/ChatControl.vb +++ b/Controls.ChatControl/ChatControl.vb @@ -4,7 +4,7 @@ Imports DigitalData.Modules.Logging Public Class ChatControl Private ReadOnly IdColumn As String = "GUID" - Private ReadOnly UsernameColumn As String = "USER_FROM" + Private ReadOnly IdentificationColumn As String = "USER_FROM" Private ReadOnly MessageColumn As String = "MESSAGE_TEXT" Private ReadOnly DateColumn As String = "ADDED_WHEN" @@ -21,45 +21,76 @@ Public Class ChatControl } Public IDBObjectId As Long - Public ConnectionString As String - Public CurrentUser As String + Public ConnStringIDB As String + Public ConversationIdentification As String + Public Username As String Public CurrentConversation As Long Public Sub New() InitializeComponent() End Sub - Public Sub Init(LogConfig As LogConfig, ConnectionString As String, CurrentUser As String) + Public Sub Init(LogConfig As LogConfig, ConnectionStringIDB As String, ConversationIdentification As String, Username As String) Me.LogConfig = LogConfig Me.Logger = LogConfig.GetLogger() - Me.ConnectionString = ConnectionString - Me.CurrentUser = CurrentUser - Me.Db = New MSSQLServer(LogConfig, ConnectionString) + Me.ConnStringIDB = ConnectionStringIDB + Me.ConversationIdentification = ConversationIdentification + Me.Username = Username + + Me.Db = New MSSQLServer(LogConfig, ConnStringIDB) End Sub - Public Sub LoadConversations(IDBObjectId As Long) - Dim oSQL As String = $"SELECT * FROM VWIDB_CONVERSATION WHERE IDB_OBJ_ID = {IDBObjectId}" + Public Function GetConversations(IDBObjectId As Long) + Dim oSQL As String = $"SELECT * FROM VWIDB_CONVERSATION WHERE IDB_OBJ_ID = {IDBObjectId} ORDER BY CONVERSATION_ID DESC" Dim oDatatable As DataTable = Db.GetDatatable(oSQL) + Dim oConversations As New List(Of String) + If Not IsNothing(oDatatable) Then + If oDatatable.Rows.Count = 1 Then + Dim oItem = oDatatable.Rows(0).Item("CONVERSATION_ID").ToString + "|" + oDatatable.Rows(0).Item("TITLE").ToString + oConversations.Insert(0, oItem) + CurrentConversation = oDatatable.Rows(0).Item("CONVERSATION_ID") + LoadConversation(CurrentConversation) + Else + For Each oROW As DataRow In oDatatable.Rows + Dim oItem = oROW.Item("CONVERSATION_ID").ToString + "|" + oROW.Item("TITLE").ToString + oConversations.Insert(0, oItem) + If oROW.Item("CONVERSATION_STATE") = "Started" Then + CurrentConversation = oROW.Item("CONVERSATION_ID") + LoadConversation(CurrentConversation) + End If + Next + End If + End If + Return oConversations + End Function - lookupConversations.DataSource = oDatatable + Private Sub tsCBConversations_SelectedIndexChanged(sender As Object, e As EventArgs) + 'If tsCBConversations.SelectedIndex <> -1 Then + ' Dim oValues As List(Of String) = tsCBConversations.Text.Split("|").ToList() + ' CurrentConversation = oValues(0) + ' LoadConversation(CurrentConversation) + + 'End If End Sub - Public Sub LoadConversation(ConversationId As Long) Dim oSQL As String = $"SELECT * FROM VWIDB_CONV_MESSAGES WHERE CONV_ID = {ConversationId} ORDER BY GUID" Dim oDatatable As DataTable = Db.GetDatatable(oSQL) - BuildUsernameColorDict(oDatatable) - + oSQL = $"SELECT * FROM VWIDB_CONVERSATION WHERE CONVERSATION_ID = {ConversationId}" + Dim oDatatable2 As DataTable = Db.GetDatatable(oSQL) GridChat.DataSource = ChatSource ChatSource.DataSource = oDatatable + lblTitle.Text = oDatatable2.Rows(0).Item("TITLE") + End Sub - Public Sub SendMessage(MessageText As String) + Public Sub NewMessage(MessageText As String) Try - Dim oSQL As String = $"EXEC [PRIDB_NEW_CONVERSATION_MESSAGE] {CurrentConversation},'{MessageText}', '{CurrentUser}'" + Dim oSQL As String = $"EXEC [PRIDB_NEW_CONVERSATION_MESSAGE] {CurrentConversation},'{MessageText}', '{ConversationIdentification}'" Dim oResult = Db.GetScalarValue(oSQL) LoadConversation(CurrentConversation) txtMessage.Text = String.Empty + ChatView.MoveLast() Catch ex As Exception Logger.Error(ex) End Try @@ -71,7 +102,7 @@ Public Class ChatControl UsernameColorsDict.Clear() Datatable.AsEnumerable(). - Select(Function(Row) Row.Item(UsernameColumn)). + Select(Function(Row) Row.Item(IdentificationColumn)). Distinct().ToList(). ForEach(Sub(Name) UsernameColorsDict.Add(Name, UsernameColors.Item(oIndex)) @@ -81,9 +112,9 @@ Public Class ChatControl Private Sub ChatView_CustomItemTemplate(sender As Object, e As TileViewCustomItemTemplateEventArgs) Handles ChatView.CustomItemTemplate Dim oRow As DataRow = ChatView.GetDataRow(e.RowHandle) - Dim oUsername As String = oRow.Item(UsernameColumn) + Dim oUsername As String = oRow.Item(IdentificationColumn) - If oUsername = CurrentUser Then + If oUsername = ConversationIdentification Or oUsername = Username Then e.Template = e.Templates.Item("ChatRight") Else e.Template = e.Templates.Item("ChatLeft") @@ -93,33 +124,40 @@ Public Class ChatControl Private Sub ChatView_ItemCustomize(sender As Object, e As TileViewItemCustomizeEventArgs) Handles ChatView.ItemCustomize Dim oRow As DataRow = ChatView.GetDataRow(e.RowHandle) - Dim oUsername As String = oRow.Item(UsernameColumn) + Dim oUsername As String = oRow.Item(IdentificationColumn) Dim oMessage As String = oRow.Item(MessageColumn) Dim oColor As Color = UsernameColorsDict.Item(oUsername) - If oUsername = CurrentUser Then + If oUsername = ConversationIdentification Or oUsername = Username Then e.Item.AppearanceItem.Normal.BackColor = Color.PaleTurquoise End If e.Item.AppearanceItem.Focused.BackColor = Color.Turquoise - e.Item.Item(UsernameColumn).Appearance.Normal.ForeColor = oColor + e.Item.Item(IdentificationColumn).Appearance.Normal.ForeColor = oColor End Sub - Private Sub lookupConversations_SelectedValuesChanged(sender As Object, SelectedValues As List(Of String)) Handles lookupConversations.SelectedValuesChanged - If SelectedValues.Count > 0 Then - CurrentConversation = SelectedValues.First() - LoadConversation(CurrentConversation) - End If - End Sub - Private Sub txtMessage_KeyUp(sender As Object, e As KeyEventArgs) Handles txtMessage.KeyUp - If e.Control And e.KeyCode = Keys.Enter And txtMessage.Text.Count > 0 Then - SendMessage(txtMessage.Text) - End If + + Private Sub txtMessage_KeyUp(sender As Object, e As KeyEventArgs) + End Sub Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles btnSendMessage.Click If txtMessage.Text.Count > 0 Then - SendMessage(txtMessage.Text) + NewMessage(txtMessage.Text) End If End Sub + + Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles txtMessage.KeyUp + If e.Control And e.KeyCode = Keys.Enter And txtMessage.Text.Count > 0 Then + NewMessage(txtMessage.Text) + End If + End Sub + + Private Sub ChatControl_Click(sender As Object, e As EventArgs) Handles MyBase.Click + + End Sub + + Private Sub ChatControl_Leave(sender As Object, e As EventArgs) Handles Me.Leave + + End Sub End Class diff --git a/Controls.ChatControl/ChatControl.vbproj b/Controls.ChatControl/ChatControl.vbproj index c4399c50..107ed7a2 100644 --- a/Controls.ChatControl/ChatControl.vbproj +++ b/Controls.ChatControl/ChatControl.vbproj @@ -10,8 +10,9 @@ DigitalData.Controls.ChatControl 512 Windows - v4.7.2 + v4.6.1 true + true @@ -49,6 +50,7 @@ + @@ -153,5 +155,17 @@ Logging + + + + + + + + + + + + \ No newline at end of file diff --git a/Controls.ChatControl/My Project/Resources.Designer.vb b/Controls.ChatControl/My Project/Resources.Designer.vb index 150629e8..dfe565bf 100644 --- a/Controls.ChatControl/My Project/Resources.Designer.vb +++ b/Controls.ChatControl/My Project/Resources.Designer.vb @@ -59,5 +59,45 @@ Namespace My.Resources resourceCulture = value End Set End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Action_Workflow_Activate() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Action_Workflow_Activate", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Action_Workflow_Deactivate() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Action_Workflow_Deactivate", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property crop_php() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("crop.php", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Send_16x16() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Send_16x16", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property End Module End Namespace diff --git a/Controls.ChatControl/My Project/Resources.resx b/Controls.ChatControl/My Project/Resources.resx index af7dbebb..c8bf3f12 100644 --- a/Controls.ChatControl/My Project/Resources.resx +++ b/Controls.ChatControl/My Project/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,22 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\crop.php.jpeg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Send_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Action_Workflow_Activate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Action_Workflow_Deactivate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Controls.ChatControl/My Project/licenses.licx b/Controls.ChatControl/My Project/licenses.licx index d2ccec98..53cc1d7d 100644 --- a/Controls.ChatControl/My Project/licenses.licx +++ b/Controls.ChatControl/My Project/licenses.licx @@ -1,3 +1,5 @@ DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/Controls.ChatControl/Resources/Action_Workflow_Activate.png b/Controls.ChatControl/Resources/Action_Workflow_Activate.png new file mode 100644 index 00000000..5d967b1f Binary files /dev/null and b/Controls.ChatControl/Resources/Action_Workflow_Activate.png differ diff --git a/Controls.ChatControl/Resources/Action_Workflow_Deactivate.png b/Controls.ChatControl/Resources/Action_Workflow_Deactivate.png new file mode 100644 index 00000000..54a077fb Binary files /dev/null and b/Controls.ChatControl/Resources/Action_Workflow_Deactivate.png differ diff --git a/Controls.ChatControl/Resources/Send_16x16.png b/Controls.ChatControl/Resources/Send_16x16.png new file mode 100644 index 00000000..add634c2 Binary files /dev/null and b/Controls.ChatControl/Resources/Send_16x16.png differ diff --git a/Controls.ChatControl/Resources/crop.php.jpeg b/Controls.ChatControl/Resources/crop.php.jpeg new file mode 100644 index 00000000..68360c3b Binary files /dev/null and b/Controls.ChatControl/Resources/crop.php.jpeg differ diff --git a/Controls.ChatNewConv/ChatNewConv.Designer.vb b/Controls.ChatNewConv/ChatNewConv.Designer.vb new file mode 100644 index 00000000..08aa3d94 --- /dev/null +++ b/Controls.ChatNewConv/ChatNewConv.Designer.vb @@ -0,0 +1,236 @@ + _ +Partial Class ChatNewConv + Inherits System.Windows.Forms.UserControl + + 'UserControl1 überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + 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. + _ + Private Sub InitializeComponent() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ChatNewConv)) + Me.Panel1 = New System.Windows.Forms.Panel() + Me.txtConv_Title = New System.Windows.Forms.TextBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.Panel2 = New System.Windows.Forms.Panel() + Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() + Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() + Me.AccordionControl1 = New DevExpress.XtraBars.Navigation.AccordionControl() + Me.AccordionContentContainer1 = New DevExpress.XtraBars.Navigation.AccordionContentContainer() + Me.GridControlUsers = New DevExpress.XtraGrid.GridControl() + Me.GridViewUsers = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.AccordionContentContainer2 = New DevExpress.XtraBars.Navigation.AccordionContentContainer() + Me.GridControlGroups = New DevExpress.XtraGrid.GridControl() + Me.GridViewGroups = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.AccordionControlElement1 = New DevExpress.XtraBars.Navigation.AccordionControlElement() + Me.AccordionControlElementUser = New DevExpress.XtraBars.Navigation.AccordionControlElement() + Me.AccordionControlElementGroups = New DevExpress.XtraBars.Navigation.AccordionControlElement() + Me.Panel1.SuspendLayout() + Me.Panel2.SuspendLayout() + CType(Me.AccordionControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.AccordionControl1.SuspendLayout() + Me.AccordionContentContainer1.SuspendLayout() + CType(Me.GridControlUsers, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridViewUsers, System.ComponentModel.ISupportInitialize).BeginInit() + Me.AccordionContentContainer2.SuspendLayout() + CType(Me.GridControlGroups, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridViewGroups, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'Panel1 + ' + Me.Panel1.Controls.Add(Me.txtConv_Title) + Me.Panel1.Controls.Add(Me.Label1) + 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(463, 57) + Me.Panel1.TabIndex = 0 + ' + 'txtConv_Title + ' + Me.txtConv_Title.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtConv_Title.Location = New System.Drawing.Point(6, 28) + Me.txtConv_Title.Name = "txtConv_Title" + Me.txtConv_Title.Size = New System.Drawing.Size(449, 23) + Me.txtConv_Title.TabIndex = 1 + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(3, 11) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(345, 14) + Me.Label1.TabIndex = 0 + Me.Label1.Text = "Bitte geben Sie einen aussagekräftigen Konversationstitel ein:" + ' + 'Panel2 + ' + Me.Panel2.Controls.Add(Me.SimpleButton1) + Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom + Me.Panel2.Location = New System.Drawing.Point(0, 413) + Me.Panel2.Name = "Panel2" + Me.Panel2.Size = New System.Drawing.Size(463, 59) + Me.Panel2.TabIndex = 1 + ' + 'SimpleButton1 + ' + Me.SimpleButton1.Dock = System.Windows.Forms.DockStyle.Fill + Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.SimpleButton1.Location = New System.Drawing.Point(0, 0) + Me.SimpleButton1.Name = "SimpleButton1" + Me.SimpleButton1.Size = New System.Drawing.Size(463, 59) + Me.SimpleButton1.TabIndex = 0 + Me.SimpleButton1.Text = "Konversation anlegen" + ' + 'AccordionControl1 + ' + Me.AccordionControl1.Controls.Add(Me.AccordionContentContainer1) + Me.AccordionControl1.Controls.Add(Me.AccordionContentContainer2) + Me.AccordionControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.AccordionControl1.Elements.AddRange(New DevExpress.XtraBars.Navigation.AccordionControlElement() {Me.AccordionControlElement1}) + Me.AccordionControl1.Location = New System.Drawing.Point(0, 57) + Me.AccordionControl1.Name = "AccordionControl1" + Me.AccordionControl1.Size = New System.Drawing.Size(463, 356) + Me.AccordionControl1.TabIndex = 5 + Me.AccordionControl1.Text = "AccordionControl1" + ' + 'AccordionContentContainer1 + ' + Me.AccordionContentContainer1.Controls.Add(Me.GridControlUsers) + Me.AccordionContentContainer1.Name = "AccordionContentContainer1" + Me.AccordionContentContainer1.Size = New System.Drawing.Size(444, 177) + Me.AccordionContentContainer1.TabIndex = 1 + ' + 'GridControlUsers + ' + Me.GridControlUsers.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControlUsers.Location = New System.Drawing.Point(0, 0) + Me.GridControlUsers.MainView = Me.GridViewUsers + Me.GridControlUsers.Name = "GridControlUsers" + Me.GridControlUsers.Size = New System.Drawing.Size(444, 177) + Me.GridControlUsers.TabIndex = 0 + Me.GridControlUsers.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewUsers}) + ' + 'GridViewUsers + ' + Me.GridViewUsers.Appearance.EvenRow.BackColor = System.Drawing.Color.PaleTurquoise + Me.GridViewUsers.Appearance.EvenRow.Options.UseBackColor = True + Me.GridViewUsers.GridControl = Me.GridControlUsers + Me.GridViewUsers.Name = "GridViewUsers" + Me.GridViewUsers.OptionsBehavior.Editable = False + Me.GridViewUsers.OptionsSelection.MultiSelect = True + Me.GridViewUsers.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect + Me.GridViewUsers.OptionsView.EnableAppearanceEvenRow = True + Me.GridViewUsers.OptionsView.ShowAutoFilterRow = True + Me.GridViewUsers.OptionsView.ShowGroupPanel = False + ' + 'AccordionContentContainer2 + ' + Me.AccordionContentContainer2.Controls.Add(Me.GridControlGroups) + Me.AccordionContentContainer2.Name = "AccordionContentContainer2" + Me.AccordionContentContainer2.Size = New System.Drawing.Size(444, 96) + Me.AccordionContentContainer2.TabIndex = 2 + ' + 'GridControlGroups + ' + Me.GridControlGroups.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControlGroups.Location = New System.Drawing.Point(0, 0) + Me.GridControlGroups.MainView = Me.GridViewGroups + Me.GridControlGroups.Name = "GridControlGroups" + Me.GridControlGroups.Size = New System.Drawing.Size(444, 96) + Me.GridControlGroups.TabIndex = 1 + Me.GridControlGroups.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewGroups}) + ' + 'GridViewGroups + ' + Me.GridViewGroups.Appearance.EvenRow.BackColor = System.Drawing.Color.PaleTurquoise + Me.GridViewGroups.Appearance.EvenRow.Options.UseBackColor = True + Me.GridViewGroups.GridControl = Me.GridControlGroups + Me.GridViewGroups.Name = "GridViewGroups" + Me.GridViewGroups.OptionsBehavior.Editable = False + Me.GridViewGroups.OptionsSelection.MultiSelect = True + Me.GridViewGroups.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect + Me.GridViewGroups.OptionsView.EnableAppearanceEvenRow = True + Me.GridViewGroups.OptionsView.ShowAutoFilterRow = True + Me.GridViewGroups.OptionsView.ShowGroupPanel = False + ' + 'AccordionControlElement1 + ' + Me.AccordionControlElement1.Elements.AddRange(New DevExpress.XtraBars.Navigation.AccordionControlElement() {Me.AccordionControlElementUser, Me.AccordionControlElementGroups}) + Me.AccordionControlElement1.Expanded = True + Me.AccordionControlElement1.Name = "AccordionControlElement1" + Me.AccordionControlElement1.Text = "Bestimmen Sie wer an der Konversation teilnehmen kann:" + ' + 'AccordionControlElementUser + ' + Me.AccordionControlElementUser.ContentContainer = Me.AccordionContentContainer1 + Me.AccordionControlElementUser.Expanded = True + Me.AccordionControlElementUser.Name = "AccordionControlElementUser" + Me.AccordionControlElementUser.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item + Me.AccordionControlElementUser.Text = "User" + ' + 'AccordionControlElementGroups + ' + Me.AccordionControlElementGroups.ContentContainer = Me.AccordionContentContainer2 + Me.AccordionControlElementGroups.Expanded = True + Me.AccordionControlElementGroups.Name = "AccordionControlElementGroups" + Me.AccordionControlElementGroups.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item + Me.AccordionControlElementGroups.Text = "Gruppen" + ' + 'ChatNewConv + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 14.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.AccordionControl1) + Me.Controls.Add(Me.Panel2) + Me.Controls.Add(Me.Panel1) + Me.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Name = "ChatNewConv" + Me.Size = New System.Drawing.Size(463, 472) + Me.Panel1.ResumeLayout(False) + Me.Panel1.PerformLayout() + Me.Panel2.ResumeLayout(False) + CType(Me.AccordionControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.AccordionControl1.ResumeLayout(False) + Me.AccordionContentContainer1.ResumeLayout(False) + CType(Me.GridControlUsers, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridViewUsers, System.ComponentModel.ISupportInitialize).EndInit() + Me.AccordionContentContainer2.ResumeLayout(False) + CType(Me.GridControlGroups, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridViewGroups, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents Panel1 As Panel + Friend WithEvents txtConv_Title As TextBox + Friend WithEvents Label1 As Label + Friend WithEvents Panel2 As Panel + Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker + Friend WithEvents AccordionControl1 As DevExpress.XtraBars.Navigation.AccordionControl + Friend WithEvents AccordionContentContainer1 As DevExpress.XtraBars.Navigation.AccordionContentContainer + Friend WithEvents GridControlUsers As DevExpress.XtraGrid.GridControl + Friend WithEvents GridViewUsers As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents AccordionContentContainer2 As DevExpress.XtraBars.Navigation.AccordionContentContainer + Friend WithEvents GridControlGroups As DevExpress.XtraGrid.GridControl + Friend WithEvents GridViewGroups As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents AccordionControlElement1 As DevExpress.XtraBars.Navigation.AccordionControlElement + Friend WithEvents AccordionControlElementUser As DevExpress.XtraBars.Navigation.AccordionControlElement + Friend WithEvents AccordionControlElementGroups As DevExpress.XtraBars.Navigation.AccordionControlElement + Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton +End Class diff --git a/Controls.ChatNewConv/ChatNewConv.resx b/Controls.ChatNewConv/ChatNewConv.resx new file mode 100644 index 00000000..1b8ff1ab --- /dev/null +++ b/Controls.ChatNewConv/ChatNewConv.resx @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGICAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZENpcmNsZWQiPg0KICAgIDxwYXRoIGQ9Ik0xNiw0 + QzkuNCw0LDQsOS40LDQsMTZzNS40LDEyLDEyLDEyczEyLTUuNCwxMi0xMlMyMi42LDQsMTYsNHogTTI0 + LDE4aC02djZoLTR2LTZIOHYtNGg2VjhoNHY2aDZWMTh6IiBjbGFzcz0iR3JlZW4iIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= + + + + 17, 17 + + \ No newline at end of file diff --git a/Controls.ChatNewConv/ChatNewConv.sln b/Controls.ChatNewConv/ChatNewConv.sln new file mode 100644 index 00000000..7fbe294b --- /dev/null +++ b/Controls.ChatNewConv/ChatNewConv.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29728.190 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ChatNewConv", "ChatNewConv.vbproj", "{1F278760-4F6B-42E8-B82D-01D4C8618340}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1F278760-4F6B-42E8-B82D-01D4C8618340}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F278760-4F6B-42E8-B82D-01D4C8618340}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F278760-4F6B-42E8-B82D-01D4C8618340}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F278760-4F6B-42E8-B82D-01D4C8618340}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7A1345F2-0B32-4B54-AD8C-2DA579BFF116} + EndGlobalSection +EndGlobal diff --git a/Controls.ChatNewConv/ChatNewConv.vb b/Controls.ChatNewConv/ChatNewConv.vb new file mode 100644 index 00000000..2b3b6f01 --- /dev/null +++ b/Controls.ChatNewConv/ChatNewConv.vb @@ -0,0 +1,108 @@ +Imports DevExpress.XtraGrid.Views.Tile +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Logging + +Public Class ChatNewConv + Public Delegate Sub ConversationCreated() + Public Event Conversation_Created As ConversationCreated + Private _Database As MSSQLServer + Private LogConfig As LogConfig + Private Logger As Logger + + Public IDBObjectId As Long + Public ConnStringIDB As String + Public Username As String + Public User_Language As String + Public NewConversation As Long + + Public Sub New() + InitializeComponent() + End Sub + + Public Sub Init(LogConfig As LogConfig, ConnectionStringIDB As String, IDB_OBJ_ID As Long, Username As String, UserLanguage As String, DTUsers As DataTable, DTGroups As DataTable) + Me.LogConfig = LogConfig + Me.Logger = LogConfig.GetLogger() + Me.ConnStringIDB = ConnectionStringIDB + IDBObjectId = IDB_OBJ_ID + Me.Username = Username + Me.User_Language = UserLanguage + Me._Database = New MSSQLServer(LogConfig, ConnectionStringIDB) + If Not IsNothing(DTUsers) Then + If DTUsers.Rows.Count > 1 Then + AccordionControlElementUser.Visible = True + GridControlUsers.DataSource = DTUsers + Else + AccordionControlElementUser.Visible = False + End If + Else + AccordionControlElementUser.Visible = False + End If + If Not IsNothing(DTGroups) Then + If DTGroups.Rows.Count > 1 Then + AccordionControlElementGroups.Visible = True + GridControlGroups.DataSource = DTUsers + Try + GridViewUsers.Columns("UserID").Visible = False + Catch ex As Exception + GridViewUsers.Columns("USER_ID").Visible = False + End Try + + Else + AccordionControlElementGroups.Visible = False + End If + Else + AccordionControlElementGroups.Visible = False + End If + + End Sub + + Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click + Try + If txtConv_Title.Text = String.Empty Then + MsgBox("Please add a conversation-title!", MsgBoxStyle.Information) + Exit Sub + End If + Dim oSQL = $"EXEC PRIDB_NEW_CONVERSATION {IDBObjectId},'{txtConv_Title.Text}','{Username}','{User_Language}'" + If _Database.ExecuteNonQuery(oSQL) = True Then + Dim oError As Boolean = False + oSQL = $"SELECT MAX(CONVERSATION_ID) FROM VWIDB_CONVERSATION WHERE IDB_OBJ_ID = {IDBObjectId}" + Dim oCONV_ID = _Database.NewExecuteScalar(oSQL) + If Not IsNothing(oCONV_ID) Then + NewConversation = oCONV_ID + Dim oSelectedUsers As Integer() = GridViewUsers.GetSelectedRows() + If oSelectedUsers.Count > 0 Then + For Each oRowHandle As Integer In oSelectedUsers + Dim oUserID + Try + oUserID = GridViewUsers.GetRowCellValue(oRowHandle, "UserID") + Catch ex As Exception + Try + oUserID = GridViewUsers.GetRowCellValue(oRowHandle, "USER_ID") + Catch ex1 As Exception + Logger.Warn("Error Selecting UserID/USER_ID: " & ex.Message) + oError = True + Exit Sub + End Try + + + End Try + + oSQL = $"EXEC PRIDB_ADD_USER_2_CONVERSATION {oCONV_ID},{oUserID},'{Username}'" + If _Database.ExecuteNonQuery(oSQL) = False Then + oError = True + End If + Next + End If + If oError = False Then + RaiseEvent Conversation_Created() + End If + End If + Else + MsgBox("Error running create procedure. Check Your log!", MsgBoxStyle.Information) + End If + + Catch ex As Exception + MsgBox($"Unexpected error in Add Conversation: {ex.Message}") + End Try + End Sub +End Class diff --git a/Controls.ChatNewConv/ChatNewConv.vbproj b/Controls.ChatNewConv/ChatNewConv.vbproj new file mode 100644 index 00000000..31fe12da --- /dev/null +++ b/Controls.ChatNewConv/ChatNewConv.vbproj @@ -0,0 +1,171 @@ + + + + + Debug + AnyCPU + {86D27FFA-480F-481D-8D23-26DEAE92FE6C} + Library + DigitalData.Controls.ChatNewConv + DigitalData.Controls.ChatNewConv + 512 + Windows + v4.6.1 + true + + + + true + full + true + true + bin\Debug\ + DigitalData.Controls.ChatNewConv.xml + _MYFORMS=True + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + DigitalData.Controls.ChatNewConv.xml + _MYFORMS=True + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + ..\Controls.LookupGrid\obj\Debug\DigitalData.Controls.LookupGrid.dll + + + + ..\packages\NLog.4.7.2\lib\net45\NLog.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + UserControl + + + ChatNewConv.vb + + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + ChatNewConv.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + + + {eaf0ea75-5fa7-485d-89c7-b2d843b03a96} + Database + + + {903b2d7d-3b80-4be9-8713-7447b704e1b0} + Logging + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Controls.ChatNewConv/My Project/Application.Designer.vb b/Controls.ChatNewConv/My Project/Application.Designer.vb new file mode 100644 index 00000000..8ab460ba --- /dev/null +++ b/Controls.ChatNewConv/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/Controls.ChatNewConv/My Project/Application.myapp b/Controls.ChatNewConv/My Project/Application.myapp new file mode 100644 index 00000000..758895de --- /dev/null +++ b/Controls.ChatNewConv/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/Controls.ChatNewConv/My Project/AssemblyInfo.vb b/Controls.ChatNewConv/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..e3c1975f --- /dev/null +++ b/Controls.ChatNewConv/My Project/AssemblyInfo.vb @@ -0,0 +1,34 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die einer Assembly zugeordnet sind. + +' Werte der Assemblyattribute überprüfen + + + + + + + + + + +'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +' indem Sie "*" wie unten gezeigt eingeben: + + + diff --git a/Controls.ChatNewConv/My Project/Resources.Designer.vb b/Controls.ChatNewConv/My Project/Resources.Designer.vb new file mode 100644 index 00000000..793a96e7 --- /dev/null +++ b/Controls.ChatNewConv/My Project/Resources.Designer.vb @@ -0,0 +1,103 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Controls.ChatNewConv.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Action_Workflow_Activate() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Action_Workflow_Activate", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Action_Workflow_Deactivate() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Action_Workflow_Deactivate", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property crop_php() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("crop.php", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Send_16x16() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Send_16x16", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + End Module +End Namespace diff --git a/Controls.ChatNewConv/My Project/Resources.resx b/Controls.ChatNewConv/My Project/Resources.resx new file mode 100644 index 00000000..c8bf3f12 --- /dev/null +++ b/Controls.ChatNewConv/My Project/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\crop.php.jpeg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Send_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Action_Workflow_Activate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Action_Workflow_Deactivate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Controls.ChatNewConv/My Project/Settings.Designer.vb b/Controls.ChatNewConv/My Project/Settings.Designer.vb new file mode 100644 index 00000000..44767256 --- /dev/null +++ b/Controls.ChatNewConv/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Automatische My.Settings-Speicherfunktion" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.DigitalData.Controls.ChatNewConv.My.MySettings + Get + Return Global.DigitalData.Controls.ChatNewConv.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/Controls.ChatNewConv/My Project/Settings.settings b/Controls.ChatNewConv/My Project/Settings.settings new file mode 100644 index 00000000..85b890b3 --- /dev/null +++ b/Controls.ChatNewConv/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Controls.ChatNewConv/My Project/licenses.licx b/Controls.ChatNewConv/My Project/licenses.licx new file mode 100644 index 00000000..75eb9ac1 --- /dev/null +++ b/Controls.ChatNewConv/My Project/licenses.licx @@ -0,0 +1,6 @@ +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/Controls.ChatNewConv/Resources/Action_Workflow_Activate.png b/Controls.ChatNewConv/Resources/Action_Workflow_Activate.png new file mode 100644 index 00000000..5d967b1f Binary files /dev/null and b/Controls.ChatNewConv/Resources/Action_Workflow_Activate.png differ diff --git a/Controls.ChatNewConv/Resources/Action_Workflow_Deactivate.png b/Controls.ChatNewConv/Resources/Action_Workflow_Deactivate.png new file mode 100644 index 00000000..54a077fb Binary files /dev/null and b/Controls.ChatNewConv/Resources/Action_Workflow_Deactivate.png differ diff --git a/Controls.ChatNewConv/Resources/Send_16x16.png b/Controls.ChatNewConv/Resources/Send_16x16.png new file mode 100644 index 00000000..add634c2 Binary files /dev/null and b/Controls.ChatNewConv/Resources/Send_16x16.png differ diff --git a/Controls.ChatNewConv/Resources/crop.php.jpeg b/Controls.ChatNewConv/Resources/crop.php.jpeg new file mode 100644 index 00000000..68360c3b Binary files /dev/null and b/Controls.ChatNewConv/Resources/crop.php.jpeg differ diff --git a/Controls.ChatNewConv/packages.config b/Controls.ChatNewConv/packages.config new file mode 100644 index 00000000..1baeaab3 --- /dev/null +++ b/Controls.ChatNewConv/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Controls.LookupGrid/LookupControl2.vb b/Controls.LookupGrid/LookupControl2.vb index 29ab0e90..24aa6677 100644 --- a/Controls.LookupGrid/LookupControl2.vb +++ b/Controls.LookupGrid/LookupControl2.vb @@ -62,6 +62,8 @@ Public Class LookupControl2 Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents fProperties As RepositoryItemGridLookUpEdit + Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView Private _ReadOnly As Boolean = False Shared Sub New() @@ -197,6 +199,31 @@ Public Class LookupControl2 Return RepositoryItemLookupControl2.CustomEditName End Get End Property + + Private Sub InitializeComponent() + Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit() + Me.fPropertiesView = New DevExpress.XtraGrid.Views.Grid.GridView() + CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'fProperties + ' + Me.fProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.fProperties.Name = "fProperties" + Me.fProperties.PopupView = Me.fPropertiesView + ' + 'fPropertiesView + ' + Me.fPropertiesView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus + Me.fPropertiesView.Name = "fPropertiesView" + Me.fPropertiesView.OptionsSelection.EnableAppearanceFocusedCell = False + Me.fPropertiesView.OptionsView.ShowGroupPanel = False + CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub End Class diff --git a/DDMonorepo.sln b/DDMonorepo.sln index efc29723..ec888f8c 100644 --- a/DDMonorepo.sln +++ b/DDMonorepo.sln @@ -122,6 +122,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ChatControl", "Controls.Cha EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ChatTest", "ChatTest\ChatTest.vbproj", "{4A726345-FD6B-4E1C-9E5D-18C9043D7714}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ChatNewConv", "Controls.ChatNewConv\ChatNewConv.vbproj", "{86D27FFA-480F-481D-8D23-26DEAE92FE6C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -320,6 +322,10 @@ Global {4A726345-FD6B-4E1C-9E5D-18C9043D7714}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A726345-FD6B-4E1C-9E5D-18C9043D7714}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A726345-FD6B-4E1C-9E5D-18C9043D7714}.Release|Any CPU.Build.0 = Release|Any CPU + {86D27FFA-480F-481D-8D23-26DEAE92FE6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86D27FFA-480F-481D-8D23-26DEAE92FE6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86D27FFA-480F-481D-8D23-26DEAE92FE6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86D27FFA-480F-481D-8D23-26DEAE92FE6C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -373,6 +379,7 @@ Global {9713484C-6EE3-4D7E-B6E6-F32CF6B6BB6C} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} {1F278760-4F6B-42E8-B82D-01D4C8618340} = {F98C0329-C004-417F-B2AB-7466E88D8220} {4A726345-FD6B-4E1C-9E5D-18C9043D7714} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A} + {86D27FFA-480F-481D-8D23-26DEAE92FE6C} = {F98C0329-C004-417F-B2AB-7466E88D8220} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286} diff --git a/Modules.Database/MSSQLServer.vb b/Modules.Database/MSSQLServer.vb index 32c33efb..b38b014a 100644 --- a/Modules.Database/MSSQLServer.vb +++ b/Modules.Database/MSSQLServer.vb @@ -184,6 +184,28 @@ Public Class MSSQLServer Return False End Try End Function + Public Function ExecuteNonQueryCS(pSQLCommand As String, ConnString As String, Optional pInfo As String = "") + Try + If pInfo <> "" Then + pInfo = "[" & pInfo & "]" + End If + Dim SQLconnect As New SqlClient.SqlConnection + Dim SQLcommand As SqlClient.SqlCommand + SQLconnect.ConnectionString = ConnString + SQLconnect.Open() + SQLcommand = SQLconnect.CreateCommand + 'Update Last Created Record in Foo + SQLcommand.CommandText = pSQLCommand + _Logger.Debug("Execute_non_Query_ConStr Created: " & pSQLCommand) + SQLcommand.ExecuteNonQuery() + SQLcommand.Dispose() + SQLconnect.Close() + Return True + Catch ex As Exception + _Logger.Warn($"Unexpected Error in Execute_non_Query_ConStr{pInfo}: {ex.Message} [{pSQLCommand}]") + Return False + End Try + End Function Public Function ExecuteNonQuery(SQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery Return ExecuteNonQuery(SQLCommand, _Timeout) @@ -256,6 +278,29 @@ Public Class MSSQLServer Return Nothing End Try End Function + Public Function GetScalarValueConStr(pSQLCommand As String, ConString As String, Optional pInfo As String = "") + Dim result + Try + If pInfo <> "" Then + pInfo = "[" & pInfo & "]" + End If + Dim SQLconnect As New SqlClient.SqlConnection + Dim SQLcommand As SqlClient.SqlCommand + SQLconnect.ConnectionString = ConString + SQLconnect.Open() + SQLcommand = SQLconnect.CreateCommand + 'Update Last Created Record in Foo + SQLcommand.CommandText = pSQLCommand + _Logger.Debug("Execute_Scalar_ConStr Scalar: " & pSQLCommand) + result = SQLcommand.ExecuteScalar() + SQLcommand.Dispose() + SQLconnect.Close() + Return result + Catch ex As Exception + _Logger.Warn($"Unexpected Error in Execute_Scalar_ConStr{pInfo}: {ex.Message} [{pSQLCommand}]") + Return Nothing + End Try + End Function Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String) As Object Return GetScalarValue(SQLCommand, OutputParameter, _Timeout) diff --git a/Modules.Database/My Project/AssemblyInfo.vb b/Modules.Database/My Project/AssemblyInfo.vb index ef24c784..5cf262a2 100644 --- a/Modules.Database/My Project/AssemblyInfo.vb +++ b/Modules.Database/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + +