diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index 3e040a51..4a99e297 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -69,14 +69,19 @@ Public Class DocumentViewer ''' Terminate Viewer, freeing up resources and deleting temp files ''' Public Sub Done() - _logger.Debug("Done: Deleting Temp Files") - DeleteTempFiles() + Try + _logger.Debug("Done: Deleting Temp Files") + DeleteTempFiles() - _logger.Debug("Done: Closing Documents") - FreeFile() + _logger.Debug("Done: Closing Documents") + FreeFile() - _logger.Debug("Done: Triggering GC") - GC.Collect() + _logger.Debug("Done: Triggering GC") + GC.Collect() + Catch ex As Exception + _logger.Warn("Error while cleaning up DocumentViewer") + _logger.Error(ex) + End Try End Sub ''' @@ -125,8 +130,12 @@ Public Class DocumentViewer End Sub Public Sub CloseDocument() - GdViewer.CloseDocument() - UpdateMainUi() + Try + GdViewer.CloseDocument() + UpdateMainUi() + Catch ex As Exception + _logger.Error(ex) + End Try End Sub Public Sub DeleteTempFiles() @@ -162,13 +171,16 @@ Public Class DocumentViewer Dim oExtension As String = _Fileinfo.Extension.ToUpper Select Case _ViewerMode Case ViewerMode.RichText + _logger.Debug("Closing RichText Editor") RichEditControl1.CreateNewDocument() Case ViewerMode.Excel + _logger.Debug("Closing Excel Editor") SpreadsheetControl1.CreateNewDocument() Case Else - GdViewer.CloseDocument() + _logger.Debug("Closing GDPicture Viewer") + GdViewer.Dispose() End Select Catch ex As Exception diff --git a/Controls.DocumentViewer/My Project/AssemblyInfo.vb b/Controls.DocumentViewer/My Project/AssemblyInfo.vb index 08550cf3..bb768d52 100644 --- a/Controls.DocumentViewer/My Project/AssemblyInfo.vb +++ b/Controls.DocumentViewer/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Controls.LookupGrid/LookupControl3.vb b/Controls.LookupGrid/LookupControl3.vb index 14e052e2..86543c94 100644 --- a/Controls.LookupGrid/LookupControl3.vb +++ b/Controls.LookupGrid/LookupControl3.vb @@ -257,13 +257,26 @@ Public Class RepositoryItemLookupControl3 .PreventDuplicates = PreventDuplicates, .DataSource = DataSource, .SelectedValues = SelectedValues, - .StartPosition = FormStartPosition.Manual, - .Location = OwnerEdit.PointToScreen(New Point(OwnerEdit.Width, 0)) + .StartPosition = FormStartPosition.Manual } + Dim oScreen = Screen.FromControl(oForm) + oForm.Location = GetFormLocation(oForm.Height, oForm.Width, oScreen) Return oForm End Function + Private Function GetFormLocation(pFormHeight As Integer, pFormWidth As Integer, pScreen As Screen) As Point + ' This is the location on the same height like the Lookup Control + Dim oDefaultLocation = OwnerEdit.PointToScreen(New Point(OwnerEdit.Width, 0)) + Dim oScreenheight = pScreen.Bounds.Height + + If oScreenheight < (oDefaultLocation.Y + pFormHeight) Then + Return OwnerEdit.PointToScreen(New Point(OwnerEdit.Width, -pFormHeight + OwnerEdit.Height)) + End If + + Return oDefaultLocation + End Function + Protected Overrides Sub RaiseButtonClick(e As ButtonPressedEventArgs) MyBase.RaiseButtonClick(e) diff --git a/Controls.LookupGrid/My Project/AssemblyInfo.vb b/Controls.LookupGrid/My Project/AssemblyInfo.vb index 1aa17da3..84600904 100644 --- a/Controls.LookupGrid/My Project/AssemblyInfo.vb +++ b/Controls.LookupGrid/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Controls.LookupGrid/Resources/Strings.Designer.vb b/Controls.LookupGrid/Resources/Strings.Designer.vb index 8086d3d6..836aa51a 100644 --- a/Controls.LookupGrid/Resources/Strings.Designer.vb +++ b/Controls.LookupGrid/Resources/Strings.Designer.vb @@ -94,9 +94,9 @@ Namespace My.Resources ''' ''' Sucht eine lokalisierte Zeichenfolge, die Bitte wählen Sie einen oder mehrere Werte aus: ähnelt. ''' - Friend Shared ReadOnly Property PopupForm_TextMultiLine() As String + Friend Shared ReadOnly Property PopupForm_TextMultiselect() As String Get - Return ResourceManager.GetString("PopupForm_TextMultiLine", resourceCulture) + Return ResourceManager.GetString("PopupForm_TextMultiselect", resourceCulture) End Get End Property End Class diff --git a/Controls.LookupGrid/Resources/Strings.en.resx b/Controls.LookupGrid/Resources/Strings.en.resx index 5f7dada9..4de38075 100644 --- a/Controls.LookupGrid/Resources/Strings.en.resx +++ b/Controls.LookupGrid/Resources/Strings.en.resx @@ -126,7 +126,7 @@ Please choose a value: - + Please choose one or more values: \ No newline at end of file diff --git a/Controls.LookupGrid/Resources/Strings.resx b/Controls.LookupGrid/Resources/Strings.resx index f7c2d066..6915b57d 100644 --- a/Controls.LookupGrid/Resources/Strings.resx +++ b/Controls.LookupGrid/Resources/Strings.resx @@ -126,7 +126,7 @@ Bitte wählen Sie einen Wert aus: - + Bitte wählen Sie einen oder mehrere Werte aus: \ No newline at end of file diff --git a/Controls.LookupGrid/frmLookupGrid.vb b/Controls.LookupGrid/frmLookupGrid.vb index 15722d11..e0c43932 100644 --- a/Controls.LookupGrid/frmLookupGrid.vb +++ b/Controls.LookupGrid/frmLookupGrid.vb @@ -65,10 +65,10 @@ Public Class frmLookupGrid oCheckboxColumn.OptionsColumn.AllowFocus = False - Text = _R.GetString("PopupForm_Text") + Text = _R.GetString("PopupForm_TextMultiselect") _DataColumn = 1 Else - Text = _R.GetString("PopupForm_TextMultiLine") + Text = _R.GetString("PopupForm_Text") _DataColumn = 0 End If diff --git a/GUIs.Common/Base/BaseErrorHandler.vb b/GUIs.Common/Base/BaseErrorHandler.vb index 1acb2b71..dc79a380 100644 --- a/GUIs.Common/Base/BaseErrorHandler.vb +++ b/GUIs.Common/Base/BaseErrorHandler.vb @@ -27,7 +27,7 @@ Namespace Base Public Sub ShowErrorMessage(Exception As Exception, Origin As String, Message As String) _Logger.Error(Exception) - MessageBox.Show(Message, _Form.Text, MessageBoxButtons.OK, MessageBoxIcon.Error) + MessageBox.Show(Message & vbNewLine & Exception?.Message, _Form.Text & Origin, MessageBoxButtons.OK, MessageBoxIcon.Error) End Sub Public Sub ShowErrorMessage(Text As String) diff --git a/GUIs.Common/Common.vbproj b/GUIs.Common/Common.vbproj index 8ee7a874..61e7b302 100644 --- a/GUIs.Common/Common.vbproj +++ b/GUIs.Common/Common.vbproj @@ -374,5 +374,8 @@ + + + \ No newline at end of file diff --git a/GUIs.Common/DocumentResultList/Layout.vb b/GUIs.Common/DocumentResultList/Layout.vb index 39564d5f..11579920 100644 --- a/GUIs.Common/DocumentResultList/Layout.vb +++ b/GUIs.Common/DocumentResultList/Layout.vb @@ -22,13 +22,32 @@ Namespace DocumentResultList End Sub #Region "Saving and Restoring layout" + Public Sub Workspace_Save(pWorkspaceManager As WorkspaceManager) + Try + Dim oFileName = GetWorkspace_LayoutName() + pWorkspaceManager.SaveWorkspaces(oFileName) + Catch ex As Exception + Logger.Error(ex) + Logger.Info("Error while restoring Workspaces: " & ex.Message) + End Try + End Sub - + Public Sub Workspace_Restore(pWorkspaceManager As WorkspaceManager) + Try + Dim oFileName = GetWorkspace_LayoutName() + If IO.File.Exists(oFileName) Then + pWorkspaceManager.LoadWorkspaces(oFileName) + End If + Catch ex As Exception + Logger.Error(ex) + Logger.Info("Error while restoring Workspaces: " & ex.Message) + End Try + End Sub Public Sub DockManager_SaveLayout(pDockManager As DockManager) Try - Dim oXml As String = GetDockmanager_LayoutName() - pDockManager.SaveLayoutToXml(oXml) + Dim oFileName As String = GetDockmanager_LayoutName() + pDockManager.SaveLayoutToXml(oFileName) Catch ex As Exception Logger.Error(ex) Logger.Info("Error while saving GridLayout: " & ex.Message) @@ -37,8 +56,10 @@ Namespace DocumentResultList Public Sub DockManager_RestoreLayout(pDockManager As DockManager) Try - Dim oXml As String = GetDockmanager_LayoutName() - pDockManager.RestoreLayoutFromXml(oXml) + Dim oFilename As String = GetDockmanager_LayoutName() + If IO.File.Exists(oFilename) Then + pDockManager.RestoreLayoutFromXml(oFilename) + End If Catch ex As Exception Logger.Error(ex) Logger.Info("Error while restoring GridLayout: " & ex.Message) @@ -59,8 +80,8 @@ Namespace DocumentResultList Public Sub GridView_SaveLayout(pGridView As GridView) Try - Dim oXml As String = GetGrid_LayoutName(pGridView) - pGridView.SaveLayoutToXml(oXml, OptionsLayoutBase.FullLayout) + Dim oFileName As String = GetGrid_LayoutName(pGridView) + pGridView.SaveLayoutToXml(oFileName, OptionsLayoutBase.FullLayout) Catch ex As Exception Logger.Error(ex) Logger.Info("Error while saving GridLayout: " & ex.Message) @@ -79,6 +100,12 @@ Namespace DocumentResultList Return IO.Path.Combine(oDirectory, Filename) End Function + Public Function GetWorkspace_LayoutName() As String + Dim Filename As String = $"Workspace_UserLayout.xml" + Dim oDirectory As String = IO.Path.GetDirectoryName(Config.UserConfigPath) + Return IO.Path.Combine(oDirectory, Filename) + End Function + Public Sub LoadWindowLocationAndSize(ByRef pForm As Form) If Utils.IsVisibleOnAnyScreen(Config.Config.WindowLocation) Then If Utils.LocationIsVisible(Config.Config.WindowLocation) Then diff --git a/GUIs.Common/DocumentResultList/Watcher.vb b/GUIs.Common/DocumentResultList/Watcher.vb index fffe768b..4abf9df4 100644 --- a/GUIs.Common/DocumentResultList/Watcher.vb +++ b/GUIs.Common/DocumentResultList/Watcher.vb @@ -11,6 +11,7 @@ Namespace DocumentResultList Private WithEvents FileOpenTimer As New Timer Private FileEx As Modules.Filesystem.File + Private EnableWatching As Boolean = True ' TODO: Hashes for checking if the opened file was modified externally Private HashOriginalFile As String = Nothing @@ -47,16 +48,20 @@ Namespace DocumentResultList End Class Public Sub New(pLogConfig As LogConfig) + MyClass.New(pLogConfig, True) + End Sub + + Public Sub New(pLogConfig As LogConfig, pEnableWatching As Boolean) MyBase.New(pLogConfig) FileEx = New Modules.Filesystem.File(pLogConfig) + EnableWatching = pEnableWatching End Sub Public Async Function OpenDocument(pDocument As Document) As Task(Of Boolean) Dim oResult As Tuple(Of Integer, String) = Nothing If pDocument.FullPath IsNot Nothing AndAlso pDocument.FullPath.Trim <> String.Empty Then - ' TODO: DONT put into openfiles - oResult = Await OpenFileFromPath(pDocument) + oResult = OpenFileFromPath(pDocument) ElseIf pDocument.Extension IsNot Nothing AndAlso pDocument.Contents IsNot Nothing Then oResult = Await OpenFileFromByteArray(pDocument) @@ -68,6 +73,11 @@ Namespace DocumentResultList Return False End If + If EnableWatching = False Then + Logger.Debug("File was opened. Watching and Events are disabled.") + Return True + End If + Dim oProcessId = oResult.Item1 Dim oFilePath = oResult.Item2 @@ -122,10 +132,11 @@ Namespace DocumentResultList End Try End Function - Private Async Function OpenFileFromPath(pDocument As Document) As Task(Of Tuple(Of Integer, String)) + Private Function OpenFileFromPath(pDocument As Document) As Tuple(Of Integer, String) Try Dim oProcessId = DoOpenFile(pDocument.FullPath) - Return New Tuple(Of Integer, String)(oProcessId, pDocument.FullPath) + Dim oResult = New Tuple(Of Integer, String)(oProcessId, pDocument.FullPath) + Return oResult Catch ex As Exception Logger.Error(ex) @@ -134,19 +145,26 @@ Namespace DocumentResultList End Function Private Function DoOpenFile(pFilePath As String) As Integer - Dim _Process = New Process - _Process.StartInfo.FileName = pFilePath - _Process.EnableRaisingEvents = True + Try + Dim _Process = New Process + _Process.StartInfo.FileName = pFilePath + _Process.EnableRaisingEvents = True - AddHandler _Process.Exited, AddressOf Process_Exited + If EnableWatching = True Then + AddHandler _Process.Exited, AddressOf Process_Exited + End If - _Process.Start() + _Process.Start() - Return _Process.Id + Return _Process.Id + Catch ex As Exception + Logger.Error(ex) + Return Nothing + End Try End Function Private Function Process_Exited(sender As Object, e As EventArgs) As Boolean - Debug.WriteLine("Process is exited") + Logger.Debug("Process is exited") Dim oProcess As Process = sender Dim oOpenFile = OpenFiles. @@ -164,7 +182,7 @@ Namespace DocumentResultList ' All files that are currently processe/updated on the outside, ' will not be checked again. Dim oFileIsProcessed = ProcessedFiles.Contains(oOpenFile) - Debug.WriteLine($"File is processed: [{oFileIsProcessed}]") + Logger.Debug($"File is processed: [{oFileIsProcessed}]") If oFileIsProcessed = True Then Continue For @@ -173,8 +191,8 @@ Namespace DocumentResultList ' Check if the file is currently in use, and skip if it is. Dim oIsLocked = FileEx.TestFileIsLocked(oOpenFile.FilePath) Dim oIsExited = oOpenFile.Exited - Debug.WriteLine($"File is locked: [{oIsLocked}]") - Debug.WriteLine($"File is exited: [{oIsExited}]") + Logger.Debug($"File is locked: [{oIsLocked}]") + Logger.Debug($"File is exited: [{oIsExited}]") If oIsLocked Or oIsExited = False Then Continue For @@ -183,15 +201,15 @@ Namespace DocumentResultList ' If this point is reached, we assume the file was closed again after opening it. ' ------ - Debug.WriteLine($"File Closed") + Logger.Debug($"File Closed") ' Compute the current hash of the file and compare it with the one ' in the database. Dim oOldHash = oOpenFile.Document.FileHash Dim oNewHash = FileEx.GetChecksum(oOpenFile.FilePath) - Debug.WriteLine($"Old Hash: [{oOldHash}]") - Debug.WriteLine($"New Hash: [{oNewHash}]") + Logger.Debug($"Old Hash: [{oOldHash}]") + Logger.Debug($"New Hash: [{oNewHash}]") ' If the the file did not change, remove it from the watch list If oNewHash.Equals(oOldHash) Then @@ -203,7 +221,7 @@ Namespace DocumentResultList ' If this point is reached, we assume the file changed. ' ------ - Debug.WriteLine($"File Changed") + Logger.Debug($"File Changed") ' The File changed, so mark the file as being processed/updated ' and notify any listeners of the FileChanged event diff --git a/GUIs.Common/GridBuilder.vb b/GUIs.Common/GridBuilder.vb index d62bc6cd..52d6072d 100644 --- a/GUIs.Common/GridBuilder.vb +++ b/GUIs.Common/GridBuilder.vb @@ -82,6 +82,25 @@ Public Class GridBuilder Return Me End Function + Public Function WithFontSizeDelta(pFontSizeDelta As Integer) As GridBuilder + For Each oGridView In Views + WithFontSizeDelta(oGridView, pFontSizeDelta) + Next + + Return Me + End Function + + Public Function WithFontSizeDelta(pGridView As GridView, pFontSizeDelta As Integer) As GridBuilder + pGridView.Appearance.Row.FontSizeDelta = pFontSizeDelta + pGridView.Appearance.GroupRow.FontSizeDelta = pFontSizeDelta + pGridView.Appearance.GroupPanel.FontSizeDelta = pFontSizeDelta + pGridView.Appearance.GroupFooter.FontSizeDelta = pFontSizeDelta + pGridView.Appearance.FilterPanel.FontSizeDelta = pFontSizeDelta + pGridView.Appearance.HeaderPanel.FontSizeDelta = pFontSizeDelta + + Return Me + End Function + Public Function WithClipboardHandler() As GridBuilder For Each oGridView In Views WithClipboardHandler(oGridView) diff --git a/GUIs.Common/My Project/AssemblyInfo.vb b/GUIs.Common/My Project/AssemblyInfo.vb index b5465ada..61893c01 100644 --- a/GUIs.Common/My Project/AssemblyInfo.vb +++ b/GUIs.Common/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/My Project/Resources.Designer.vb b/GUIs.Common/My Project/Resources.Designer.vb index 8c3a8099..876316be 100644 --- a/GUIs.Common/My Project/Resources.Designer.vb +++ b/GUIs.Common/My Project/Resources.Designer.vb @@ -130,6 +130,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property business_world() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("business_world", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' diff --git a/GUIs.Common/My Project/Resources.resx b/GUIs.Common/My Project/Resources.resx index 752211a8..162cdbc7 100644 --- a/GUIs.Common/My Project/Resources.resx +++ b/GUIs.Common/My Project/Resources.resx @@ -145,6 +145,9 @@ ..\Resources\ZooFlow-Vergroessern.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\Open_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -157,8 +160,8 @@ ..\Resources\jpg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\xls.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\editcolors.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\ppt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -166,14 +169,11 @@ ..\Resources\copy.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\zoom_more.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\refreshallpivottable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\columnheaders.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\insertpagecount.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\enablescrolling.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -181,9 +181,6 @@ ..\Resources\title.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\clearpivottable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\singlepageview1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -196,8 +193,8 @@ ..\Resources\singlepageview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\clearpivottable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\categorize.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -205,11 +202,17 @@ ..\Resources\tiff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\editcolors.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\columnheaders.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\xls.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\dwg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -229,13 +232,13 @@ ..\Resources\save1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\zoom_more.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Article_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\insertpagecount.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\business_world.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a \ No newline at end of file diff --git a/GUIs.Common/Resources/business_world.svg b/GUIs.Common/Resources/business_world.svg new file mode 100644 index 00000000..b7c75a44 --- /dev/null +++ b/GUIs.Common/Resources/business_world.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/GUIs.Common/frmDocumentResultList.Designer.vb b/GUIs.Common/frmDocumentResultList.Designer.vb index 9a3c3852..a0773de0 100644 --- a/GUIs.Common/frmDocumentResultList.Designer.vb +++ b/GUIs.Common/frmDocumentResultList.Designer.vb @@ -21,7 +21,7 @@ Partial Class frmDocumentResultList Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmDocumentResultList)) - Dim FadeTransition1 As DevExpress.Utils.Animation.FadeTransition = New DevExpress.Utils.Animation.FadeTransition() + Dim FadeTransition2 As DevExpress.Utils.Animation.FadeTransition = New DevExpress.Utils.Animation.FadeTransition() Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl() Me.GridControl1 = New DevExpress.XtraGrid.GridControl() Me.GridView1 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridView() @@ -82,6 +82,7 @@ Partial Class frmDocumentResultList Me.RibbonPageGroup_Layout = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit() Me.RepositoryItemTextEdit2 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit() + Me.RepositoryItemSearchControl1 = New DevExpress.XtraEditors.Repository.RepositoryItemSearchControl() Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl() Me.GridControl2 = New DevExpress.XtraGrid.GridControl() @@ -96,7 +97,7 @@ Partial Class frmDocumentResultList Me.DockManager1 = New DevExpress.XtraBars.Docking.DockManager(Me.components) Me.DockPanelFileList = New DevExpress.XtraBars.Docking.DockPanel() Me.DockPanel2_Container = New DevExpress.XtraBars.Docking.ControlContainer() - Me.panelContainer1 = New DevExpress.XtraBars.Docking.DockPanel() + Me.panelContainerStatus = New DevExpress.XtraBars.Docking.DockPanel() Me.DockPanelStatus = New DevExpress.XtraBars.Docking.DockPanel() Me.ControlContainer1 = New DevExpress.XtraBars.Docking.ControlContainer() Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() @@ -124,6 +125,7 @@ Partial Class frmDocumentResultList CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RepositoryItemSearchControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl2.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerControl2.Panel1.SuspendLayout() @@ -137,7 +139,7 @@ Partial Class frmDocumentResultList CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).BeginInit() Me.DockPanelFileList.SuspendLayout() Me.DockPanel2_Container.SuspendLayout() - Me.panelContainer1.SuspendLayout() + Me.panelContainerStatus.SuspendLayout() Me.DockPanelStatus.SuspendLayout() Me.ControlContainer1.SuspendLayout() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -216,12 +218,12 @@ Partial Class frmDocumentResultList Me.RibbonControl.ExpandCollapseItem.Id = 0 Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.SwitchMainContainerHorizontal, Me.SwitchDetailContainerHorizontal, Me.BarButtonItemExportGrid1, Me.BarStaticItem1, Me.labelResultCount, Me.BarButtonBack, Me.BarButtonResetLayout, Me.labelCriticalError, Me.labelWarning, Me.MenuItemFileOpen, Me.MenuItemPropertiesIDB, Me.MenuItemFolderOpen, Me.MenuItemFilepathCopy, Me.MenuItemFolderpathCopy, Me.MenuItemProperties, Me.MenuItemsOpenFileZooFlow, Me.MenuItemPropertiesZooFlow, Me.ButtonRefresh, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.BarButtonItem6, Me.MenuItemStartAdhocWorkflow, Me.MenuItemCheckInFile, Me.MenuItemCheckOutFile, Me.MenuItemVersionFile, Me.chkGridShowQuickfilter, Me.chkGridShowGrouping, Me.chkGridShowTitle, Me.MenuItemSaveProperties, Me.BarButtonItem11, Me.BarWorkspaceMenuItem1}) resources.ApplyResources(Me.RibbonControl, "RibbonControl") - Me.RibbonControl.MaxItemId = 48 + Me.RibbonControl.MaxItemId = 49 Me.RibbonControl.Name = "RibbonControl" Me.RibbonControl.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageCategoryFile, Me.RibbonPageCategoryAttribute}) Me.RibbonControl.PageHeaderItemLinks.Add(Me.BarWorkspaceMenuItem1) Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPageStart, Me.RibbonPage2}) - Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2}) + Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2, Me.RepositoryItemSearchControl1}) Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl.ShowToolbarCustomizeItem = False Me.RibbonControl.StatusBar = Me.RibbonStatusBar @@ -471,15 +473,17 @@ Partial Class frmDocumentResultList ' 'BarWorkspaceMenuItem1 ' - resources.ApplyResources(Me.BarWorkspaceMenuItem1, "BarWorkspaceMenuItem1") Me.BarWorkspaceMenuItem1.Id = 45 + Me.BarWorkspaceMenuItem1.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.business_world Me.BarWorkspaceMenuItem1.Name = "BarWorkspaceMenuItem1" + Me.BarWorkspaceMenuItem1.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText Me.BarWorkspaceMenuItem1.WorkspaceManager = Me.WorkspaceManager1 + Me.BarWorkspaceMenuItem1.WorkspacesSortMode = DevExpress.XtraBars.WorspacesSortMode.Usage ' 'WorkspaceManager1 ' Me.WorkspaceManager1.TargetControl = Me - Me.WorkspaceManager1.TransitionType = FadeTransition1 + Me.WorkspaceManager1.TransitionType = FadeTransition2 ' 'RibbonPageCategoryFile ' @@ -616,6 +620,12 @@ Partial Class frmDocumentResultList resources.ApplyResources(Me.RepositoryItemTextEdit2, "RepositoryItemTextEdit2") Me.RepositoryItemTextEdit2.Name = "RepositoryItemTextEdit2" ' + 'RepositoryItemSearchControl1 + ' + resources.ApplyResources(Me.RepositoryItemSearchControl1, "RepositoryItemSearchControl1") + Me.RepositoryItemSearchControl1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Repository.ClearButton(), New DevExpress.XtraEditors.Repository.SearchButton()}) + Me.RepositoryItemSearchControl1.Name = "RepositoryItemSearchControl1" + ' 'RibbonStatusBar ' Me.RibbonStatusBar.ItemLinks.Add(Me.labelResultCount) @@ -719,7 +729,7 @@ Partial Class frmDocumentResultList 'DockManager1 ' Me.DockManager1.Form = Me - Me.DockManager1.RootPanels.AddRange(New DevExpress.XtraBars.Docking.DockPanel() {Me.DockPanelFileList, Me.panelContainer1, Me.DockPanelDocViewer}) + Me.DockManager1.RootPanels.AddRange(New DevExpress.XtraBars.Docking.DockPanel() {Me.DockPanelFileList, Me.panelContainerStatus, Me.DockPanelDocViewer}) Me.DockManager1.TopZIndexControls.AddRange(New String() {"DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.MenuStrip", "System.Windows.Forms.StatusStrip", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl", "DevExpress.XtraBars.Navigation.OfficeNavigationBar", "DevExpress.XtraBars.Navigation.TileNavPane", "DevExpress.XtraBars.TabFormControl", "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl"}) ' 'DockPanelFileList @@ -738,17 +748,17 @@ Partial Class frmDocumentResultList resources.ApplyResources(Me.DockPanel2_Container, "DockPanel2_Container") Me.DockPanel2_Container.Name = "DockPanel2_Container" ' - 'panelContainer1 + 'panelContainerStatus ' - Me.panelContainer1.ActiveChild = Me.DockPanelStatus - Me.panelContainer1.Controls.Add(Me.DockPanelStatus) - Me.panelContainer1.Controls.Add(Me.DockPanelMetadata) - Me.panelContainer1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right - Me.panelContainer1.ID = New System.Guid("3d77391e-21ef-4574-8521-d9f3b7468ebe") - resources.ApplyResources(Me.panelContainer1, "panelContainer1") - Me.panelContainer1.Name = "panelContainer1" - Me.panelContainer1.OriginalSize = New System.Drawing.Size(275, 200) - Me.panelContainer1.Tabbed = True + Me.panelContainerStatus.ActiveChild = Me.DockPanelStatus + Me.panelContainerStatus.Controls.Add(Me.DockPanelStatus) + Me.panelContainerStatus.Controls.Add(Me.DockPanelMetadata) + Me.panelContainerStatus.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right + Me.panelContainerStatus.ID = New System.Guid("3d77391e-21ef-4574-8521-d9f3b7468ebe") + resources.ApplyResources(Me.panelContainerStatus, "panelContainerStatus") + Me.panelContainerStatus.Name = "panelContainerStatus" + Me.panelContainerStatus.OriginalSize = New System.Drawing.Size(275, 200) + Me.panelContainerStatus.Tabbed = True ' 'DockPanelStatus ' @@ -759,7 +769,7 @@ Partial Class frmDocumentResultList resources.ApplyResources(Me.DockPanelStatus, "DockPanelStatus") Me.DockPanelStatus.Name = "DockPanelStatus" Me.DockPanelStatus.Options.ShowCloseButton = False - Me.DockPanelStatus.OriginalSize = New System.Drawing.Size(268, 434) + Me.DockPanelStatus.OriginalSize = New System.Drawing.Size(268, 413) ' 'ControlContainer1 ' @@ -800,7 +810,7 @@ Partial Class frmDocumentResultList Me.Root.GroupBordersVisible = False Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup1, Me.EmptySpaceItem1}) Me.Root.Name = "Root" - Me.Root.Size = New System.Drawing.Size(268, 413) + Me.Root.Size = New System.Drawing.Size(268, 434) Me.Root.TextVisible = False ' 'LayoutControlGroup1 @@ -818,7 +828,7 @@ Partial Class frmDocumentResultList Me.LayoutControlItem1.Name = "LayoutControlItem1" Me.LayoutControlItem1.Size = New System.Drawing.Size(224, 24) resources.ApplyResources(Me.LayoutControlItem1, "LayoutControlItem1") - Me.LayoutControlItem1.TextSize = New System.Drawing.Size(126, 13) + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(137, 13) ' 'LayoutControlItem2 ' @@ -827,14 +837,14 @@ Partial Class frmDocumentResultList Me.LayoutControlItem2.Name = "LayoutControlItem2" Me.LayoutControlItem2.Size = New System.Drawing.Size(224, 24) resources.ApplyResources(Me.LayoutControlItem2, "LayoutControlItem2") - Me.LayoutControlItem2.TextSize = New System.Drawing.Size(126, 13) + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(137, 13) ' 'EmptySpaceItem1 ' Me.EmptySpaceItem1.AllowHotTrack = False Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 93) Me.EmptySpaceItem1.Name = "EmptySpaceItem1" - Me.EmptySpaceItem1.Size = New System.Drawing.Size(248, 300) + Me.EmptySpaceItem1.Size = New System.Drawing.Size(248, 321) Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) ' 'DockPanelMetadata @@ -845,7 +855,7 @@ Partial Class frmDocumentResultList resources.ApplyResources(Me.DockPanelMetadata, "DockPanelMetadata") Me.DockPanelMetadata.Name = "DockPanelMetadata" Me.DockPanelMetadata.Options.ShowCloseButton = False - Me.DockPanelMetadata.OriginalSize = New System.Drawing.Size(268, 434) + Me.DockPanelMetadata.OriginalSize = New System.Drawing.Size(268, 413) ' 'DockPanel3_Container ' @@ -883,9 +893,9 @@ Partial Class frmDocumentResultList Me.AllowFormGlass = DevExpress.Utils.DefaultBoolean.[True] resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.DockPanelFileList) Me.Controls.Add(Me.DockPanelDocViewer) - Me.Controls.Add(Me.panelContainer1) + Me.Controls.Add(Me.panelContainerStatus) + Me.Controls.Add(Me.DockPanelFileList) Me.Controls.Add(Me.RibbonStatusBar) Me.Controls.Add(Me.RibbonControl) Me.IconOptions.Icon = CType(resources.GetObject("frmDocumentResultList.IconOptions.Icon"), System.Drawing.Icon) @@ -904,6 +914,7 @@ Partial Class frmDocumentResultList CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RepositoryItemSearchControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainerControl2.Panel1, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerControl2.Panel1.ResumeLayout(False) CType(Me.SplitContainerControl2.Panel2, System.ComponentModel.ISupportInitialize).EndInit() @@ -917,7 +928,7 @@ Partial Class frmDocumentResultList CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).EndInit() Me.DockPanelFileList.ResumeLayout(False) Me.DockPanel2_Container.ResumeLayout(False) - Me.panelContainer1.ResumeLayout(False) + Me.panelContainerStatus.ResumeLayout(False) Me.DockPanelStatus.ResumeLayout(False) Me.ControlContainer1.ResumeLayout(False) CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() @@ -1022,7 +1033,7 @@ Partial Class frmDocumentResultList Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents DockPanelStatus As DevExpress.XtraBars.Docking.DockPanel Friend WithEvents ControlContainer1 As DevExpress.XtraBars.Docking.ControlContainer - Friend WithEvents panelContainer1 As DevExpress.XtraBars.Docking.DockPanel + Friend WithEvents panelContainerStatus As DevExpress.XtraBars.Docking.DockPanel Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl Friend WithEvents txtCheckedOutWho As DevExpress.XtraEditors.TextEdit Friend WithEvents dateCheckedOutWhen As DevExpress.XtraEditors.DateEdit @@ -1031,4 +1042,5 @@ Partial Class frmDocumentResultList Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem + Friend WithEvents RepositoryItemSearchControl1 As DevExpress.XtraEditors.Repository.RepositoryItemSearchControl End Class diff --git a/GUIs.Common/frmDocumentResultList.resx b/GUIs.Common/frmDocumentResultList.resx index f7aaa212..4a34bfa3 100644 --- a/GUIs.Common/frmDocumentResultList.resx +++ b/GUIs.Common/frmDocumentResultList.resx @@ -474,9 +474,6 @@ Spaltenauswahl - - BarWorkspaceMenuItem1 - 456, 22 @@ -489,82 +486,6 @@ 1189, 671 - - 3, 46 - - - 578, 442 - - - - 0 - - - DockPanel2_Container - - - DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - DockPanelFileList - - - 0 - - - 0, 158 - - - 585, 491 - - - Ergebnisse - - - DockPanelFileList - - - DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - $this - - - 0 - - - Fill - - - 0, 0 - - - 323, 441 - - - 0 - - - DocumentViewer1 - - - DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.6.7.0, Culture=neutral, PublicKeyToken=null - - - DockPanel1_Container - - - 0 - - - 3, 46 - - - 323, 441 - - - 0 - DockPanel1_Container @@ -581,7 +502,7 @@ 585, 158 - 329, 491 + 329, 489 Vorschau @@ -596,103 +517,6 @@ $this - 1 - - - 162, 45 - - - 82, 20 - - - 4 - - - txtCheckedOutWho - - - DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - LayoutControl1 - - - 4 - - - - - - 162, 69 - - - - Combo - - - Combo - - - 82, 20 - - - 5 - - - dateCheckedOutWhen - - - DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - LayoutControl1 - - - 5 - - - Fill - - - 0, 0 - - - Bearbeitet von - - - In Bearbeitung genommen - - - In Bearbeitung - - - 268, 413 - - - 0 - - - LayoutControl1 - - - LayoutControl1 - - - DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ControlContainer1 - - - 0 - - - 0, 0 - - - 268, 413 - - 0 @@ -708,10 +532,10 @@ 0 - 4, 46 + 4, 26 - 268, 413 + 268, 434 Status @@ -723,44 +547,11 @@ DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - panelContainer1 + panelContainerStatus 0 - - Fill - - - 0, 0 - - - 268, 413 - - - 0 - - - CtrlObjectPropertyDialog - - - DigitalData.GUIs.Common.ctrlObjectPropertyDialog, DigitalData.GUIs.Common, Version=1.9.1.0, Culture=neutral, PublicKeyToken=null - - - DockPanel3_Container - - - 0 - - - 0, 0 - - - 268, 413 - - - 0 - DockPanel3_Container @@ -774,10 +565,10 @@ 0 - 4, 46 + 4, 26 - 268, 413 + 268, 434 Eigenschaften @@ -789,37 +580,70 @@ DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - panelContainer1 + panelContainerStatus 1 - + 914, 158 - - 275, 491 + + 275, 489 - + panelContainer1 - - panelContainer1 + + panelContainerStatus - + DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - + $this - + + 1 + + + DockPanel2_Container + + + DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + DockPanelFileList + + + 0 + + + 0, 158 + + + 585, 489 + + + Ergebnisse + + + DockPanelFileList + + + DevExpress.XtraBars.Docking.DockPanel, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + $this + + 2 - 0, 649 + 0, 647 - 1189, 22 + 1189, 24 RibbonStatusBar @@ -1258,6 +1082,12 @@ DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + RepositoryItemSearchControl1 + + + DevExpress.XtraEditors.Repository.RepositoryItemSearchControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + GridView2 @@ -1345,66 +1175,28 @@ 0, 0 - - Dokument - - - Dateien und Ordner - - - Aktionen 1 - - - Workflow - - - Bearbeiten - - - Aktionen 2 - Datei - - Attribute - - - Aktionen - Attribute - - Navigation - - - Export - - - Aktualisieren - Start - - Tabellen Einstellungen - - - RibbonPageGroup1 - - - Layout - Layout + False False + + False + 1189, 158 @@ -1421,7 +1213,7 @@ 4 - 568, 442 + 568, 460 0 @@ -1592,7 +1384,7 @@ 1 - 578, 442 + 578, 460 2 @@ -1612,6 +1404,72 @@ 0 + + Aktionen 1 + + + Dokument + + + Dateien und Ordner + + + Aktionen 2 + + + Workflow + + + Bearbeiten + + + Aktionen + + + Attribute + + + Navigation + + + Export + + + Aktualisieren + + + Tabellen Einstellungen + + + RibbonPageGroup1 + + + Layout + + + Fill + + + 0, 0 + + + 323, 459 + + + 0 + + + DocumentViewer1 + + + DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.6.8.0, Culture=neutral, PublicKeyToken=null + + + DockPanel1_Container + + + 0 + 12, 27 @@ -1621,6 +1479,238 @@ 155, 22 + + 3, 26 + + + 578, 460 + + + 0 + + + DockPanel2_Container + + + DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + DockPanelFileList + + + 0 + + + LayoutControl1 + + + DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ControlContainer1 + + + 0 + + + 0, 0 + + + 268, 434 + + + 0 + + + ControlContainer1 + + + DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + DockPanelStatus + + + 0 + + + 173, 45 + + + 71, 20 + + + 4 + + + txtCheckedOutWho + + + DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + LayoutControl1 + + + 4 + + + + + + 173, 69 + + + + Combo + + + Combo + + + 71, 20 + + + 5 + + + dateCheckedOutWhen + + + DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + LayoutControl1 + + + 5 + + + Fill + + + 0, 0 + + + 268, 434 + + + 0 + + + LayoutControl1 + + + LayoutControl1 + + + DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ControlContainer1 + + + 0 + + + In Bearbeitung + + + Bearbeitet von + + + In Bearbeitung genommen + + + CtrlObjectPropertyDialog + + + DigitalData.GUIs.Common.ctrlObjectPropertyDialog, DigitalData.GUIs.Common, Version=1.10.0.0, Culture=neutral, PublicKeyToken=null + + + DockPanel3_Container + + + 0 + + + 0, 0 + + + 268, 434 + + + 0 + + + DockPanel3_Container + + + DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + DockPanelMetadata + + + 0 + + + Fill + + + 0, 0 + + + 268, 434 + + + 0 + + + CtrlObjectPropertyDialog + + + DigitalData.GUIs.Common.ctrlObjectPropertyDialog, DigitalData.GUIs.Common, Version=1.10.0.0, Culture=neutral, PublicKeyToken=null + + + DockPanel3_Container + + + 0 + + + DocumentViewer1 + + + DigitalData.Controls.DocumentViewer.DocumentViewer, DigitalData.Controls.DocumentViewer, Version=1.6.8.0, Culture=neutral, PublicKeyToken=null + + + DockPanel1_Container + + + 0 + + + 3, 26 + + + 323, 459 + + + 0 + + + DockPanel1_Container + + + DevExpress.XtraBars.Docking.ControlContainer, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + DockPanelDocViewer + + + 0 + 290, 22 diff --git a/GUIs.Common/frmDocumentResultList.vb b/GUIs.Common/frmDocumentResultList.vb index 1cd1b6fe..0ca3d276 100644 --- a/GUIs.Common/frmDocumentResultList.vb +++ b/GUIs.Common/frmDocumentResultList.vb @@ -37,22 +37,22 @@ Public Class frmDocumentResultList ' Helper Classes Private Client As Client - Private Documentloader As DocumentResultList.Loader + Private Documentloader As Loader Private ControlManager As AttributeControls Private CheckoutManager As CheckInOut - Private ReadOnly Config As ConfigManager(Of DocumentResultList.Config) + Private ReadOnly Config As ConfigManager(Of Config) Private ReadOnly Environment As Environment Private ReadOnly Filesystem As Modules.Filesystem.File Private ReadOnly GridBuilder As GridBuilder Private ReadOnly FileEx As Modules.Windows.File Private ReadOnly Helpers As DocumentResultList.Helpers - Private ReadOnly Params As DocumentResultList.Params - Private ReadOnly LayoutManager As DocumentResultList.Layout - Private WithEvents Watcher As DocumentResultList.Watcher + Private ReadOnly Params As Params + Private ReadOnly LayoutManager As Layout + Private WithEvents Watcher As Watcher ' Runtime variables - Private Property ResultLists As List(Of DocumentResultList.DocumentResult) + Private Property ResultLists As List(Of DocumentResult) Private IsLoading As Boolean = True Private _DragBoxFromMouseDown As Rectangle @@ -72,7 +72,11 @@ Public Class frmDocumentResultList Private Property ViewList As List(Of BandedGridView) Private Property OperationMode As OperationMode Implements IResultForm.OperationMode - + Public ReadOnly Property Config1 As ConfigManager(Of Config) + Get + Return Config + End Get + End Property Public Event NeedsRefresh As EventHandler(Of Integer) Implements IResultForm.NeedsRefresh Public Event ResultsRefreshed As EventHandler(Of List(Of DocumentResultList.DocumentResult)) @@ -105,7 +109,6 @@ Public Class frmDocumentResultList Filesystem = New Modules.Filesystem.File(pLogConfig) GridBuilder = New GridBuilder(New List(Of GridView) From {GridView1, GridView2, GridView3}) FileEx = New Modules.Windows.File(pLogConfig) - Watcher = New Watcher(pLogConfig) LayoutManager = New Layout(pLogConfig, Config, New List(Of GridView) From {GridView1, GridView2, GridView3}) UserLanguage = Utils.NotNull(Environment.User.Language, State.UserState.LANG_EN_US) @@ -137,7 +140,13 @@ Public Class frmDocumentResultList End If - Documentloader = New DocumentResultList.Loader(LogConfig, OperationMode, Client, Environment.User) + Documentloader = New Loader(LogConfig, OperationMode, Client, Environment.User) + + If OperationMode = OperationMode.NoAppServer Then + Watcher = New Watcher(LogConfig, pEnableWatching:=False) + Else + Watcher = New Watcher(LogConfig) + End If If Params.WindowTitle <> "" Then Text = $"{Text} - {Params.WindowTitle}" @@ -151,29 +160,34 @@ Public Class frmDocumentResultList 'Load config LayoutManager.LoadWindowLocationAndSize(Me) LayoutManager.DockManager_RestoreLayout(DockManager1) - SplitContainerControl1.SplitterPosition = Config.Config.SplitContainer1Distance - SwitchMainContainerHorizontal.Checked = Config.Config.SplitContainer1Horizontal - SplitContainerControl2.SplitterPosition = Config.Config.SplitContainer2Distance - SwitchDetailContainerHorizontal.Checked = Config.Config.SplitContainer2Horizontal + LayoutManager.Workspace_Restore(WorkspaceManager1) + + SplitContainerControl1.SplitterPosition = Config1.Config.SplitContainer1Distance + SwitchMainContainerHorizontal.Checked = Config1.Config.SplitContainer1Horizontal + SplitContainerControl2.SplitterPosition = Config1.Config.SplitContainer2Distance + SwitchDetailContainerHorizontal.Checked = Config1.Config.SplitContainer2Horizontal ' Hide options relating to a filepath for zooflow If OperationMode = OperationMode.ZooFlow Then RibbonPageGroupFilesystem.Visible = False - Else - RibbonPageGroupFilesystem.Visible = False End If If OperationMode = OperationMode.NoAppServer Then - DockPanelMetadata.Visibility = Docking.DockVisibility.Hidden + RibbonPageCategoryAttribute.Visible = False + RibbonPageActions2.Visible = False End If - If OperationMode <> OperationMode.NoAppServer Then + If OperationMode = OperationMode.ZooFlow Or OperationMode = OperationMode.WithAppServer Then CtrlObjectPropertyDialog.Initialize(LogConfig, Me, Client, Environment) SwitchMainContainerHorizontal.Visibility = BarItemVisibility.Never SwitchDetailContainerHorizontal.Visibility = BarItemVisibility.Never End If + If OperationMode = OperationMode.NoAppServer Then + panelContainerStatus.Visibility = Docking.DockVisibility.Hidden + End If + UpdateTotalResults() LoadGridDataAndLayout() @@ -184,7 +198,7 @@ Public Class frmDocumentResultList chkGridShowTitle.Checked = LayoutManager.GetBandTitleVisible() Catch ex As Exception - ErrorHandler.ShowErrorMessage(ex, "Error while loading results", "Form Load") + ErrorHandler.ShowErrorMessage(ex, "Form Load", "Error while loading results") Finally IsLoading = False @@ -195,6 +209,7 @@ Public Class frmDocumentResultList Private Sub frmDocumentResultList_Closing(sender As Object, e As CancelEventArgs) Handles Me.FormClosing Try LayoutManager.GridView_SaveLayout(_ActiveGrid.MainView) + LayoutManager.Workspace_Save(WorkspaceManager1) LayoutManager.DockManager_SaveLayout(DockManager1) LayoutManager.SaveWindowLocationAndSize(Me) @@ -214,7 +229,7 @@ Public Class frmDocumentResultList Dim oRow = sender.GetDataRow(Helpers.ActiveRowHandle) Dim oObjectId = oRow.ItemEx(Of Long)(ColumnDocumentId, 0) Dim oFullPath = oRow.ItemEx(ColumnFilepath, "") - Dim oDocumentInfo As DocumentResultList.Document = Nothing + Dim oDocument As DocumentResultList.Document = Nothing ' Show Ribbon Category If RibbonPageCategoryFile.Visible = False Then @@ -223,41 +238,31 @@ Public Class frmDocumentResultList End If ' Load DocumentInfo - oDocumentInfo = Documentloader.Load(oObjectId, oFullPath) - If IsNothing(oDocumentInfo) Then - DocumentViewer1.CloseDocument() - ErrorHandler.ShowErrorMessage("File could not be loaded!") + oDocument = Documentloader.Load(oObjectId, oFullPath) + + If oDocument Is Nothing Then Exit Sub End If + UpdateRibbonActions(oDocument) + ' Save reference to current document - _CurrentDocument = oDocumentInfo + _CurrentDocument = oDocument ' Load Document in Document Viewer - Dim oFileName = $"{oObjectId}.{oDocumentInfo.Extension}" - DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocumentInfo.Contents)) + Dim oFileName = $"{oObjectId}.{oDocument.Extension}" + DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocument.Contents)) + If IsNothing(oDocument) Then + DocumentViewer1.CloseDocument() + ErrorHandler.ShowErrorMessage("File could not be loaded!") - ' Hide Export and filesystem options for view only right - If oDocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then - DocumentViewer1.SetViewOnly(True) - RibbonPageGroupExport.Visible = False - RibbonPageGroupFilesystem.Visible = False - Else - DocumentViewer1.SetViewOnly(False) - RibbonPageGroupExport.Visible = True - RibbonPageGroupFilesystem.Visible = True + Exit Sub End If If OperationMode = OperationMode.ZooFlow Or OperationMode = OperationMode.WithAppServer Then - 'Dim oEntityId = 1 - 'Dim oAttributes = Await ControlManager.GetAttributesForBusinessEntity(oEntityId) - 'If oAttributes.Count = 0 Then - ' MsgBox($"Es konnten keine Attribute für das Objekt '{oObjectId}' geladen werden!", MsgBoxStyle.Critical, Text) - 'End If - Await CtrlObjectPropertyDialog.LoadObject(oObjectId) - Dim oCheckoutState = Await CheckOutManager.GetCheckoutState(oObjectId) + Dim oCheckoutState = Await CheckoutManager.GetCheckoutState(oObjectId) If oCheckoutState IsNot Nothing Then txtCheckedOutWho.EditValue = oCheckoutState.CheckedOutWho dateCheckedOutWhen.EditValue = oCheckoutState.CheckedOutWhen @@ -266,9 +271,9 @@ Public Class frmDocumentResultList dateCheckedOutWhen.EditValue = Nothing End If End If + Else - RibbonPageCategoryFile.Visible = False - RibbonControl.SelectedPage = RibbonPageStart + UpdateRibbonActions(Nothing) End If Catch ex As Exception ErrorHandler.ShowErrorMessage(ex, "GridView_FocusedRowChanged") @@ -277,6 +282,40 @@ Public Class frmDocumentResultList End Try End Sub + Private Function UpdateRibbonActions(pDocument As DocumentResultList.Document) As Boolean + Try + If pDocument Is Nothing Then + RibbonPageCategoryFile.Visible = False + RibbonControl.SelectedPage = RibbonPageStart + Return True + End If + + ' Hide Export and filesystem options for view only right + If pDocument.AccessRight = Rights.AccessRight.VIEW_ONLY Then + DocumentViewer1.SetViewOnly(True) + RibbonPageGroupExport.Visible = False + + If OperationMode = OperationMode.NoAppServer Then + RibbonPageGroupFilesystem.Visible = False + MenuItemProperties.Visibility = BarItemVisibility.Never + End If + Else + DocumentViewer1.SetViewOnly(False) + RibbonPageGroupExport.Visible = True + + If OperationMode = OperationMode.NoAppServer Then + RibbonPageGroupFilesystem.Visible = True + MenuItemProperties.Visibility = BarItemVisibility.Always + End If + End If + + Return True + Catch ex As Exception + Logger.Error(ex) + Return False + End Try + End Function + #Region "Watcher" Public Async Sub Watcher_FileOpened(sender As Object, e As DocumentResultList.Watcher.FileOpenedArgs) Handles Watcher.FileOpened @@ -762,9 +801,13 @@ Public Class frmDocumentResultList End Sub Private Async Sub GridControl_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick, GridControl2.DoubleClick, GridControl3.DoubleClick - If _CurrentDocument IsNot Nothing AndAlso _CurrentDocument.AccessRight > Rights.AccessRight.VIEW_ONLY Then - Await Watcher.OpenDocument(_CurrentDocument) - End If + Try + If _CurrentDocument IsNot Nothing AndAlso _CurrentDocument.AccessRight > Rights.AccessRight.VIEW_ONLY Then + Await Watcher.OpenDocument(_CurrentDocument) + End If + Catch ex As Exception + Logger.Error(ex) + End Try End Sub Private Sub BarButtonResetLayout_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonResetLayout.ItemClick @@ -940,29 +983,29 @@ Public Class frmDocumentResultList #Region "Layout" Private Sub SplitContainerControl1_SplitterPositionChanged(sender As Object, e As EventArgs) Handles SplitContainerControl1.SplitterPositionChanged If IsLoading = False Then - Config.Config.SplitContainer1Distance = SplitContainerControl1.SplitterPosition + Config1.Config.SplitContainer1Distance = SplitContainerControl1.SplitterPosition End If End Sub Private Sub SplitContainerControl2_SplitterPositionChanged(sender As Object, e As EventArgs) Handles SplitContainerControl2.SplitterPositionChanged If IsLoading = False Then - Config.Config.SplitContainer2Distance = SplitContainerControl2.SplitterPosition + Config1.Config.SplitContainer2Distance = SplitContainerControl2.SplitterPosition End If End Sub Private Sub SwitchMainContainerHorizontal_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SwitchMainContainerHorizontal.CheckedChanged SplitContainerControl1.Horizontal = SwitchMainContainerHorizontal.Checked - If Config IsNot Nothing And IsLoading = False Then - Config.Config.SplitContainer1Horizontal = SwitchMainContainerHorizontal.Checked + If Config1 IsNot Nothing And IsLoading = False Then + Config1.Config.SplitContainer1Horizontal = SwitchMainContainerHorizontal.Checked End If End Sub Private Sub SwitchDetailContainerHorizontal2_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SwitchDetailContainerHorizontal.CheckedChanged SplitContainerControl2.Horizontal = SwitchDetailContainerHorizontal.Checked - If Config IsNot Nothing And IsLoading = False Then - Config.Config.SplitContainer2Horizontal = SwitchDetailContainerHorizontal.Checked + If Config1 IsNot Nothing And IsLoading = False Then + Config1.Config.SplitContainer2Horizontal = SwitchDetailContainerHorizontal.Checked End If End Sub #End Region @@ -1021,8 +1064,14 @@ Public Class frmDocumentResultList Dim oGridView As BandedGridView = sender Dim oRow As DataRowView = oGridView.GetRow(e.RowHandle) - If oRow IsNot Nothing AndAlso oRow.Row.Item(ColumnCheckedOut) IsNot Nothing AndAlso oRow.Row.Item(ColumnCheckedOut) = True Then - e.Appearance.BackColor = Color.LightSalmon + If OperationMode = OperationMode.WithAppServer Or OperationMode = OperationMode.ZooFlow Then + Try + If oRow IsNot Nothing AndAlso oRow.Row.ItemEx(ColumnCheckedOut, False) = True Then + e.Appearance.BackColor = Color.LightSalmon + End If + Catch ex As Exception + End Try End If + End Sub End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb b/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb index 8f7e6116..6dbe6085 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb @@ -60,6 +60,7 @@ Partial Class frmAdmin_Start Me.btnEditRecord = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem26 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem27 = New DevExpress.XtraBars.BarButtonItem() + Me.btnDatabaseConnection = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() @@ -134,9 +135,9 @@ Partial Class frmAdmin_Start 'RibbonControl1 ' Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.labelStatus, Me.labelError, Me.BarButtonItemAddAttribute, Me.BarButtonItemRefreshAttribute, Me.BarButtonItem6, Me.BarButtonItem7, Me.BarButtonItem8, Me.BarButtonItem9, Me.BarButtonItem10, Me.BarButtonItem12, Me.BarButtonItem13, Me.BarButtonItem14, Me.BarButtonItem15, Me.BarButtonItem16, Me.BarButtonItem17, Me.BarButtonItem18, Me.BarButtonItem19, Me.BarButtonItem20, Me.BarButtonItem21, Me.BarButtonItem22, Me.BarButtonItem23, Me.BarButtonItem24, Me.BarButtonItem25, Me.btnAddRecord, Me.btnEditRecord, Me.BarButtonItem26, Me.BarButtonItem27}) + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.labelStatus, Me.labelError, Me.BarButtonItemAddAttribute, Me.BarButtonItemRefreshAttribute, Me.BarButtonItem6, Me.BarButtonItem7, Me.BarButtonItem8, Me.BarButtonItem9, Me.BarButtonItem10, Me.BarButtonItem12, Me.BarButtonItem13, Me.BarButtonItem14, Me.BarButtonItem15, Me.BarButtonItem16, Me.BarButtonItem17, Me.BarButtonItem18, Me.BarButtonItem19, Me.BarButtonItem20, Me.BarButtonItem21, Me.BarButtonItem22, Me.BarButtonItem23, Me.BarButtonItem24, Me.BarButtonItem25, Me.btnAddRecord, Me.btnEditRecord, Me.BarButtonItem26, Me.BarButtonItem27, Me.btnDatabaseConnection}) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl1.MaxItemId = 37 + Me.RibbonControl1.MaxItemId = 38 Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] @@ -372,6 +373,13 @@ Partial Class frmAdmin_Start Me.BarButtonItem27.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.text1 Me.BarButtonItem27.Name = "BarButtonItem27" ' + 'btnDatabaseConnection + ' + Me.btnDatabaseConnection.Caption = "Datenbank konfigurieren" + Me.btnDatabaseConnection.Id = 37 + Me.btnDatabaseConnection.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.managedatasource3 + Me.btnDatabaseConnection.Name = "btnDatabaseConnection" + ' 'RibbonPage1 ' Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2, Me.RibbonPageGroup1}) @@ -383,6 +391,7 @@ Partial Class frmAdmin_Start Me.RibbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem27) Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem9) + Me.RibbonPageGroup2.ItemLinks.Add(Me.btnDatabaseConnection) Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageGroup2.Text = "Daten" ' @@ -941,4 +950,5 @@ Partial Class frmAdmin_Start Friend WithEvents RibbonPage_ClipboardWatcher As DevExpress.XtraBars.Ribbon.RibbonPage Friend WithEvents BarButtonItem26 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem27 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents btnDatabaseConnection As DevExpress.XtraBars.BarButtonItem End Class diff --git a/GUIs.ZooFlow/Administration/frmAdmin_Start.vb b/GUIs.ZooFlow/Administration/frmAdmin_Start.vb index 75f1592e..dad8903a 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_Start.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_Start.vb @@ -9,6 +9,7 @@ Imports DigitalData.GUIs.ZooFlow.Administration.ClassConstants Imports DevExpress.XtraGrid Imports DevExpress.XtraBars Imports DigitalData.Modules.Language +Imports DigitalData.Controls.SQLConfig Public Class frmAdmin_Start Private CurrentModule As String @@ -29,6 +30,13 @@ Public Class frmAdmin_Start DetailForm = New ClassDetailForm(My.LogConfig) AddHandler DetailForm.DetailFormClosed, AddressOf DetailForm_Closed + If My.SystemConfig.ConnectionString = String.Empty Then + If ShowDatabaseSettings() = False Then + MsgBox("Die Datenbank verbindung wurde nicht konfiguriert. Die Administration kann nicht verwendet werden.", MsgBoxStyle.Critical, Text) + Exit Sub + End If + End If + DetailForm.LoadData() TreeListMenu.ExpandAll() End Sub @@ -283,7 +291,24 @@ Public Class frmAdmin_Start oForm.ShowDialog() End Sub - Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click - + Private Sub btnDatabaseConnection_ItemClick(sender As Object, e As ItemClickEventArgs) Handles btnDatabaseConnection.ItemClick + ShowDatabaseSettings() End Sub + + Private Function ShowDatabaseSettings() As Boolean + Dim oForm As New frmSQLConfig(My.LogConfig) With { + .ConnectionString = My.SystemConfig.ConnectionString, + .FormTitle = "ECM Datenbank" + } + Dim oResult = oForm.ShowDialog() + + If oResult = DialogResult.OK Then + My.SystemConfig.ConnectionString = oForm.ConnectionString + My.SystemConfigManager.Save() + + Return True + Else + Return False + End If + End Function End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/ClassInit.vb b/GUIs.ZooFlow/ClassInit.vb index 5b039398..44b32bf6 100644 --- a/GUIs.ZooFlow/ClassInit.vb +++ b/GUIs.ZooFlow/ClassInit.vb @@ -37,7 +37,7 @@ Public Class ClassInit ' === Init Schritte definieren _Loader.AddStep("Initializing Base", AddressOf InitializeBase, True) - _Loader.AddStep("Initializing Database (1/2)", AddressOf InitializeDatabase, True) + '_Loader.AddStep("Initializing Database (1/2)", AddressOf InitializeDatabase, True) _Loader.AddStep("Initializing EDMI Service", AddressOf InitializeService, True) _Loader.AddStep("Initializing Database (2/2)", AddressOf InitializeDatabaseWithFallback, True) _Loader.AddStep("Initializing User", AddressOf InitializeUser, True) @@ -59,55 +59,55 @@ Public Class ClassInit End Sub Private Sub InitializeDatabase(MyApplication As My.MyApplication) - Dim oConnectionString = MSSQLServer.DecryptConnectionString(My.SystemConfig.ConnectionString) - My.DatabaseECM = New MSSQLServer(My.LogConfig, oConnectionString) + 'Dim oConnectionString = MSSQLServer.DecryptConnectionString(My.SystemConfig.ConnectionString) + 'My.DatabaseECM = New MSSQLServer(My.LogConfig, oConnectionString) - If My.DatabaseECM.DBInitialized = False Then - Logger.Warn("Could not initialize DD_ECM-Database!") - Throw New InitException("Could not initialize ECM-Database!") + 'If My.DatabaseECM.DBInitialized = False Then + ' Logger.Warn("Could not initialize DD_ECM-Database!") + ' Throw New InitException("Could not initialize ECM-Database!") - Else - Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB' AND AKTIV = 1" - Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl) + 'Else + ' Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB' AND AKTIV = 1" + ' Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl) - If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then + ' If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then - Dim oForm As New frmSQLConfig(My.LogConfig) With {.FormTitle = "IDB Datenbank"} - Dim oResult = oForm.ShowDialog() + ' Dim oForm As New frmSQLConfig(My.LogConfig) With {.FormTitle = "IDB Datenbank"} + ' Dim oResult = oForm.ShowDialog() - If oResult = DialogResult.OK Then - Dim oConnectionStringSaved = SaveConnectionString(oForm.ConnectionString) + ' If oResult = DialogResult.OK Then + ' Dim oConnectionStringSaved = SaveConnectionString(oForm.ConnectionString) - If oConnectionStringSaved = False Then - Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!") - End If + ' If oConnectionStringSaved = False Then + ' Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!") + ' End If - oDatatable = My.Database.GetDatatableECM(oSQl) - End If + ' oDatatable = My.Database.GetDatatableECM(oSQl) + ' End If - End If + ' End If - If oDatatable.Rows.Count > 1 Then - Logger.Warn("Multiple IDB connection entries in TBDD_CONNECTION found!") - Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!") - End If + ' If oDatatable.Rows.Count > 1 Then + ' Logger.Warn("Multiple IDB connection entries in TBDD_CONNECTION found!") + ' Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!") + ' End If - Dim oDataRow As DataRow = oDatatable.Rows.Item(0) - Dim oConString = My.DatabaseECM.GetConnectionString( - oDataRow.Item("SERVER").ToString, - oDataRow.Item("DATENBANK").ToString, - oDataRow.Item("USERNAME").ToString, - oDataRow.Item("PASSWORD").ToString - ) + ' Dim oDataRow As DataRow = oDatatable.Rows.Item(0) + ' Dim oConString = My.DatabaseECM.GetConnectionString( + ' oDataRow.Item("SERVER").ToString, + ' oDataRow.Item("DATENBANK").ToString, + ' oDataRow.Item("USERNAME").ToString, + ' oDataRow.Item("PASSWORD").ToString + ' ) - Dim oDecryptedConnectionString = MSSQLServer.DecryptConnectionString(oConString) - My.DatabaseIDB = New MSSQLServer(My.LogConfig, oDecryptedConnectionString) - End If + ' Dim oDecryptedConnectionString = MSSQLServer.DecryptConnectionString(oConString) + ' My.DatabaseIDB = New MSSQLServer(My.LogConfig, oDecryptedConnectionString) + 'End If - If My.DatabaseIDB.DBInitialized = False Then - Logger.Warn("Could not initialize IDB-Database!") - Throw New InitException("Could not initialize IDB-Database!") - End If + 'If My.DatabaseIDB.DBInitialized = False Then + ' Logger.Warn("Could not initialize IDB-Database!") + ' Throw New InitException("Could not initialize IDB-Database!") + 'End If End Sub Private Sub InitializeService(MyApplication As My.MyApplication) Try @@ -137,6 +137,12 @@ Public Class ClassInit End Sub Private Sub InitializeDatabaseWithFallback(MyApplication As My.MyApplication) Try + Dim oECMConnectionString = MyApplication.Service.Client.ClientConfig.ConnectionStringECM + My.DatabaseECM = New MSSQLServer(My.LogConfig, oECMConnectionString) + + Dim oIDBConnectionString = MyApplication.Service.Client.ClientConfig.ConnectionStringIDB + My.DatabaseIDB = New MSSQLServer(My.LogConfig, oIDBConnectionString) + My.Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB) Catch ex As Exception Logger.Error(ex) @@ -262,23 +268,23 @@ Public Class ClassInit #End Region Private Function SetupDatabase() As Boolean - If My.SystemConfig.ConnectionString = String.Empty Then - Dim oConnectionString = My.SystemConfig.ConnectionString - Dim oForm As New frmSQLConfig(My.LogConfig) With { - .ConnectionString = oConnectionString, - .FormTitle = "ECM Datenbank" - } - Dim oResult = oForm.ShowDialog() + 'If My.SystemConfig.ConnectionString = String.Empty Then + ' Dim oConnectionString = My.SystemConfig.ConnectionString + ' Dim oForm As New frmSQLConfig(My.LogConfig) With { + ' .ConnectionString = oConnectionString, + ' .FormTitle = "ECM Datenbank" + ' } + ' Dim oResult = oForm.ShowDialog() - If oResult = DialogResult.OK Then - My.SystemConfig.ConnectionString = oForm.ConnectionString - My.SystemConfigManager.Save() + ' If oResult = DialogResult.OK Then + ' My.SystemConfig.ConnectionString = oForm.ConnectionString + ' My.SystemConfigManager.Save() - Return True - Else - Return False - End If - End If + ' Return True + ' Else + ' Return False + ' End If + 'End If Return True End Function diff --git a/GUIs.ZooFlow/Modules/Globix/Models/WorkFile.vb b/GUIs.ZooFlow/Modules/Globix/Models/WorkFile.vb index ed7ffa85..8baf66ad 100644 --- a/GUIs.ZooFlow/Modules/Globix/Models/WorkFile.vb +++ b/GUIs.ZooFlow/Modules/Globix/Models/WorkFile.vb @@ -4,6 +4,11 @@ Public Id As Integer Public IsAttachment As Boolean = False Public HotfolderFile As Boolean = False + + Public Sub New(pId As Integer) + Id = pId + End Sub + Public Overrides Function ToString() As String Return FilePath End Function diff --git a/GUIs.ZooFlow/My Project/Resources.Designer.vb b/GUIs.ZooFlow/My Project/Resources.Designer.vb index d75c3bc5..a6947243 100644 --- a/GUIs.ZooFlow/My Project/Resources.Designer.vb +++ b/GUIs.ZooFlow/My Project/Resources.Designer.vb @@ -1120,6 +1120,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property managedatasource3() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("managedatasource3", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' diff --git a/GUIs.ZooFlow/My Project/Resources.resx b/GUIs.ZooFlow/My Project/Resources.resx index 494db6d1..6b33dc08 100644 --- a/GUIs.ZooFlow/My Project/Resources.resx +++ b/GUIs.ZooFlow/My Project/Resources.resx @@ -145,6 +145,9 @@ ..\Resources\actions_deletecircled2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\action_add_16xMD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\StatusAnnotations_Stop_32xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -196,9 +199,6 @@ ..\Resources\2_ZOO_FLOW_Abo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ZooFlow_Sidebar_individuelle_suche.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\editquery.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -283,6 +283,9 @@ ..\Resources\actions_check3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\definednameuseinformula2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\save5.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -316,8 +319,8 @@ ..\Resources\actions_addcircled1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\documentproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\ZooFlow_G_DevExpress.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\1_LOGO_ZOO_FLOW.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -337,9 +340,6 @@ ..\Resources\markcomplete.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\ZooFlow_G_DevExpress.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\save6.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -391,6 +391,9 @@ ..\Resources\ZooFlow_drop_drag.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ZooFlow_Sidebar_TOP.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\actions_deletecircled6.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -421,9 +424,6 @@ ..\Resources\del5.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_edit1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\ZooFlow_Sidebar_TOP_Drop.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -478,6 +478,9 @@ ..\Resources\4_GLOBIX_AKTIV_ZOO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\documentproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\actions_addcircled4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -496,11 +499,11 @@ ..\Resources\action_add_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ZooFlow_Sidebar_TOP.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\StatusAnnotations_Information_16xLG_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\definednameuseinformula2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\ZooFlow_Sidebar_individuelle_suche.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\bo_appointment.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -514,8 +517,8 @@ ..\Resources\about4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\StatusAnnotations_Information_16xLG_color.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\actions_edit1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\del.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -562,7 +565,7 @@ ..\Resources\del3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\action_add_16xMD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\managedatasource3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a \ No newline at end of file diff --git a/GUIs.ZooFlow/Resources/managedatasource3.svg b/GUIs.ZooFlow/Resources/managedatasource3.svg new file mode 100644 index 00000000..d08be544 --- /dev/null +++ b/GUIs.ZooFlow/Resources/managedatasource3.svg @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 463b923b..bdf0d917 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -1089,6 +1089,7 @@ + diff --git a/GUIs.ZooFlow/frmFlowForm.Designer.vb b/GUIs.ZooFlow/frmFlowForm.Designer.vb index e94c74db..db565341 100644 --- a/GUIs.ZooFlow/frmFlowForm.Designer.vb +++ b/GUIs.ZooFlow/frmFlowForm.Designer.vb @@ -30,13 +30,13 @@ Partial Class frmFlowForm Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmFlowForm)) Me.NotifyIcon = New System.Windows.Forms.NotifyIcon(Me.components) Me.ContextMenuSystray = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.EinblendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.VerwaltungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator() Me.TestToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.ZooFlowBeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.EinblendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.TimerRefreshData = New System.Windows.Forms.Timer(Me.components) Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.PictureBoxPM = New DevExpress.XtraEditors.SvgImageBox() @@ -51,7 +51,6 @@ Partial Class frmFlowForm Me.btnBasicConfig = New DevExpress.XtraBars.BarButtonItem() Me.btnGlobixConfig = New DevExpress.XtraBars.BarButtonItem() Me.btnServiceConfig = New DevExpress.XtraBars.BarButtonItem() - Me.btnDatabaseConfig = New DevExpress.XtraBars.BarButtonItem() Me.btnRestartZooflow = New DevExpress.XtraBars.BarButtonItem() Me.bbtnitmAusblenden = New DevExpress.XtraBars.BarButtonItem() Me.btnExitZooflow = New DevExpress.XtraBars.BarButtonItem() @@ -98,50 +97,50 @@ Partial Class frmFlowForm ' Me.ContextMenuSystray.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EinblendenToolStripMenuItem, Me.ToolStripSeparator1, Me.VerwaltungToolStripMenuItem, Me.ToolStripSeparator3, Me.TestToolStripMenuItem, Me.ToolStripSeparator2, Me.ZooFlowBeendenToolStripMenuItem}) Me.ContextMenuSystray.Name = "ContextMenuSystray" - Me.ContextMenuSystray.Size = New System.Drawing.Size(181, 132) - ' - 'ToolStripSeparator1 - ' - Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(177, 6) - ' - 'VerwaltungToolStripMenuItem - ' - Me.VerwaltungToolStripMenuItem.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.gear_32xLG - Me.VerwaltungToolStripMenuItem.Name = "VerwaltungToolStripMenuItem" - Me.VerwaltungToolStripMenuItem.Size = New System.Drawing.Size(180, 22) - Me.VerwaltungToolStripMenuItem.Text = "Verwaltung" - ' - 'ToolStripSeparator3 - ' - Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(177, 6) - ' - 'TestToolStripMenuItem - ' - Me.TestToolStripMenuItem.Name = "TestToolStripMenuItem" - Me.TestToolStripMenuItem.Size = New System.Drawing.Size(180, 22) - Me.TestToolStripMenuItem.Text = "Test" - ' - 'ToolStripSeparator2 - ' - Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(177, 6) - ' - 'ZooFlowBeendenToolStripMenuItem - ' - Me.ZooFlowBeendenToolStripMenuItem.Name = "ZooFlowBeendenToolStripMenuItem" - Me.ZooFlowBeendenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) - Me.ZooFlowBeendenToolStripMenuItem.Text = "ZooFlow beenden" + Me.ContextMenuSystray.Size = New System.Drawing.Size(170, 110) ' 'EinblendenToolStripMenuItem ' Me.EinblendenToolStripMenuItem.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.action_add_16xMD Me.EinblendenToolStripMenuItem.Name = "EinblendenToolStripMenuItem" - Me.EinblendenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.EinblendenToolStripMenuItem.Size = New System.Drawing.Size(169, 22) Me.EinblendenToolStripMenuItem.Text = "Einblenden" Me.EinblendenToolStripMenuItem.Visible = False ' + 'ToolStripSeparator1 + ' + Me.ToolStripSeparator1.Name = "ToolStripSeparator1" + Me.ToolStripSeparator1.Size = New System.Drawing.Size(166, 6) + ' + 'VerwaltungToolStripMenuItem + ' + Me.VerwaltungToolStripMenuItem.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.gear_32xLG + Me.VerwaltungToolStripMenuItem.Name = "VerwaltungToolStripMenuItem" + Me.VerwaltungToolStripMenuItem.Size = New System.Drawing.Size(169, 22) + Me.VerwaltungToolStripMenuItem.Text = "Verwaltung" + ' + 'ToolStripSeparator3 + ' + Me.ToolStripSeparator3.Name = "ToolStripSeparator3" + Me.ToolStripSeparator3.Size = New System.Drawing.Size(166, 6) + ' + 'TestToolStripMenuItem + ' + Me.TestToolStripMenuItem.Name = "TestToolStripMenuItem" + Me.TestToolStripMenuItem.Size = New System.Drawing.Size(169, 22) + Me.TestToolStripMenuItem.Text = "Test" + ' + 'ToolStripSeparator2 + ' + Me.ToolStripSeparator2.Name = "ToolStripSeparator2" + Me.ToolStripSeparator2.Size = New System.Drawing.Size(166, 6) + ' + 'ZooFlowBeendenToolStripMenuItem + ' + Me.ZooFlowBeendenToolStripMenuItem.Name = "ZooFlowBeendenToolStripMenuItem" + Me.ZooFlowBeendenToolStripMenuItem.Size = New System.Drawing.Size(169, 22) + Me.ZooFlowBeendenToolStripMenuItem.Text = "ZooFlow beenden" + ' 'PictureBoxPM ' Me.PictureBoxPM.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -224,7 +223,7 @@ Partial Class frmFlowForm Me.BarManager1.DockControls.Add(Me.barDockControlLeft) Me.BarManager1.DockControls.Add(Me.barDockControlRight) Me.BarManager1.Form = Me - Me.BarManager1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.BarSubItem1, Me.btnExitZooflow, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.btnRestartZooflow, Me.btnServiceConfig, Me.btnDatabaseConfig, Me.btnBasicConfig, Me.btnGlobixConfig, Me.bbtnitmAusblenden}) + Me.BarManager1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.BarSubItem1, Me.btnExitZooflow, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.btnRestartZooflow, Me.btnServiceConfig, Me.btnBasicConfig, Me.btnGlobixConfig, Me.bbtnitmAusblenden}) Me.BarManager1.MaxItemId = 12 Me.BarManager1.StatusBar = Me.Bar3 ' @@ -247,7 +246,7 @@ Partial Class frmFlowForm Me.BarSubItem1.Caption = "Menu" Me.BarSubItem1.Id = 0 Me.BarSubItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarSubItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) - Me.BarSubItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.btnBasicConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnGlobixConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnServiceConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnDatabaseConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnRestartZooflow), New DevExpress.XtraBars.LinkPersistInfo(Me.bbtnitmAusblenden), New DevExpress.XtraBars.LinkPersistInfo(Me.btnExitZooflow)}) + Me.BarSubItem1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.btnBasicConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnGlobixConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnServiceConfig), New DevExpress.XtraBars.LinkPersistInfo(Me.btnRestartZooflow), New DevExpress.XtraBars.LinkPersistInfo(Me.bbtnitmAusblenden), New DevExpress.XtraBars.LinkPersistInfo(Me.btnExitZooflow)}) Me.BarSubItem1.Name = "BarSubItem1" Me.BarSubItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph ' @@ -272,13 +271,6 @@ Partial Class frmFlowForm Me.btnServiceConfig.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.servermode Me.btnServiceConfig.Name = "btnServiceConfig" ' - 'btnDatabaseConfig - ' - Me.btnDatabaseConfig.Caption = "Datenbankkonfiguration" - Me.btnDatabaseConfig.Id = 8 - Me.btnDatabaseConfig.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.managedatasource2 - Me.btnDatabaseConfig.Name = "btnDatabaseConfig" - ' 'btnRestartZooflow ' Me.btnRestartZooflow.Caption = "Zooflow neustarten" @@ -500,7 +492,6 @@ Partial Class frmFlowForm Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnRestartZooflow As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnServiceConfig As DevExpress.XtraBars.BarButtonItem - Friend WithEvents btnDatabaseConfig As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnBasicConfig As DevExpress.XtraBars.BarButtonItem Friend WithEvents Panel2 As Panel Friend WithEvents btnGlobixConfig As DevExpress.XtraBars.BarButtonItem diff --git a/GUIs.ZooFlow/frmFlowForm.resx b/GUIs.ZooFlow/frmFlowForm.resx index 1945daa6..8ce010c1 100644 --- a/GUIs.ZooFlow/frmFlowForm.resx +++ b/GUIs.ZooFlow/frmFlowForm.resx @@ -2042,6 +2042,6 @@ - 17, 56 + 990, 17 \ No newline at end of file diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index 3a410b9c..211a0f3d 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -647,12 +647,14 @@ Public Class frmFlowForm Exit Function End If + PictureEdit2.Image = My.Resources.ZooFlow_drop + 'Erstmal alles löschen My.Database.ExecuteNonQueryECM("DELETE FROM TBGI_FILES_USER WHERE USER@WORK = '" & My.Application.User.UserName & "'") Dim oDroppedFiles = FileDropNew.GetFiles(e) If oDroppedFiles.Count > 0 Then - Await Globix_Check_Dropped_Files(oDroppedFiles) + Await Globix_CheckDroppedFiles(oDroppedFiles) End If End Function @@ -660,7 +662,7 @@ Public Class frmFlowForm Await DragDropForm(e) End Sub - Private Async Function Globix_Check_Dropped_Files(pDroppedFiles As List(Of FileDrop.DroppedFile)) As Threading.Tasks.Task + Private Async Function Globix_CheckDroppedFiles(pDroppedFiles As List(Of FileDrop.DroppedFile)) As Threading.Tasks.Task Try Await My.Database.ExecuteNonQueryECMAsync($"DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND USER@WORK = '{My.Application.User.UserName}'") @@ -697,8 +699,7 @@ Public Class frmFlowForm Dim oFilePath As String = oRow.Item("FILENAME2WORK").ToString Dim oFileId As Integer = oRow.Item("GUID") - My.Application.Globix.CurrentWorkfile = New Globix.Models.WorkFile With { - .Id = oFileId, + My.Application.Globix.CurrentWorkfile = New Globix.Models.WorkFile(oFileId) With { .FilePath = oFilePath } @@ -706,8 +707,6 @@ Public Class frmFlowForm If IO.File.Exists(My.Application.Globix.CurrentWorkfile.FilePath) = True And My.Application.Globix.DTACTUAL_FILES.Rows.Count > 0 Then Globix_Open_IndexDialog() - - PictureEdit2.Image = My.Resources.ZooFlow_drop_drag End If Next Catch ex As Exception @@ -907,11 +906,10 @@ Public Class frmFlowForm handleType = "|FW_SIMPLEINDEXER|" End If If FileHandle.CheckDuplicateFiles(FileForWork, "FolderWatch") Then - My.Application.Globix.CurrentWorkfile = New Globix.Models.WorkFile With { - .Id = DirectCast(row.Item("GUID"), Integer), - .FilePath = FileForWork, - .HotfolderFile = True - } + My.Application.Globix.CurrentWorkfile = New Globix.Models.WorkFile(row.Item("GUID")) With { + .FilePath = FileForWork, + .HotfolderFile = True + } Globix_Open_IndexDialog() Else My.Database.ExecuteNonQueryECM(oDel) @@ -1231,7 +1229,7 @@ Public Class frmFlowForm frmServiceConfig.ShowDialog() End Sub - Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDatabaseConfig.ItemClick + Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Dim oForm As New frmSQLConfig(My.LogConfig) With { .ConnectionString = My.SystemConfig.ConnectionString, .FormTitle = "ECM Datenbank" @@ -1286,10 +1284,6 @@ Public Class frmFlowForm Await CheckRunSearch1() End Sub - Private Sub PictureEditQuicksearch1_EditValueChanged(sender As Object, e As EventArgs) Handles PictureEditQuicksearch1.EditValueChanged - - End Sub - Private Sub bbtnitmAusblenden_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmAusblenden.ItemClick UnregisterBar() EinblendenToolStripMenuItem.Visible = True diff --git a/GUIs.ZooFlow/frmServiceConfig.vb b/GUIs.ZooFlow/frmServiceConfig.vb index ac26a144..dc85e30e 100644 --- a/GUIs.ZooFlow/frmServiceConfig.vb +++ b/GUIs.ZooFlow/frmServiceConfig.vb @@ -32,6 +32,7 @@ Public Class frmServiceConfig My.SystemConfig.AppServerConfig = $"{oIPAddress}:{oPort.ToString}" My.SystemConfigManager.Save() lblStatus.Text = "Successfully Connected to service" + Else lblStatus.Text = "Connection not successful." ' TODO: Make a connection test that is as elaborate as this one :D @@ -46,8 +47,6 @@ Public Class frmServiceConfig ' lblStatus.Text = "Unbekannter Fehler." 'End Select End If - - DialogResult = DialogResult.OK Catch ex As Exception Logger.Error(ex) MsgBox("Fehler beim Verbindungsaufbau", MsgBoxStyle.Critical, Text) diff --git a/Modules.Base/Base/IDB/FileStore.vb b/Modules.Base/Base/IDB/FileStore.vb index d2a839f0..f1dc29e0 100644 --- a/Modules.Base/Base/IDB/FileStore.vb +++ b/Modules.Base/Base/IDB/FileStore.vb @@ -13,6 +13,8 @@ Public Const OBJECT_STATE_FILE_DELETED = "File deleted" Public Const OBJECT_STATE_METADATA_CHANGED = "Metadata changed" Public Const OBJECT_STATE_ATTRIBUTEVALUE_DELETED = "Attributevalue deleted" + Public Const OBJECT_STATE_FILE_CHECKED_OUT = "File Checked Out" + Public Const OBJECT_STATE_FILE_CHECKED_IN = "File Checked In" End Class End Namespace \ No newline at end of file diff --git a/Modules.EDMIAPI/Client.vb b/Modules.EDMIAPI/Client.vb index 9b7b7855..ac0c3cb0 100644 --- a/Modules.EDMIAPI/Client.vb +++ b/Modules.EDMIAPI/Client.vb @@ -87,12 +87,8 @@ Public Class Client Try ServerAddress = oAddressArray(0) ServerPort = oAddressArray(1) - - Dim oBinding = API.Channel.GetBinding() - Dim oAddress = New EndpointAddress($"net.tcp://{ServerAddress}:{ServerPort}/DigitalData/Services/Main") - Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress) - - ChannelFactory = oFactory + Logger.Debug("Connecting to Service at: [{0}]", ServerAddress) + ChannelFactory = GetChannelFactory(ServerAddress, ServerPort) Catch ex As Exception Logger.Error(ex) End Try @@ -109,20 +105,24 @@ Public Class Client Logger = LogConfig.GetLogger() FileEx = New Filesystem.File(LogConfig) + UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES + UpdateTimer.Start() + Try - ServerAddress = IPAddress - Dim oBinding = API.Channel.GetBinding() - Dim oAddress = New EndpointAddress($"net.tcp://{IPAddress}:{PortNumber}/DigitalData/Services/Main") - Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress) - - Logger.Debug("Connecting to Service at: [{0}]", oAddress) - - ChannelFactory = oFactory + Logger.Debug("Connecting to Service at: [{0}]", IPAddress) + ChannelFactory = GetChannelFactory(IPAddress, PortNumber) Catch ex As Exception Logger.Error(ex) End Try End Sub + Private Function GetChannelFactory(pIPAddress As String, pPortNumber As Integer) As ChannelFactory(Of IEDMIServiceChannel) + Dim oBinding = API.Channel.GetBinding() + Dim oAddress = New EndpointAddress($"net.tcp://{pIPAddress}:{pPortNumber}/DigitalData/Services/Main") + Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress) + Return oFactory + End Function + ''' ''' Connect to the service ''' diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd index f6058ff7..326edd8a 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd @@ -2,6 +2,8 @@ + + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb index 0dd8738a..b7ca66f0 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb @@ -638,6 +638,12 @@ Namespace EDMIServiceReference _ Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject + _ + Private ConnectionStringECMField As String + + _ + Private ConnectionStringIDBField As String + _ Private DocumentTypesField() As EDMIServiceReference.GlobalStateDoctype @@ -654,6 +660,32 @@ Namespace EDMIServiceReference End Set End Property + _ + Public Property ConnectionStringECM() As String + Get + Return Me.ConnectionStringECMField + End Get + Set + If (Object.ReferenceEquals(Me.ConnectionStringECMField, value) <> true) Then + Me.ConnectionStringECMField = value + Me.RaisePropertyChanged("ConnectionStringECM") + End If + End Set + End Property + + _ + Public Property ConnectionStringIDB() As String + Get + Return Me.ConnectionStringIDBField + End Get + Set + If (Object.ReferenceEquals(Me.ConnectionStringIDBField, value) <> true) Then + Me.ConnectionStringIDBField = value + Me.RaisePropertyChanged("ConnectionStringIDB") + End If + End Set + End Property + _ Public Property DocumentTypes() As EDMIServiceReference.GlobalStateDoctype() Get diff --git a/Modules.EDMIAPI/DatabaseWithFallback.vb b/Modules.EDMIAPI/DatabaseWithFallback.vb index cb93bced..de9053a9 100644 --- a/Modules.EDMIAPI/DatabaseWithFallback.vb +++ b/Modules.EDMIAPI/DatabaseWithFallback.vb @@ -53,8 +53,12 @@ Public Class DatabaseWithFallback _DatabaseECM = DatabaseECM _DatabaseIDB = DatabaseIDB + _Logger.Debug("Client exists: [{0}]", Not IsNothing(Client)) + _Logger.Debug("DatabaseECM exists: [{0}]", Not IsNothing(DatabaseECM)) + _Logger.Debug("DatabaseIDB exists: [{0}]", Not IsNothing(DatabaseIDB)) + ' Load client config, will throw if client is not yet connected to service - _ClientConfig = Client.ClientConfig + _ClientConfig = Client?.ClientConfig End Sub ''' diff --git a/Modules.EDMIAPI/My Project/AssemblyInfo.vb b/Modules.EDMIAPI/My Project/AssemblyInfo.vb index c5258d37..7e3b23e4 100644 --- a/Modules.EDMIAPI/My Project/AssemblyInfo.vb +++ b/Modules.EDMIAPI/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Service.EDMIService/GlobalState.vb b/Service.EDMIService/GlobalState.vb index bb73e113..0ee10f8d 100644 --- a/Service.EDMIService/GlobalState.vb +++ b/Service.EDMIService/GlobalState.vb @@ -156,6 +156,8 @@ Public Class GlobalState _Logger.Debug("ForceDirectDatabaseAccess: {0}", pConfig.ClientConfig.ForceDirectDatabaseAccess) ClientConfig.ForceDirectDatabaseAccess = pConfig.ClientConfig.ForceDirectDatabaseAccess ClientConfig.DocumentTypes = Doctypes + ClientConfig.ConnectionStringECM = _MSSQL_ECM.CurrentSQLConnectionString + ClientConfig.ConnectionStringIDB = _MSSQL_IDB.CurrentSQLConnectionString End Sub Public Class ObjectStore @@ -180,6 +182,9 @@ Public Class GlobalState Public Class ClientConfiguration Public Property ForceDirectDatabaseAccess As Boolean = False Public Property DocumentTypes As New List(Of Doctype) + + Public Property ConnectionStringECM As String + Public Property ConnectionStringIDB As String End Class diff --git a/Service.EDMIService/IDB/Helpers.vb b/Service.EDMIService/IDB/Helpers.vb index b5f5c608..0933e44c 100644 --- a/Service.EDMIService/IDB/Helpers.vb +++ b/Service.EDMIService/IDB/Helpers.vb @@ -202,13 +202,15 @@ Namespace IDB Public Function SetObjectState(pObjectId As Long, pState As String, pWho As String) As Boolean Try + Logger.Debug("Setting object state for [{0}]: [{1}]") + Dim oSql As String = $"EXEC PRIDB_OBJECT_SET_STATE {pObjectId}, '{pState}', '{pWho}'" Dim oResult = Database.ExecuteNonQuery(oSql) If oResult = False Then Return False End If - Logger.Info("Object state for [{0}] created: [{1}]", pObjectId, pState) + Logger.Info("Object state for [{0}] set: [{1}]", pObjectId, pState) Return True Catch ex As Exception diff --git a/Service.EDMIService/Methods/IDB/CheckInOutFile/CheckInOutFileMethod.vb b/Service.EDMIService/Methods/IDB/CheckInOutFile/CheckInOutFileMethod.vb index 5e784a18..809b1697 100644 --- a/Service.EDMIService/Methods/IDB/CheckInOutFile/CheckInOutFileMethod.vb +++ b/Service.EDMIService/Methods/IDB/CheckInOutFile/CheckInOutFileMethod.vb @@ -101,7 +101,9 @@ Namespace Methods.IDB.CheckInOutFile VALUES ({pObjectId}, GETDATE(), '{pComment}', '{pUsername}')" If DatabaseIDB.ExecuteNonQuery(oSQL) = True Then + Helpers.SetObjectState(pObjectId, FileStore.OBJECT_STATE_FILE_CHECKED_OUT, pUsername) Logger.Info("File [{0}] checked out successfully!", pObjectId) + Return CheckOutResult.CheckoutSuccessful Else Logger.Warn("File [{0}] could not be checked out because of an internal error!", pObjectId) @@ -134,7 +136,9 @@ Namespace Methods.IDB.CheckInOutFile WHERE IDB_OBJ_ID = {pObjectId} AND ADDED_WHO = '{pUsername}' AND CHECKED_IN_WHEN IS NULL" If DatabaseIDB.ExecuteNonQuery(oSQL) = True Then + Helpers.SetObjectState(pObjectId, FileStore.OBJECT_STATE_FILE_CHECKED_IN, pUsername) Logger.Info("File [{0}] checked in successfully!", pObjectId) + Return CheckInResult.CheckinSuccessful Else Logger.Warn("File [{0}] could not be checked in because of an internal error!", pObjectId)