diff --git a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj index 2593c0f..7e579b4 100644 --- a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj +++ b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj @@ -871,6 +871,7 @@ + diff --git a/app/DD_PM_WINDREAM/My Project/Resources.Designer.vb b/app/DD_PM_WINDREAM/My Project/Resources.Designer.vb index 68c3ee3..6b04178 100644 --- a/app/DD_PM_WINDREAM/My Project/Resources.Designer.vb +++ b/app/DD_PM_WINDREAM/My Project/Resources.Designer.vb @@ -270,6 +270,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property conversation() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("conversation", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/app/DD_PM_WINDREAM/My Project/Resources.resx b/app/DD_PM_WINDREAM/My Project/Resources.resx index 2330338..624f73e 100644 --- a/app/DD_PM_WINDREAM/My Project/Resources.resx +++ b/app/DD_PM_WINDREAM/My Project/Resources.resx @@ -121,18 +121,9 @@ ..\Resources\refresh_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\asterisk_yellow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\action_add_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\database_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\hide_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -190,6 +181,9 @@ ..\Resources\Search(Go)_5718.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ampel-gruen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\application_form_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -211,15 +205,15 @@ ..\Resources\database_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\DeleteFilter_5563.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\database_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Image_File.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\key_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -232,6 +226,9 @@ ..\Resources\xls.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\show_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\dxf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -250,6 +247,9 @@ ..\Resources\Hammer_Builder_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\magifier_zoom_out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\page_copy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -265,6 +265,9 @@ ..\Resources\properties_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\bullet_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -274,8 +277,11 @@ ..\Resources\user.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ampel-gruen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\shape_square_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\email_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\A_1.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -307,9 +313,6 @@ ..\Resources\resultset_last.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\shape_square_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\bullet_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -340,17 +343,20 @@ ..\Resources\ID_FILE_PAGE_SETUP.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\flag_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\flag_orange.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\bullet_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\resultset_previous.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\email_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Image_File.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Files_7954.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -361,8 +367,8 @@ ..\Resources\Monitor_Screen_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\flag_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\database_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\OpenFileDialog_692.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -370,9 +376,6 @@ ..\Resources\doc_text_image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Einstellungen6.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\pdf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -385,8 +388,8 @@ ..\Resources\WorkItem_16xMD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\show_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\action_add_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\resultset_first.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -406,8 +409,8 @@ ..\Resources\Checkbox.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\magifier_zoom_out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Einstellungen6.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\key1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -415,7 +418,7 @@ ..\Resources\user_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\DeleteFilter_5563.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\conversation.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/app/DD_PM_WINDREAM/Resources/conversation.jpg b/app/DD_PM_WINDREAM/Resources/conversation.jpg new file mode 100644 index 0000000..a44fdef Binary files /dev/null and b/app/DD_PM_WINDREAM/Resources/conversation.jpg differ diff --git a/app/DD_PM_WINDREAM/frmChat_NewConversation.vb b/app/DD_PM_WINDREAM/frmChat_NewConversation.vb index 314b622..0d06026 100644 --- a/app/DD_PM_WINDREAM/frmChat_NewConversation.vb +++ b/app/DD_PM_WINDREAM/frmChat_NewConversation.vb @@ -14,7 +14,7 @@ InitializeComponent() ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - ChatNewConv1.Init(LOGCONFIG, CONNECTION_STRING_IDB, CURRENT_DOC_ID, USER_USERNAME, USER_LANGUAGE, oDTUsers, oDTGroups) + ChatNewConv1.Init(LOGCONFIG, CONNECTION_STRING_IDB, CURRENT_DOC_ID, USER_ID, USER_USERNAME, USER_LANGUAGE, oDTUsers, oDTGroups) AddHandler ChatNewConv1.Conversation_Created, AddressOf onConversationCreated End Sub Sub onConversationCreated() diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 87971ef..4c9862b 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -409,6 +409,11 @@ Public Class frmMain GridView_Docs.Columns.Item("ICON").MinWidth = 24 GridView_Docs.Columns.Item("ICON").AppearanceCell.BackColor = Color.White GridView_Docs.Columns.Item("ICON").Fixed = FixedStyle.Left + GridView_Docs.Columns.Item("CONV_YN").Visible = False + GridView_Docs.Columns.Item("CONVERSATION").MaxWidth = 24 + GridView_Docs.Columns.Item("CONVERSATION").MinWidth = 24 + 'GridView_Docs.Columns.Item("CONVERSATION").AppearanceCell.BackColor = Color.White + GridView_Docs.Columns.Item("CONVERSATION").Fixed = FixedStyle.Left Try GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime GridView_Docs.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss" @@ -659,6 +664,12 @@ Public Class frmMain GridView_Docs.Columns.Item("ICON").MinWidth = 24 GridView_Docs.Columns.Item("ICON").AppearanceCell.BackColor = Color.White GridView_Docs.Columns.Item("ICON").Fixed = FixedStyle.Left + + GridView_Docs.Columns.Item("CONV_YN").Visible = False + GridView_Docs.Columns.Item("CONVERSATION").MaxWidth = 24 + GridView_Docs.Columns.Item("CONVERSATION").MinWidth = 24 + 'GridView_Docs.Columns.Item("CONVERSATION").AppearanceCell.BackColor = Color.White + GridView_Docs.Columns.Item("CONVERSATION").Fixed = FixedStyle.Left ' GridView_Docs.OptionsView.ShowIndicator = False Try GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime @@ -702,7 +713,7 @@ Public Class frmMain If oViewColumn.Caption = oGridDXFieldName Then If oActGridColumn.Visible = False Then If oViewColumn.Caption <> "GUID" And oViewColumn.Caption <> "TL_STATE" And oViewColumn.Caption <> "PROFILE_ID" And oViewColumn.Caption <> "DocID" And - oViewColumn.Caption <> "FULL_FILE_PATH" And oViewColumn.Caption <> "GROUP_COLOR" And oViewColumn.Caption <> "GROUP_TEXT" Then + oViewColumn.Caption <> "FULL_FILE_PATH" And oViewColumn.Caption <> "GROUP_COLOR" And oViewColumn.Caption <> "GROUP_TEXT" And oViewColumn.Caption <> "CONV_YN" Then Console.WriteLine($"ViewColumn [{oViewColumn.Caption}] is invisible") Else oViewColumn_exists = True @@ -739,7 +750,32 @@ Public Class frmMain Return False End Try End Function + Private Function Column_inGridViewLayout(Col2bChecked As String) As Boolean + Try + Dim oGridView As New GridView + Dim oXml As String = GetXML_OverviewLayoutName() + oGridView.RestoreLayoutFromXml(oXml, OptionsLayoutBase.FullLayout) + Dim oViewColumn_exists As Boolean = False + For Each oActGridColumn As GridColumn In oGridView.Columns + Dim oGridDXFieldName = oActGridColumn.FieldName + Dim GridDXColumnEditName = oActGridColumn.ColumnEditName + Dim GridDXFieldName = oActGridColumn.FieldName + If Col2bChecked = oGridDXFieldName Then + oViewColumn_exists = True + Exit For + End If + Next + If oViewColumn_exists = False Then + LOGGER.Info($"Following ViewColumn is not existing in the view: [{Col2bChecked}]") + Return Not False + End If + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Info("Unexpected Error in Column_inGridViewLayout: " & ex.Message) + Return Not False + End Try + End Function Private Sub NotifyIcon1_MouseDoubleClick(sender As System.Object, e As MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick BringMonitor2Front() @@ -788,7 +824,7 @@ Public Class frmMain LoadNavBar() 'bwSync.ReportProgress(60) Dim oStopWatch As New RefreshHelper.SW("Decide_Load") - Decide_Load() + Decide_Load(False) oStopWatch.Done() 'bwSync.ReportProgress(95) If USER_LANGUAGE <> "de-DE" Then @@ -816,7 +852,7 @@ Public Class frmMain Private Sub NotifyIcon1_Click(sender As System.Object, e As EventArgs) Handles NotifyIcon1.Click BringMonitor2Front() End Sub - Private Sub Decide_Load() + Private Sub Decide_Load(FormLoad As Boolean) Try If USER_EXISTS = False Then Exit Sub @@ -825,7 +861,7 @@ Public Class frmMain TimerRefresh.Enabled = False End If If GRID_LOAD_TYPE = "OVERVIEW" Then - Load_Grid_Overview() + Load_Grid_Overview(FormLoad) ElseIf GRID_LOAD_TYPE.StartsWith("PROFILE#") Then Load_single_Profile() End If @@ -1273,7 +1309,7 @@ Public Class frmMain TimerRefresh.Enabled = False frmMassValidator.ShowDialog() LoadNavBar() - Decide_Load() + Decide_Load(False) Else If USER_LANGUAGE = "de-DE" Then MsgBox("Massenabschluss konnte nicht ausgeführt werden, weil windream nicht initialisiert werden konnte!", MsgBoxStyle.Critical, "Massenabschluss") @@ -1294,10 +1330,10 @@ Public Class frmMain ' Das aktuelle Layout speichern, bevor das neue geladen wird ' und GRID_LOAD_TYPE gesetzt wird. SaveGridLayout() - Load_Grid_Overview() + Load_Grid_Overview(False) RefreshHelper.LoadViewInfo() End Sub - Sub Load_Grid_Overview() + Sub Load_Grid_Overview(FormLoad As Boolean) Dim oStopWatch As New RefreshHelper.SW("Load_Grid_Overview(LGO)") Layout_Single_Profile() GRID_LOAD_TYPE = "OVERVIEW" @@ -1386,10 +1422,10 @@ Public Class frmMain columnStateIcon.Caption = "" CURR_DT_OVERVIEW.Columns.Add(columnStateIcon) + RedDocuments = 0 YellowDocuments = 0 GreenDocuments = 0 - For Each row As DataRow In CURR_DT_OVERVIEW.Rows Dim State As Integer = row.Item("TL_STATE") Select Case State @@ -1404,6 +1440,23 @@ Public Class frmMain row.Item("ICON") = My.Resources.ampel_gruen End Select Next + If IDB_ACTIVE = True Then + ' Spalte für Conversation erstellen + Dim columnConvIcon As New DataColumn() + columnConvIcon.DataType = GetType(Image) + columnConvIcon.ColumnName = "CONVERSATION" + columnConvIcon.Caption = "" + CURR_DT_OVERVIEW.Columns.Add(columnConvIcon) + End If + For Each row As DataRow In CURR_DT_OVERVIEW.Rows + Dim oCONVYN As Boolean = row.Item("CONV_YN") + Select Case oCONVYN + Case True + ' RedDocuments += 1 + row.Item("CONVERSATION") = My.Resources.conversation + End Select + Next + bindsourcegrid.DataSource = CURR_DT_OVERVIEW GridControl_Docs.DataSource = bindsourcegrid If USER_LANGUAGE = "de-DE" Then @@ -1412,17 +1465,24 @@ Public Class frmMain ToolStripLabelViewTape.Text = "Overview" End If - + Dim oColNotPartofLayout As Boolean + oColNotPartofLayout = False 'GridControlDocRow.ForceInitialize() ' GridControl1.DataSource = CURR_DT_PROFILEGRID - If FORCE_LAYOUT_OVERVIEW = True And GridLayoutChanged() = True Then + If FormLoad = True Then + If IDB_ACTIVE = True Then + oColNotPartofLayout = Column_inGridViewLayout("CONV_YN") + End If + End If + If FORCE_LAYOUT_OVERVIEW = True And GridLayoutChanged() = True Or oColNotPartofLayout = True Then ResetLayout() SaveGridLayout() Else - RestoreLayout() + If oColNotPartofLayout = False Then + RestoreLayout() + End If End If - Try LOGGER.Debug("Now Working on Groups..") 'GridView_Docs.OptionsBehavior.AutoExpandAllGroups = False @@ -1458,6 +1518,11 @@ Public Class frmMain GridView_Docs.Columns.Item("ICON").MinWidth = 24 GridView_Docs.Columns.Item("ICON").AppearanceCell.BackColor = Color.White GridView_Docs.Columns.Item("ICON").Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left + GridView_Docs.Columns.Item("CONV_YN").Visible = False + GridView_Docs.Columns.Item("CONVERSATION").MaxWidth = 24 + GridView_Docs.Columns.Item("CONVERSATION").MinWidth = 24 + 'GridView_Docs.Columns.Item("CONVERSATION").AppearanceCell.BackColor = Color.White + GridView_Docs.Columns.Item("CONVERSATION").Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left 'GridView_Docs.OptionsView.ShowIndicator = False LOGGER.Debug(" GridView_Docs.Columns loaded...") Try @@ -1481,7 +1546,7 @@ Public Class frmMain SaveGridLayout() If GridView_Docs.Columns.Count <= 2 Then LOGGER.Info("GridView_Docs.Columns.Count <= 2 - Reset_Gridlayout will be forced...", False) - Reset_GridLayout() + Reset_GridLayout(FormLoad) End If Else NO_WORKFLOWITEMS = True @@ -1513,10 +1578,10 @@ Public Class frmMain Private Sub TabellenlayoutZurücksetzenToolStripMenuItem_Click_1(sender As Object, e As EventArgs) Handles TabellenlayoutZurücksetzenToolStripMenuItem.Click - Reset_GridLayout() + Reset_GridLayout(False) End Sub - Sub Reset_GridLayout() + Sub Reset_GridLayout(FormLoad As Boolean) If GridControl_Docs.Visible = True And formopenClose = False Then RefreshHelper.SaveViewInfo() InResetlayout = True ' Layout zurücksetzen @@ -1525,7 +1590,7 @@ Public Class frmMain ' Ansicht neu laden LoadNavBar() - Decide_Load() + Decide_Load(FormLoad) InResetlayout = False RefreshHelper.LoadViewInfo() End Sub @@ -1704,7 +1769,7 @@ Public Class frmMain End Sub Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown - Decide_Load() + Decide_Load(True) Handling_DEBUG_USER() If RIBBON_COLOR_SCHEME = "BLUE" Then @@ -1842,7 +1907,7 @@ Public Class frmMain End If LoadNavBar() - Decide_Load() + Decide_Load(False) If GridControl_Docs.Visible = True And formopenClose = False Then RefreshHelper.LoadViewInfo() End Sub diff --git a/app/DD_PM_WINDREAM/frmValidator.Designer.vb b/app/DD_PM_WINDREAM/frmValidator.Designer.vb index bf7b7b4..f4fde51 100644 --- a/app/DD_PM_WINDREAM/frmValidator.Designer.vb +++ b/app/DD_PM_WINDREAM/frmValidator.Designer.vb @@ -85,7 +85,7 @@ Partial Class frmValidator Me.BbtnItm = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() Me.BarLinkContainerItem1 = New DevExpress.XtraBars.BarLinkContainerItem() - Me.bbtnitem_ConversationEnd = New DevExpress.XtraBars.BarButtonItem() + Me.btnitemConversationEnd = New DevExpress.XtraBars.BarButtonItem() Me.bbtnitem_ConversationNew = New DevExpress.XtraBars.BarButtonItem() Me.BarLinkContainerItem2 = New DevExpress.XtraBars.BarLinkContainerItem() Me.BarEditItem1 = New DevExpress.XtraBars.BarEditItem() @@ -94,6 +94,7 @@ Partial Class frmValidator Me.RepositoryItemComboBox2 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() Me.BarEditItem3 = New DevExpress.XtraBars.BarEditItem() Me.RepositoryItemComboBox3 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() + Me.btnitemConversation_reload = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPageConversations = New DevExpress.XtraBars.Ribbon.RibbonPageCategory() Me.RibbonPage3 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroupConv1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() @@ -104,7 +105,6 @@ Partial Class frmValidator Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() - Me.BarButtonItem5 = New DevExpress.XtraBars.BarButtonItem() CType(Me.SplitContainer2_DV_Chat, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer2_DV_Chat.SuspendLayout() CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -446,7 +446,7 @@ Partial Class frmValidator 'RibbonControl1 ' Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.bsiError, Me.bsiInformation, Me.bsiDocID, Me.BarButtonItemFileView, Me.BarButtonItem3, Me.BarButtonItem4, Me.bbtniRefresh, Me.bbtniRefreshSearches, Me.bbtniNext, Me.bbtniDelete, Me.bbtniAnnotation, Me.bsiInfo1, Me.bsiInfo2, Me.BbtnItm, Me.BarButtonItem2, Me.BarLinkContainerItem1, Me.bbtnitem_ConversationEnd, Me.bbtnitem_ConversationNew, Me.BarLinkContainerItem2, Me.BarEditItem1, Me.BarEditItem2, Me.BarEditItem3, Me.BarButtonItem5}) + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.bsiError, Me.bsiInformation, Me.bsiDocID, Me.BarButtonItemFileView, Me.BarButtonItem3, Me.BarButtonItem4, Me.bbtniRefresh, Me.bbtniRefreshSearches, Me.bbtniNext, Me.bbtniDelete, Me.bbtniAnnotation, Me.bsiInfo1, Me.bsiInfo2, Me.BbtnItm, Me.BarButtonItem2, Me.BarLinkContainerItem1, Me.btnitemConversationEnd, Me.bbtnitem_ConversationNew, Me.BarLinkContainerItem2, Me.BarEditItem1, Me.BarEditItem2, Me.BarEditItem3, Me.btnitemConversation_reload}) resources.ApplyResources(Me.RibbonControl1, "RibbonControl1") Me.RibbonControl1.MaxItemId = 26 Me.RibbonControl1.Name = "RibbonControl1" @@ -591,12 +591,12 @@ Partial Class frmValidator Me.BarLinkContainerItem1.Id = 18 Me.BarLinkContainerItem1.Name = "BarLinkContainerItem1" ' - 'bbtnitem_ConversationEnd + 'btnitemConversationEnd ' - resources.ApplyResources(Me.bbtnitem_ConversationEnd, "bbtnitem_ConversationEnd") - Me.bbtnitem_ConversationEnd.Id = 19 - Me.bbtnitem_ConversationEnd.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitem_ConversationEnd.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) - Me.bbtnitem_ConversationEnd.Name = "bbtnitem_ConversationEnd" + resources.ApplyResources(Me.btnitemConversationEnd, "btnitemConversationEnd") + Me.btnitemConversationEnd.Id = 19 + Me.btnitemConversationEnd.ImageOptions.SvgImage = CType(resources.GetObject("btnitemConversationEnd.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.btnitemConversationEnd.Name = "btnitemConversationEnd" ' 'bbtnitem_ConversationNew ' @@ -651,6 +651,13 @@ Partial Class frmValidator Me.RepositoryItemComboBox3.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(CType(resources.GetObject("RepositoryItemComboBox3.Buttons"), DevExpress.XtraEditors.Controls.ButtonPredefines))}) Me.RepositoryItemComboBox3.Name = "RepositoryItemComboBox3" ' + 'btnitemConversation_reload + ' + resources.ApplyResources(Me.btnitemConversation_reload, "btnitemConversation_reload") + Me.btnitemConversation_reload.Id = 25 + Me.btnitemConversation_reload.ImageOptions.SvgImage = CType(resources.GetObject("btnitemConversation_reload.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.btnitemConversation_reload.Name = "btnitemConversation_reload" + ' 'RibbonPageConversations ' Me.RibbonPageConversations.Name = "RibbonPageConversations" @@ -666,14 +673,13 @@ Partial Class frmValidator 'RibbonPageGroupConv1 ' Me.RibbonPageGroupConv1.ItemLinks.Add(Me.bbtnitem_ConversationNew) - Me.RibbonPageGroupConv1.ItemLinks.Add(Me.bbtnitem_ConversationEnd) + Me.RibbonPageGroupConv1.ItemLinks.Add(Me.btnitemConversation_reload) Me.RibbonPageGroupConv1.Name = "RibbonPageGroupConv1" resources.ApplyResources(Me.RibbonPageGroupConv1, "RibbonPageGroupConv1") ' 'RibbonPageGroupConv_Change ' Me.RibbonPageGroupConv_Change.ItemLinks.Add(Me.BarEditItem3) - Me.RibbonPageGroupConv_Change.ItemLinks.Add(Me.BarButtonItem5) Me.RibbonPageGroupConv_Change.Name = "RibbonPageGroupConv_Change" resources.ApplyResources(Me.RibbonPageGroupConv_Change, "RibbonPageGroupConv_Change") ' @@ -727,12 +733,6 @@ Partial Class frmValidator Me.RibbonPage2.Name = "RibbonPage2" resources.ApplyResources(Me.RibbonPage2, "RibbonPage2") ' - 'BarButtonItem5 - ' - resources.ApplyResources(Me.BarButtonItem5, "BarButtonItem5") - Me.BarButtonItem5.Id = 25 - Me.BarButtonItem5.Name = "BarButtonItem5" - ' 'frmValidator ' Me.Appearance.Options.UseFont = True @@ -838,7 +838,7 @@ Partial Class frmValidator Friend WithEvents Panel1 As Panel Friend WithEvents SplitContainer2_DV_Chat As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents BarLinkContainerItem1 As DevExpress.XtraBars.BarLinkContainerItem - Friend WithEvents bbtnitem_ConversationEnd As DevExpress.XtraBars.BarButtonItem + Friend WithEvents btnitemConversationEnd As DevExpress.XtraBars.BarButtonItem Friend WithEvents bbtnitem_ConversationNew As DevExpress.XtraBars.BarButtonItem Friend WithEvents RibbonPageConversations As DevExpress.XtraBars.Ribbon.RibbonPageCategory Friend WithEvents RibbonPage3 As DevExpress.XtraBars.Ribbon.RibbonPage @@ -852,5 +852,5 @@ Partial Class frmValidator Friend WithEvents BarEditItem3 As DevExpress.XtraBars.BarEditItem Friend WithEvents RepositoryItemComboBox3 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox Friend WithEvents ChatControl1 As DigitalData.Controls.ChatControl.ChatControl - Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents btnitemConversation_reload As DevExpress.XtraBars.BarButtonItem End Class diff --git a/app/DD_PM_WINDREAM/frmValidator.resx b/app/DD_PM_WINDREAM/frmValidator.resx index 44e385c..971106f 100644 --- a/app/DD_PM_WINDREAM/frmValidator.resx +++ b/app/DD_PM_WINDREAM/frmValidator.resx @@ -899,11 +899,11 @@ Konversationen - + Beende Konversation - + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl @@ -975,8 +975,29 @@ 200 - - BarButtonItem5 + + Neu laden + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAC4DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IlJlZnJlc2hfMV8iPg0KICAgIDxwYXRoIGQ9Ik0yNC41 + LDcuNUMyMi4zLDUuMywxOS4zLDQsMTYsNEMxMC4xLDQsNS4xLDguMyw0LjIsMTRoNC4xYzAuOS0zLjQs + NC02LDcuNy02YzIuMiwwLDQuMiwwLjksNS42LDIuNEwxOCwxNCAgIGg1LjdoNC4xSDI4VjRMMjQuNSw3 + LjV6IiBjbGFzcz0iR3JlZW4iIC8+DQogICAgPHBhdGggZD0iTTE2LjIsMjRjLTIuMiwwLTQuMi0wLjkt + NS42LTIuNGwzLjYtMy42SDguNEg0LjRINC4ydjEwbDMuNS0zLjVjMi4yLDIuMiw1LjIsMy41LDguNSwz + LjUgICBDMjIuMSwyOCwyNywyMy43LDI4LDE4aC00LjFDMjMsMjEuNCwxOS45LDI0LDE2LjIsMjR6IiBj + bGFzcz0iR3JlZW4iIC8+DQogIDwvZz4NCjwvc3ZnPgs= + 0, 0 @@ -988,7 +1009,7 @@ Beendete Konversationen - Start + Funktionen Konversationen @@ -1555,10 +1576,10 @@ DevExpress.XtraBars.BarLinkContainerItem, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - bbtnitem_ConversationEnd + + btnitemConversationEnd - + DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -1609,6 +1630,12 @@ DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + btnitemConversation_reload + + + DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + RibbonPageConversations @@ -1663,12 +1690,6 @@ DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - BarButtonItem5 - - - DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - frmValidator diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index ff3fbfd..0e772e2 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -67,6 +67,10 @@ Public Class frmValidator Private Right_Conversation_Stop As Boolean = False Private Right_Conversation_Message As Boolean = False + Private Conversation_User_Active As Boolean = False + Private ConversationQUDT_Delete As DataTable + Private Conversation_initialized As Boolean = False + Public FormLoaded As Boolean = False Private ItemWorked As Boolean = False Private Override As Boolean = False @@ -264,44 +268,29 @@ Public Class frmValidator RibbonPageGroupConv1.Enabled = False Dim oView As DataView = New DataView(DTDYNAMIC_RIGHTS) Debug.WriteLine(oView.Count, "oView before") - oView.RowFilter = "CONF_TITLE like '%CONVERSATION_%'" + oView.RowFilter = "CONF_TITLE like '%CONVERSATION_RIGHT%'" Debug.WriteLine(oView.Count, "oView after") If oView.Count > 0 Then + LOGGER.Debug("CONVERSATION-RIGHTS EXISTING") RibbonPageConversations.Visible = True - bbtnitem_ConversationNew.Visibility = DevExpress.XtraBars.BarItemVisibility.Never - bbtnitem_ConversationEnd.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + RibbonPageGroupConv1.Enabled = True + ConversationQUDT_Delete = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.Conversation_Delete") + oView = New DataView(DTDYNAMIC_RIGHTS) + oView.RowFilter = "CONF_TITLE = 'CONVERSATION_USER_ACTIVE'" + Conversation_initialized = Conversation_init() - Dim oConvRightStart - For Each oRow As DataRow In DTDYNAMIC_RIGHTS.Rows - If oRow.Item("CONF_TITLE").ToString.Contains("CONVERSATION_") Then - RibbonPageGroupConv1.Enabled = True - Select Case oRow.Item("CONF_VALUE") - Case "Start|Stop" - bbtnitem_ConversationNew.Visibility = DevExpress.XtraBars.BarItemVisibility.Always - bbtnitem_ConversationEnd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always - Right_Conversation_Add = True - Right_Conversation_Stop = True - Case "Start" - bbtnitem_ConversationNew.Visibility = DevExpress.XtraBars.BarItemVisibility.Always - Right_Conversation_Add = True - Case "Stop" - bbtnitem_ConversationEnd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always - Right_Conversation_Stop = True - End Select - End If + If oView.Count = 1 Then + Conversation_User_Active = True - Next - - oSQL = $"select * From VWIDB_CONVERSATION where IDB_OBJ_ID = {CURRENT_DOC_ID} and CONVERSATION_STATE = 'Started'" - DTConversations = ClassDatabase.Return_Datatable_ConStr(oSQL, CONNECTION_STRING_IDB, "ValidatorLoad-GetConversations") - If DTConversations.Rows.Count > 0 Then - 'CURRENT_DOC_ID - ChatControl1.Init(LOGCONFIG, CONNECTION_STRING_IDB, IIf(CONV_IDENTIFICATION = "Email", USER_EMAIL, USER_USERNAME), USER_USERNAME) - Conversations_load() Else - + SplitContainer2_DV_Chat.Collapsed = True + Conversation_User_Active = False + SplitContainer2_DV_Chat.Panel2.Visible = False End If + + Else + SplitContainer2_DV_Chat.Collapsed = True RibbonPageConversations.Visible = False End If @@ -344,30 +333,68 @@ Public Class frmValidator LOGGER.Info(">> error in LOADING(2) Profile-Data: " & ex.Message, True) End Try + End Sub + Sub Conversations_Init_Rights() + RibbonPageConversations.Visible = True + bbtnitem_ConversationNew.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + btnitemConversationEnd.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + btnitemConversationEnd.Enabled = True + btnitemConversation_reload.Enabled = True + + For Each oRow As DataRow In DTDYNAMIC_RIGHTS.Rows + If oRow.Item("CONF_TITLE").ToString = "CONVERSATION_RIGHT" Then + Select Case oRow.Item("CONF_VALUE") + Case "Admin" + bbtnitem_ConversationNew.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + btnitemConversationEnd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + Right_Conversation_Add = True + Right_Conversation_Stop = True + Case "Start" + bbtnitem_ConversationNew.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + Right_Conversation_Add = True + Case "Stop" + btnitemConversationEnd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + Right_Conversation_Stop = True + Case "AddMessage" + Right_Conversation_Message = True + End Select + 'ElseIf oRow.Item("CONF_TITLE").ToString = "CONVERSATION_USER_ACTIVE" Then + ' Conversation_User_Active = True + End If + Next + End Sub Sub Conversations_load() - ChatControl1.GetConversations(CURRENT_DOC_ID) Dim oConversations As List(Of String) oConversations = ChatControl1.GetConversations(CURRENT_DOC_ID) - If oConversations.Count = 1 Then + RibbonPageGroupConv_Change.Visible = True + If oConversations.Count = 0 Then RibbonPageGroupConv_Change.Visible = False - Else - RepositoryItemComboBox3.Items.Clear() - + End If + RepositoryItemComboBox3.Items.Clear() + Dim oActiveConv As Boolean = False RibbonPageGroupConv_Change.Visible = True For Each oconv As String In oConversations - If Not oconv.EndsWith("Started") Then - RepositoryItemComboBox3.Items.Add(oconv) - End If - - Next - End If - If oConversations.Count >= 1 Then - If Right_Conversation_Stop = True Then - bbtnitem_ConversationEnd.Enabled = True + If Not oconv.Contains("Started") Then + RepositoryItemComboBox3.Items.Add(oconv) End If - End If + If oconv.Contains("Started") Then + oActiveConv = True + End If + + Next + If oActiveConv = False Then + btnitemConversationEnd.Enabled = False + btnitemConversation_reload.Enabled = False + SplitContainer2_DV_Chat.Collapsed = True + Else + If SplitContainer2_DV_Chat.Panel2.Visible = False Then + SplitContainer2_DV_Chat.Panel2.Visible = True + End If + SplitContainer2_DV_Chat.Collapsed = False + End If + End Sub Private Sub frmValidation_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Try @@ -501,7 +528,7 @@ Public Class frmValidator bbtniRefreshSearches.Visibility = DevExpress.XtraBars.BarItemVisibility.Never End If Catch ex As Exception - MsgBox(ex.Message) + MsgBox(ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) End Try End Sub @@ -3525,7 +3552,7 @@ Public Class frmValidator Try Dim oDTRESULT_FOR_COLUMN As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oCONNID, $"oDEPENDING_CTRL_ID: {oDEPENDING_CTRL_ID}") If Not IsNothing(oDTRESULT_FOR_COLUMN) Then - LOGGER.Debug($"Trying to create a DropDown(FI) for oDEPENDING_CTRL_ID [{oDEPENDING_CTRL_ID}]..RowCount: [{oDTRESULT_FOR_COLUMN.Rows.Count}] ") + LOGGER.Debug($"Trying to create a DropDown(FIV) for oDEPENDING_CTRL_ID [{oDEPENDING_CTRL_ID}]..RowCount: [{oDTRESULT_FOR_COLUMN.Rows.Count}] ") For Each oControl As Control In pnldesigner.Controls If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_CTRL_ID Then ClassControlCreator.GridTables.Add(oDEPENDING_COLUMN, oDTRESULT_FOR_COLUMN) @@ -3537,12 +3564,12 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Warn($"Unexpected error in creating dropdown(FI) for oDEPENDING_GUID {oDEPENDING_CTRL_ID} an Column {oDEPENDING_COLUMN} " & ex.Message) + LOGGER.Warn($"Unexpected error in creating dropdown(FIV) for oDEPENDING_GUID {oDEPENDING_CTRL_ID} an Column {oDEPENDING_COLUMN} " & ex.Message) End Try Next Catch ex As Exception - LOGGER.Warn($"Unexpected error in creating dropdown(FI) for Grid: " & ex.Message) + LOGGER.Warn($"Unexpected error in creating dropdown(FIV) for Grid: " & ex.Message) End Try @@ -3669,7 +3696,7 @@ Public Class frmValidator Dim oMsgType Dim oQuestion Dim oTitle - + LOGGER.Debug("## btnFinish_continue ##") Try oMsgType = oDT_ACTIONS?.Rows(0).Item("MsgType") Catch ex As Exception @@ -3679,6 +3706,7 @@ Public Class frmValidator Try oQuestion = oDT_ACTIONS?.Rows(0).Item("Question") Catch ex As Exception + LOGGER.Warn($"btnFinishContinue - No QUESTION-Column in select-Result!") oQuestion = "" End Try Try @@ -3686,7 +3714,7 @@ Public Class frmValidator Catch ex As Exception oTitle = "" End Try - + LOGGER.Debug($"Case is: [{oMsgType.ToString.ToUpper}]") Select Case oMsgType.ToString.ToUpper Case "MsgboxResult".ToUpper @@ -3715,7 +3743,7 @@ Public Class frmValidator Return True Case Else MsgBox($"No valid action provided [{oMsgType}] in btnFinishContinue - Check Your log and inform the WorkflowTeam", MsgBoxStyle.Exclamation, "") - LOGGER.Warn($"No valid action provided [{oMsgType}] in btnFinishContinue - Check Your log and inform the WorkflowTeam") + LOGGER.Warn($"No valid action provided [{oMsgType}] in btnFinishContinue!") Return False End Select Catch ex As Exception @@ -5340,15 +5368,28 @@ Public Class frmValidator Dim Filename As String = String.Format($"DevExpressValidatorGridControl_{pProfilID}-{pControlID}.xml") Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename) End Function + Private Function Conversation_init() + Try + Dim oResult = ChatControl1.Init(LOGCONFIG, CONNECTION_STRING_IDB, IIf(CONV_IDENTIFICATION = "Email", USER_EMAIL, USER_USERNAME), USER_ID, USER_USERNAME, USER_LANGUAGE, ConversationQUDT_Delete, DTDYNAMIC_RIGHTS) + If oResult = True Then + Conversations_Init_Rights() + Conversations_load() + AddHandler ChatControl1.Conversation_Ended, AddressOf onConversationEnded + AddHandler ChatControl1.Conversation_UsersAdded_Success, AddressOf ConversationUsersAdded + End If + Return oResult + Catch ex As Exception + Return False + End Try + + End Function Private Sub bbtnitem_ConversationNew_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitem_ConversationNew.ItemClick Dim oDTUSER As DataTable For Each oRow As DataRow In DTDYNAMIC_RIGHTS.Rows - If oRow.Item("CONF_TITLE") = "NEW_CONVERSATION_USER_SELECT" Then Dim oSQL = oRow.Item("CONF_VALUE") oDTUSER = ClassDatabase.Return_Datatable(oSQL) - End If Next If Not IsNothing(oDTUSER) Then @@ -5357,27 +5398,31 @@ Public Class frmValidator Dim oResult = oForm.ShowDialog() If CURRENT_CONVERSATION_NEW <> 0 Then + If Not Conversation_initialized Then + Conversation_init() + End If + Conversations_Init_Rights() Conversations_load() + End If End If - End If - End Sub - Private Sub bbtnitem_ConversationEnd_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitem_ConversationEnd.ItemClick - If ChatControl1.CurrentConversation <> 0 Then + Private Sub bbtnitem_ConversationEnd_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnitemConversationEnd.ItemClick + If ChatControl1.CurrentConversationID <> 0 Then Dim oQuestion As DataTable = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.Conversation_Delete") If Not IsNothing(oQuestion) Then If oQuestion.Rows.Count = 1 Then Dim result As MsgBoxResult result = MessageBox.Show(oQuestion.Rows(0).Item("STRING1").ToString, oQuestion.Rows(0).Item("STRING2").ToString, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) If result = MsgBoxResult.Yes Then - Dim oSQL = $"EXEC PRIDB_END_CONVERSATION {ChatControl1.CurrentConversation}, '{USER_USERNAME}', '{USER_LANGUAGE}'" - If ClassDatabase.Execute_non_Query(oSQL, "EXEC PRIDB_END_CONVERSATION") = True Then - bbtnitem_ConversationEnd.Enabled = False + Dim oSQL = $"EXEC PRIDB_END_CONVERSATION {ChatControl1.CurrentConversationID}, '{USER_USERNAME}', '{USER_LANGUAGE}'" + If ClassDatabase.Execute_non_Query_ConStr(oSQL, CONNECTION_STRING_IDB, "EXEC PRIDB_END_CONVERSATION") = True Then + btnitemConversationEnd.Enabled = False SplitContainer2_DV_Chat.Collapsed = True + btnitemConversationEnd.Enabled = True Else MsgBox("Unexpected error in PRIDB_END_CONVERSATION - Check Your log!", MsgBoxStyle.Exclamation) End If @@ -5393,11 +5438,37 @@ Public Class frmValidator End Sub Private Sub RepositoryItemComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RepositoryItemComboBox3.SelectedIndexChanged + Try + Dim cBox As DevExpress.XtraEditors.ComboBoxEdit = sender + Dim item = cBox.EditValue + Dim oSplit() = item.ToString.Split("|") + Dim oConvID = oSplit(0) + ChatControl1.LoadConversation(oConvID) + btnitemConversationEnd.Enabled = False + If SplitContainer2_DV_Chat.IsPanelCollapsed Then + SplitContainer2_DV_Chat.Collapsed = False + If SplitContainer2_DV_Chat.Panel2.Visible = False Then + SplitContainer2_DV_Chat.Panel2.Visible = True + End If + End If + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) + End Try - Dim cBox As DevExpress.XtraEditors.ComboBoxEdit = sender - Dim item = cBox.EditValue - Dim oSplit() = item.ToString.Split("|") - Dim oConvID = oSplit(0) - ChatControl1.LoadConversation(oConvID) End Sub + + Private Sub BarButtonItem5_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnitemConversation_reload.ItemClick + Conversations_Init_Rights() + Conversations_load() + End Sub + Sub onConversationEnded() + Conversations_load() + btnitemConversationEnd.Enabled = False + SplitContainer2_DV_Chat.Collapsed = True + btnitemConversation_reload.Enabled = False + End Sub + Sub ConversationUsersAdded() + Conversations_load() + End Sub + End Class \ No newline at end of file