Common: Configurable Column Names for Fixed Columns, Helpers for Error Messages, Checks for Datatable contents and environment

This commit is contained in:
Jonathan Jenne 2021-01-06 16:57:44 +01:00
parent f3903089f3
commit d0b0c9d466
8 changed files with 273 additions and 127 deletions

View File

@ -104,6 +104,7 @@
</Compile> </Compile>
<Compile Include="DocumentPropertyMenu\DocumentPropertyMenu.vb" /> <Compile Include="DocumentPropertyMenu\DocumentPropertyMenu.vb" />
<Compile Include="DocumentResultList\DocumentResultConfig.vb" /> <Compile Include="DocumentResultList\DocumentResultConfig.vb" />
<Compile Include="DocumentResultList\DocumentResultList.vb" />
<Compile Include="DocumentResultList\DocumentResultParams.vb" /> <Compile Include="DocumentResultList\DocumentResultParams.vb" />
<Compile Include="DocumentResultList\frmDocumentResultList.Designer.vb"> <Compile Include="DocumentResultList\frmDocumentResultList.Designer.vb">
<DependentUpon>frmDocumentResultList.vb</DependentUpon> <DependentUpon>frmDocumentResultList.vb</DependentUpon>

View File

@ -25,7 +25,7 @@ Public Class frmDataResultList
Private _ActiveGrid As GridControl = Nothing Private _ActiveGrid As GridControl = Nothing
Private _ActiveGridBand As GridBand = Nothing Private _ActiveGridBand As GridBand = Nothing
Private _ActiveRowHandle As Integer = Constants.NO_ROW_HANDLE Private _Helpers As DocumentResultList
Public Property ShouldReturnToPreviousForm As Boolean Implements IResultForm.ShouldReturnToPreviousForm Public Property ShouldReturnToPreviousForm As Boolean Implements IResultForm.ShouldReturnToPreviousForm
@ -39,6 +39,7 @@ Public Class frmDataResultList
_LogConfig = LogConfig _LogConfig = LogConfig
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_Config = New ConfigManager(Of DataResultConfig)(LogConfig, oConfigPath, Application.StartupPath) _Config = New ConfigManager(Of DataResultConfig)(LogConfig, oConfigPath, Application.StartupPath)
_Helpers = New DocumentResultList(_LogConfig)
_Environment = Environment _Environment = Environment
_Params = Params _Params = Params
_ResultLists = Params.Results _ResultLists = Params.Results
@ -128,7 +129,7 @@ Public Class frmDataResultList
End Sub End Sub
Private Sub GridView_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs) Private Sub GridView_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs)
_ActiveRowHandle = e.FocusedRowHandle _Helpers.SetRowHandle(e)
End Sub End Sub
Private Sub GridControl_Enter(sender As GridControl, e As EventArgs) Handles GridControl1.Enter, GridControl2.Enter, GridControl3.Enter Private Sub GridControl_Enter(sender As GridControl, e As EventArgs) Handles GridControl1.Enter, GridControl2.Enter, GridControl3.Enter
@ -204,7 +205,7 @@ Public Class frmDataResultList
Private Function GetActiveRow() As DataRow Private Function GetActiveRow() As DataRow
Dim oActiveGrid = GetActiveGridControl() Dim oActiveGrid = GetActiveGridControl()
Dim oActiveRowhandle = GetActiveRowHandle() Dim oActiveRowhandle = _Helpers.ActiveRowHandle
If oActiveGrid IsNot Nothing And oActiveRowhandle <> Constants.NO_ROW_HANDLE Then If oActiveGrid IsNot Nothing And oActiveRowhandle <> Constants.NO_ROW_HANDLE Then
Dim oView = DirectCast(oActiveGrid.DefaultView, GridView) Dim oView = DirectCast(oActiveGrid.DefaultView, GridView)
@ -223,14 +224,6 @@ Public Class frmDataResultList
Return _ActiveGrid Return _ActiveGrid
End Function End Function
Private Function GetActiveRowHandle() As Integer
If _ActiveRowHandle = Constants.NO_ROW_HANDLE Then
Return Constants.NO_ROW_HANDLE
End If
Return _ActiveRowHandle
End Function
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
Dim oActiveGrid = GetActiveGridControl() Dim oActiveGrid = GetActiveGridControl()

View File

@ -0,0 +1,61 @@
Imports System.Drawing
Imports System.IO
Imports DevExpress.XtraGrid.Views.Base
Imports DigitalData.Modules.Logging
Public Class DocumentResultList
Private Logger As Logger
Public ActiveRowHandle As Integer = Constants.NO_ROW_HANDLE
Public Sub New(LogConfig As LogConfig)
Logger = LogConfig.GetLogger()
End Sub
Public Sub SetRowHandle(e As FocusedRowChangedEventArgs)
ActiveRowHandle = e.FocusedRowHandle
End Sub
Public Function GetIconByExtension(FilePath As String) As Bitmap
Dim oFileextension = Path.GetExtension(FilePath)
Select Case oFileextension.ToUpper
Case ".csv".ToUpper
Return My.Resources.xls
Case ".txt".ToUpper
Return My.Resources.txt
Case ".pdf".ToUpper
Return My.Resources.pdf
Case ".doc".ToUpper
Return My.Resources.doc
Case ".docx".ToUpper
Return My.Resources.doc
Case ".xls".ToUpper
Return My.Resources.xls
Case ".xlsx".ToUpper
Return My.Resources.xls
Case ".xlsm".ToUpper
Return My.Resources.xls
Case ".ppt".ToUpper
Return My.Resources.ppt
Case ".pptx".ToUpper
Return My.Resources.ppt
Case ".dwg".ToUpper
Return My.Resources.dwg
Case ".dxf".ToUpper
Return My.Resources.dxf
Case ".msg".ToUpper
Return My.Resources._page
Case ".msg".ToUpper
Return My.Resources._page
Case ".tif".ToUpper
Return My.Resources.tiff
Case ".tiff".ToUpper
Return My.Resources.tiff
Case ".jpg".ToUpper
Return My.Resources.jpg
Case Else
Return My.Resources._blank
End Select
End Function
End Class

View File

@ -4,8 +4,15 @@
''' </summary> ''' </summary>
Public WindowGuid As String Public WindowGuid As String
Public Results As New List(Of DocumentResult) Public Results As New List(Of DocumentResult)
Public ColumnNames As New ColumnNames
End Class End Class
Public Class DocumentResult Public Class DocumentResult
Inherits BaseResult Inherits BaseResult
End Class End Class
Public Class ColumnNames
Public ObjectIdColumn As String = "DocId"
Public FullPathColumn As String = "FULL_PATH"
Public FilenameColumn As String = "Filename"
End Class

View File

@ -32,6 +32,12 @@ Partial Class frmDocumentResultList
Me.labelResultCount = New DevExpress.XtraBars.BarStaticItem() Me.labelResultCount = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonBack = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonBack = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem5 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem5 = New DevExpress.XtraBars.BarButtonItem()
Me.BarEditItem1 = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit()
Me.BarEditItem2 = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemTextEdit2 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit()
Me.labelCriticalError = New DevExpress.XtraBars.BarStaticItem()
Me.labelWarning = New DevExpress.XtraBars.BarStaticItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup_Navigation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup_Navigation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup_Layout = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup_Layout = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
@ -52,6 +58,8 @@ Partial Class frmDocumentResultList
Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer() Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
Me.XtraSaveFileDialog = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components) Me.XtraSaveFileDialog = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.SuspendLayout() Me.SplitContainerControl1.SuspendLayout()
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -69,13 +77,14 @@ Partial Class frmDocumentResultList
'RibbonControl 'RibbonControl
' '
Me.RibbonControl.ExpandCollapseItem.Id = 0 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.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarStaticItem1, Me.labelResultCount, Me.BarButtonBack, Me.BarButtonItem5}) Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.SwitchMainContainerHorizontal, Me.SwitchDetailContainerHorizontal, Me.BarButtonItemExportGrid1, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarStaticItem1, Me.labelResultCount, Me.BarButtonBack, Me.BarButtonItem5, Me.BarEditItem1, Me.BarEditItem2, Me.labelCriticalError, Me.labelWarning})
Me.RibbonControl.Location = New System.Drawing.Point(0, 0) Me.RibbonControl.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl.MaxItemId = 12 Me.RibbonControl.MaxItemId = 16
Me.RibbonControl.Name = "RibbonControl" Me.RibbonControl.Name = "RibbonControl"
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2})
Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl.Size = New System.Drawing.Size(1189, 159) Me.RibbonControl.Size = New System.Drawing.Size(1189, 158)
Me.RibbonControl.StatusBar = Me.RibbonStatusBar Me.RibbonControl.StatusBar = Me.RibbonStatusBar
' '
'SwitchMainContainerHorizontal 'SwitchMainContainerHorizontal
@ -151,6 +160,54 @@ Partial Class frmDocumentResultList
Me.BarButtonItem5.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem5.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.BarButtonItem5.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem5.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem5.Name = "BarButtonItem5" Me.BarButtonItem5.Name = "BarButtonItem5"
' '
'BarEditItem1
'
Me.BarEditItem1.Caption = "BarEditItem1"
Me.BarEditItem1.CaptionToEditorIndent = 0
Me.BarEditItem1.Edit = Me.RepositoryItemTextEdit1
Me.BarEditItem1.Id = 12
Me.BarEditItem1.Name = "BarEditItem1"
'
'RepositoryItemTextEdit1
'
Me.RepositoryItemTextEdit1.AutoHeight = False
Me.RepositoryItemTextEdit1.Name = "RepositoryItemTextEdit1"
'
'BarEditItem2
'
Me.BarEditItem2.Caption = "BarEditItem2"
Me.BarEditItem2.Edit = Me.RepositoryItemTextEdit2
Me.BarEditItem2.Id = 13
Me.BarEditItem2.Name = "BarEditItem2"
'
'RepositoryItemTextEdit2
'
Me.RepositoryItemTextEdit2.AutoHeight = False
Me.RepositoryItemTextEdit2.Name = "RepositoryItemTextEdit2"
'
'labelCriticalError
'
Me.labelCriticalError.Caption = "Critical Error"
Me.labelCriticalError.Id = 14
Me.labelCriticalError.ImageOptions.SvgImage = CType(resources.GetObject("labelCriticalError.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.labelCriticalError.ItemAppearance.Normal.BackColor = System.Drawing.Color.White
Me.labelCriticalError.ItemAppearance.Normal.ForeColor = DevExpress.LookAndFeel.DXSkinColors.ForeColors.Critical
Me.labelCriticalError.ItemAppearance.Normal.Options.UseBackColor = True
Me.labelCriticalError.ItemAppearance.Normal.Options.UseForeColor = True
Me.labelCriticalError.Name = "labelCriticalError"
Me.labelCriticalError.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
Me.labelCriticalError.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInCustomizing
'
'labelWarning
'
Me.labelWarning.Caption = "Warning"
Me.labelWarning.Id = 15
Me.labelWarning.ImageOptions.SvgImage = CType(resources.GetObject("labelWarning.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.labelWarning.ItemAppearance.Normal.BackColor = System.Drawing.Color.White
Me.labelWarning.ItemAppearance.Normal.Options.UseBackColor = True
Me.labelWarning.Name = "labelWarning"
Me.labelWarning.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInCustomizing
'
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup_Navigation, Me.RibbonPageGroup_Layout, Me.RibbonPageGroup_Export}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup_Navigation, Me.RibbonPageGroup_Layout, Me.RibbonPageGroup_Export})
@ -183,10 +240,12 @@ Partial Class frmDocumentResultList
'RibbonStatusBar 'RibbonStatusBar
' '
Me.RibbonStatusBar.ItemLinks.Add(Me.labelResultCount) Me.RibbonStatusBar.ItemLinks.Add(Me.labelResultCount)
Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 649) Me.RibbonStatusBar.ItemLinks.Add(Me.labelCriticalError)
Me.RibbonStatusBar.ItemLinks.Add(Me.labelWarning)
Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 647)
Me.RibbonStatusBar.Name = "RibbonStatusBar" Me.RibbonStatusBar.Name = "RibbonStatusBar"
Me.RibbonStatusBar.Ribbon = Me.RibbonControl Me.RibbonStatusBar.Ribbon = Me.RibbonControl
Me.RibbonStatusBar.Size = New System.Drawing.Size(1189, 22) Me.RibbonStatusBar.Size = New System.Drawing.Size(1189, 24)
' '
'SplitContainerControl1 'SplitContainerControl1
' '
@ -198,7 +257,7 @@ Partial Class frmDocumentResultList
Me.SplitContainerControl1.Panel1.Text = "Panel1" Me.SplitContainerControl1.Panel1.Text = "Panel1"
Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerControl2) Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerControl2)
Me.SplitContainerControl1.Panel2.Text = "Panel2" Me.SplitContainerControl1.Panel2.Text = "Panel2"
Me.SplitContainerControl1.Size = New System.Drawing.Size(762, 490) Me.SplitContainerControl1.Size = New System.Drawing.Size(762, 489)
Me.SplitContainerControl1.SplitterPosition = 382 Me.SplitContainerControl1.SplitterPosition = 382
Me.SplitContainerControl1.TabIndex = 2 Me.SplitContainerControl1.TabIndex = 2
Me.SplitContainerControl1.Text = "SplitContainerControl1" Me.SplitContainerControl1.Text = "SplitContainerControl1"
@ -210,7 +269,7 @@ Partial Class frmDocumentResultList
Me.GridControl1.MainView = Me.GridView1 Me.GridControl1.MainView = Me.GridView1
Me.GridControl1.MenuManager = Me.RibbonControl Me.GridControl1.MenuManager = Me.RibbonControl
Me.GridControl1.Name = "GridControl1" Me.GridControl1.Name = "GridControl1"
Me.GridControl1.Size = New System.Drawing.Size(382, 490) Me.GridControl1.Size = New System.Drawing.Size(382, 489)
Me.GridControl1.TabIndex = 0 Me.GridControl1.TabIndex = 0
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
' '
@ -250,7 +309,7 @@ Partial Class frmDocumentResultList
Me.SplitContainerControl2.Panel1.Text = "Panel1" Me.SplitContainerControl2.Panel1.Text = "Panel1"
Me.SplitContainerControl2.Panel2.Controls.Add(Me.GridControl3) Me.SplitContainerControl2.Panel2.Controls.Add(Me.GridControl3)
Me.SplitContainerControl2.Panel2.Text = "Panel2" Me.SplitContainerControl2.Panel2.Text = "Panel2"
Me.SplitContainerControl2.Size = New System.Drawing.Size(370, 490) Me.SplitContainerControl2.Size = New System.Drawing.Size(370, 489)
Me.SplitContainerControl2.SplitterPosition = 223 Me.SplitContainerControl2.SplitterPosition = 223
Me.SplitContainerControl2.TabIndex = 0 Me.SplitContainerControl2.TabIndex = 0
Me.SplitContainerControl2.Text = "SplitContainerControl2" Me.SplitContainerControl2.Text = "SplitContainerControl2"
@ -295,7 +354,7 @@ Partial Class frmDocumentResultList
Me.GridControl3.MainView = Me.GridView3 Me.GridControl3.MainView = Me.GridView3
Me.GridControl3.MenuManager = Me.RibbonControl Me.GridControl3.MenuManager = Me.RibbonControl
Me.GridControl3.Name = "GridControl3" Me.GridControl3.Name = "GridControl3"
Me.GridControl3.Size = New System.Drawing.Size(370, 257) Me.GridControl3.Size = New System.Drawing.Size(370, 256)
Me.GridControl3.TabIndex = 0 Me.GridControl3.TabIndex = 0
Me.GridControl3.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView3}) Me.GridControl3.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView3})
' '
@ -324,13 +383,13 @@ Partial Class frmDocumentResultList
'SplitContainerControl3 'SplitContainerControl3
' '
Me.SplitContainerControl3.Dock = System.Windows.Forms.DockStyle.Fill Me.SplitContainerControl3.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 159) Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 158)
Me.SplitContainerControl3.Name = "SplitContainerControl3" Me.SplitContainerControl3.Name = "SplitContainerControl3"
Me.SplitContainerControl3.Panel1.Controls.Add(Me.SplitContainerControl1) Me.SplitContainerControl3.Panel1.Controls.Add(Me.SplitContainerControl1)
Me.SplitContainerControl3.Panel1.Text = "Panel1" Me.SplitContainerControl3.Panel1.Text = "Panel1"
Me.SplitContainerControl3.Panel2.Controls.Add(Me.DocumentViewer1) Me.SplitContainerControl3.Panel2.Controls.Add(Me.DocumentViewer1)
Me.SplitContainerControl3.Panel2.Text = "Panel2" Me.SplitContainerControl3.Panel2.Text = "Panel2"
Me.SplitContainerControl3.Size = New System.Drawing.Size(1189, 490) Me.SplitContainerControl3.Size = New System.Drawing.Size(1189, 489)
Me.SplitContainerControl3.SplitterPosition = 762 Me.SplitContainerControl3.SplitterPosition = 762
Me.SplitContainerControl3.TabIndex = 5 Me.SplitContainerControl3.TabIndex = 5
Me.SplitContainerControl3.Text = "SplitContainerControl3" Me.SplitContainerControl3.Text = "SplitContainerControl3"
@ -338,9 +397,10 @@ Partial Class frmDocumentResultList
'DocumentViewer1 'DocumentViewer1
' '
Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Fill Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.DocumentViewer1.FileLoaded = False
Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0) Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0)
Me.DocumentViewer1.Name = "DocumentViewer1" Me.DocumentViewer1.Name = "DocumentViewer1"
Me.DocumentViewer1.Size = New System.Drawing.Size(417, 490) Me.DocumentViewer1.Size = New System.Drawing.Size(417, 489)
Me.DocumentViewer1.TabIndex = 0 Me.DocumentViewer1.TabIndex = 0
' '
'XtraSaveFileDialog 'XtraSaveFileDialog
@ -363,6 +423,8 @@ Partial Class frmDocumentResultList
Me.StatusBar = Me.RibbonStatusBar Me.StatusBar = Me.RibbonStatusBar
Me.Text = "Dokumenten Suche" Me.Text = "Dokumenten Suche"
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl1.ResumeLayout(False) Me.SplitContainerControl1.ResumeLayout(False)
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
@ -410,4 +472,10 @@ Partial Class frmDocumentResultList
Friend WithEvents BarButtonBack As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonBack As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup_Navigation As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageGroup_Navigation As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarEditItem1 As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemTextEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
Friend WithEvents BarEditItem2 As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemTextEdit2 As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
Friend WithEvents labelCriticalError As DevExpress.XtraBars.BarStaticItem
Friend WithEvents labelWarning As DevExpress.XtraBars.BarStaticItem
End Class End Class

View File

@ -290,6 +290,50 @@
OFYxMnoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQogIDxwb2x5Z29uIHBvaW50cz0iMjIsMTIgMjAs OFYxMnoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQogIDxwb2x5Z29uIHBvaW50cz0iMjIsMTIgMjAs
MTAgMTYsMTQgMTIsMTAgMTAsMTIgMTQsMTYgMTAsMjAgMTIsMjIgMTYsMTggMjAsMjIgMjIsMjAgMTgs MTAgMTYsMTQgMTIsMTAgMTAsMTIgMTQsMTYgMTAsMjAgMTIsMjIgMTYsMTggMjAsMjIgMjIsMjAgMTgs
MTYgIiBjbGFzcz0iUmVkIiAvPg0KPC9zdmc+Cw== MTYgIiBjbGFzcz0iUmVkIiAvPg0KPC9zdmc+Cw==
</value>
</data>
<data name="labelCriticalError.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALMCAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz
OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp
dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkRlbGV0ZUNpcmNsZWQiPg0KICAgIDxwYXRoIGQ9Ik0x
Niw0QzkuNCw0LDQsOS40LDQsMTZzNS40LDEyLDEyLDEyczEyLTUuNCwxMi0xMlMyMi42LDQsMTYsNHog
TTIzLjEsMjAuMmwtMi44LDIuOEwxNiwxOC44bC00LjIsNC4yICAgbC0yLjgtMi44bDQuMi00LjJsLTQu
Mi00LjJsMi44LTIuOGw0LjIsNC4ybDQuMi00LjJsMi44LDIuOEwxOC44LDE2TDIzLjEsMjAuMnoiIGNs
YXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs=
</value>
</data>
<data name="labelWarning.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABkEAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD
MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk
aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp
c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41
O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7
ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp
c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJBdHRlbnRpb24iPg0K
ICAgIDxwYXRoIGQ9Ik0xNS4xLDIuNUwyLjEsMjYuNUMxLjgsMjcuMiwyLjMsMjgsMy4xLDI4aDI1Ljlj
MC44LDAsMS4zLTAuOCwwLjktMS41TDE2LjksMi41ICAgQzE2LjUsMS44LDE1LjUsMS44LDE1LjEsMi41
eiIgY2xhc3M9IlllbGxvdyIgLz4NCiAgICA8cGF0aCBkPSJNMTYsMjBjMS4xLDAsMiwwLjksMiwycy0w
LjksMi0yLDJzLTItMC45LTItMlMxNC45LDIwLDE2LDIweiBNMTQsMTBoNHY4aC00VjEweiIgY2xhc3M9
IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2Zz4L
</value> </value>
</data> </data>
<metadata name="XtraSaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="XtraSaveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -21,10 +21,11 @@ Imports System.Threading
Public Class frmDocumentResultList Public Class frmDocumentResultList
Implements IResultForm Implements IResultForm
Private Const COLUMN_ICON = "ICON"
Private Const COLUMN_FILEPATH = "FULL_FILENAME" Private COLUMN_FILEPATH = "FULL_FILENAME"
Private Const COLUMN_FILENAME = "Filename" Private COLUMN_FILENAME = "Filename"
Private Const COLUMN_DOCID = "DocID" Private COLUMN_DOCID = "DocID"
Private COLUMN_ICON = "ICON"
Private _IsLoading As Boolean = True Private _IsLoading As Boolean = True
Private _IsLegacy As Boolean = True Private _IsLegacy As Boolean = True
@ -36,10 +37,10 @@ Public Class frmDocumentResultList
Private _Environment As Environment Private _Environment As Environment
Private _Params As DocumentResultParams Private _Params As DocumentResultParams
Private _ResultLists As List(Of DocumentResult) Private _ResultLists As List(Of DocumentResult)
Private _Helpers As DocumentResultList
Private _ActiveGrid As GridControl = Nothing Private _ActiveGrid As GridControl = Nothing
Private _ActiveGridBand As GridBand = Nothing Private _ActiveGridBand As GridBand = Nothing
Private _ActiveRowHandle As Integer = Constants.NO_ROW_HANDLE
Private _DocumentInfo As DocumentInfo = Nothing Private _DocumentInfo As DocumentInfo = Nothing
@ -52,47 +53,29 @@ Public Class frmDocumentResultList
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
Dim oConfigPath As String = Path.Combine(Application.UserAppDataPath, "ResultList", Params.WindowGuid) Dim oConfigPath As String = Path.Combine(Application.UserAppDataPath, "ResultList", Params.WindowGuid)
COLUMN_DOCID = Params.ColumnNames.ObjectIdColumn
COLUMN_FILENAME = Params.ColumnNames.FilenameColumn
COLUMN_FILEPATH = Params.ColumnNames.FullPathColumn
_LogConfig = LogConfig _LogConfig = LogConfig
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_Config = New ConfigManager(Of DocumentResultConfig)(LogConfig, oConfigPath, oConfigPath) _Config = New ConfigManager(Of DocumentResultConfig)(LogConfig, oConfigPath, oConfigPath)
_Helpers = New DocumentResultList(LogConfig)
_Environment = Environment _Environment = Environment
_Params = Params _Params = Params
_ResultLists = Params.Results _ResultLists = Params.Results
Try
Dim Culture = CultureInfo.CreateSpecificCulture(_Environment.User.Language)
' The following line provides localization for the application's user interface.
Thread.CurrentThread.CurrentUICulture = Culture
' The following line provides localization for data formats.
Thread.CurrentThread.CurrentCulture = Culture
' Set this culture as the default culture for all threads in this application.
' Note: The following properties are supported in the .NET Framework 4.5+
CultureInfo.DefaultThreadCurrentCulture = Culture
CultureInfo.DefaultThreadCurrentUICulture = Culture
Culture.DateTimeFormat.ShortDatePattern = _Environment.User.DateFormat
Catch ex As Exception
_Logger.Warn($"Error loading CultureInfo: {ex.Message}")
End Try
MaybeInitIDB()
End Sub
Private Sub MaybeInitIDB()
_IsLegacy = Not _Environment.Service.IsActive
If _Environment.Service.IsActive Then
Dim oSplit As List(Of String) = _Environment.Service.Address.Split(":").ToList()
Dim oAddress As String = oSplit.Item(0)
Dim oPort As Integer = oSplit.Item(1)
_IDBClient = New Client(_LogConfig, oAddress, oPort)
If Not _IDBClient.Connect() Then
_Logger.Warn("Client could not connect to Service at [{0}]", _Environment.Service.Address)
End If
End If
End Sub End Sub
Private Sub frmDocumentResultList_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmDocumentResultList_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try Try
MaybeInitIDB()
' Initialize Viewer with GDPicture.NET License
If _Environment.Settings.GdPictureKey = String.Empty Then
Throw New ApplicationException("GDPicture Licensekey is missing!")
End If
DocumentViewer1.Init(_LogConfig, _Environment.Settings.GdPictureKey)
' Load config ' Load config
SplitContainerControl1.SplitterPosition = _Config.Config.SplitContainer1Distance SplitContainerControl1.SplitterPosition = _Config.Config.SplitContainer1Distance
@ -115,12 +98,6 @@ Public Class frmDocumentResultList
SwitchDetailContainerHorizontal.Visibility = DevExpress.XtraBars.BarItemVisibility.Never SwitchDetailContainerHorizontal.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End If End If
'RibbonControl.Minimized = True
' Initialize Viewer with GDPicture.NET License
DocumentViewer1.Init(_LogConfig, _Environment.Settings.GdPictureKey)
AddHandler GridView1.FocusedRowChanged, AddressOf GridView_FocusedRowChanged AddHandler GridView1.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
AddHandler GridView2.FocusedRowChanged, AddressOf GridView_FocusedRowChanged AddHandler GridView2.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
AddHandler GridView3.FocusedRowChanged, AddressOf GridView_FocusedRowChanged AddHandler GridView3.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
@ -136,9 +113,10 @@ Public Class frmDocumentResultList
End Sub End Sub
Private Sub GridView_FocusedRowChanged(sender As GridView, e As FocusedRowChangedEventArgs) Private Sub GridView_FocusedRowChanged(sender As GridView, e As FocusedRowChangedEventArgs)
_ActiveRowHandle = e.FocusedRowHandle _Helpers.SetRowHandle(e)
Try Try
Reset_Errors()
Cursor = Cursors.WaitCursor Cursor = Cursors.WaitCursor
If e.FocusedRowHandle >= 0 Then If e.FocusedRowHandle >= 0 Then
@ -151,6 +129,9 @@ Public Class frmDocumentResultList
LoadFile_IDB(oRow) LoadFile_IDB(oRow)
End If End If
If IsNothing(_DocumentInfo) Or DocumentViewer1.FileLoaded = False Then
Show_Warning("File could not be loaded!")
End If
DocumentViewer1.LoadFile(_DocumentInfo.FullPath) DocumentViewer1.LoadFile(_DocumentInfo.FullPath)
If _DocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then If _DocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then
@ -163,12 +144,27 @@ Public Class frmDocumentResultList
End If End If
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
MsgBox("Error while changing row: " & ex.Message, MsgBoxStyle.Critical, Text) Show_CriticalError(ex.Message)
Finally Finally
Cursor = Cursors.Default Cursor = Cursors.Default
End Try End Try
End Sub End Sub
Private Sub MaybeInitIDB()
_IsLegacy = Not _Environment.Service.IsActive
If _Environment.Service.IsActive Then
Dim oSplit As List(Of String) = _Environment.Service.Address.Split(":").ToList()
Dim oAddress As String = oSplit.Item(0)
Dim oPort As Integer = oSplit.Item(1)
_IDBClient = New Client(_LogConfig, oAddress, oPort)
If Not _IDBClient.Connect() Then
_Logger.Warn("Client could not connect to Service at [{0}]", _Environment.Service.Address)
End If
End If
End Sub
Private Sub LoadFile_Legacy(GridRow As DataRow) Private Sub LoadFile_Legacy(GridRow As DataRow)
Try Try
Dim oFullPath = GridRow.Item(COLUMN_FILEPATH) Dim oFullPath = GridRow.Item(COLUMN_FILEPATH)
@ -192,7 +188,6 @@ Public Class frmDocumentResultList
_DocumentInfo = _IDBClient.GetDocumentInfo(_Environment.User.UserId, oObjectId) _DocumentInfo = _IDBClient.GetDocumentInfo(_Environment.User.UserId, oObjectId)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
MsgBox("Error while loading file", MsgBoxStyle.Critical, Text)
End Try End Try
End Sub End Sub
@ -276,7 +271,6 @@ Public Class frmDocumentResultList
labelResultCount.Caption = String.Format(labelResultCount.Caption, oTotalResults) labelResultCount.Caption = String.Format(labelResultCount.Caption, oTotalResults)
End Sub End Sub
Private Sub UpdateGridHeader(pResultList As List(Of DocumentResult), pIndex As Integer, pCount As Integer) Private Sub UpdateGridHeader(pResultList As List(Of DocumentResult), pIndex As Integer, pCount As Integer)
Select Case pIndex Select Case pIndex
Case 0 Case 0
@ -296,6 +290,14 @@ Public Class frmDocumentResultList
Private Sub CreateDocumentGrid(GridView As GridView, Datatable As DataTable) Private Sub CreateDocumentGrid(GridView As GridView, Datatable As DataTable)
Dim oDocDatatable As New DataTable Dim oDocDatatable As New DataTable
Try Try
If Datatable.Columns.Contains(COLUMN_DOCID) = False Then
Throw New ApplicationException($"Datatable is missing DocId Column [{COLUMN_DOCID}]!")
End If
If Datatable.Columns.Contains(COLUMN_FILEPATH) = False Then
Throw New ApplicationException($"Datatable is missing Filepath Column [{COLUMN_FILEPATH}]!")
End If
'Die Icon Colum erstellen und konfigurieren 'Die Icon Colum erstellen und konfigurieren
oDocDatatable.Columns.Add(New DataColumn() With { oDocDatatable.Columns.Add(New DataColumn() With {
.DataType = GetType(Image), .DataType = GetType(Image),
@ -314,7 +316,7 @@ Public Class frmDocumentResultList
}) })
oDocDatatable.Columns.Add(New DataColumn() With { oDocDatatable.Columns.Add(New DataColumn() With {
.DataType = GetType(String), .DataType = GetType(String),
.ColumnName = "Filename", .ColumnName = COLUMN_FILENAME,
.Caption = "Filename" .Caption = "Filename"
}) })
@ -340,12 +342,12 @@ Public Class frmDocumentResultList
oNewRow = oDocDatatable.NewRow() oNewRow = oDocDatatable.NewRow()
'Icon zuweisen 'Icon zuweisen
oNewRow.Item(0) = GetIconByExtension(oFullpath) oNewRow.Item(COLUMN_ICON) = _Helpers.GetIconByExtension(oFullpath)
'Den Filepath mitgeben 'Den Filepath mitgeben
oNewRow.Item(1) = oFullpath oNewRow.Item(COLUMN_FILEPATH) = oFullpath
oNewRow.Item(2) = oDocID oNewRow.Item(COLUMN_DOCID) = oDocID
oNewRow.Item(3) = oFilename oNewRow.Item(COLUMN_FILENAME) = oFilename
Dim oIndex = 4 'Fängt bei 4 an, um die definierten Spalten zu überspringen Dim oIndex = 4 'Fängt bei 4 an, um die definierten Spalten zu überspringen
For Each oColumnName As String In oRestColArray For Each oColumnName As String In oRestColArray
@ -404,55 +406,14 @@ Public Class frmDocumentResultList
GridView.OptionsView.BestFitMaxRowCount = -1 GridView.OptionsView.BestFitMaxRowCount = -1
GridView.BestFitColumns(True) GridView.BestFitColumns(True)
Catch ex As ApplicationException
MsgBox($"Error while loading grid data: {vbNewLine}{vbNewLine}{ex.Message}", MsgBoxStyle.Critical, Text)
_Logger.Error(ex)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
End Try End Try
End Sub End Sub
Private Function GetIconByExtension(FilePath As String) As Bitmap
Dim oFileextension = Path.GetExtension(FilePath)
Select Case oFileextension.ToUpper
Case ".csv".ToUpper
Return My.Resources.xls
Case ".txt".ToUpper
Return My.Resources.txt
Case ".pdf".ToUpper
Return My.Resources.pdf
Case ".doc".ToUpper
Return My.Resources.doc
Case ".docx".ToUpper
Return My.Resources.doc
Case ".xls".ToUpper
Return My.Resources.xls
Case ".xlsx".ToUpper
Return My.Resources.xls
Case ".xlsm".ToUpper
Return My.Resources.xls
Case ".ppt".ToUpper
Return My.Resources.ppt
Case ".pptx".ToUpper
Return My.Resources.ppt
Case ".dwg".ToUpper
Return My.Resources.dwg
Case ".dxf".ToUpper
Return My.Resources.dxf
Case ".msg".ToUpper
Return My.Resources._page
Case ".msg".ToUpper
Return My.Resources._page
Case ".tif".ToUpper
Return My.Resources.tiff
Case ".tiff".ToUpper
Return My.Resources.tiff
Case ".jpg".ToUpper
Return My.Resources.jpg
Case Else
Return My.Resources._blank
End Select
End Function
Private Sub SwitchMainContainerHorizontal_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SwitchMainContainerHorizontal.CheckedChanged Private Sub SwitchMainContainerHorizontal_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SwitchMainContainerHorizontal.CheckedChanged
SplitContainerControl1.Horizontal = SwitchMainContainerHorizontal.Checked SplitContainerControl1.Horizontal = SwitchMainContainerHorizontal.Checked
@ -508,7 +469,7 @@ Public Class frmDocumentResultList
Private Function GetActiveRow() As DataRow Private Function GetActiveRow() As DataRow
Dim oActiveGrid = GetActiveGridControl() Dim oActiveGrid = GetActiveGridControl()
Dim oActiveRowhandle = GetActiveRowHandle() Dim oActiveRowhandle = _Helpers.ActiveRowHandle
If oActiveGrid IsNot Nothing And oActiveRowhandle <> Constants.NO_ROW_HANDLE Then If oActiveGrid IsNot Nothing And oActiveRowhandle <> Constants.NO_ROW_HANDLE Then
Dim oView = DirectCast(oActiveGrid.DefaultView, GridView) Dim oView = DirectCast(oActiveGrid.DefaultView, GridView)
@ -527,13 +488,7 @@ Public Class frmDocumentResultList
Return _ActiveGrid Return _ActiveGrid
End Function End Function
Private Function GetActiveRowHandle() As Integer
If _ActiveRowHandle = Constants.NO_ROW_HANDLE Then
Return Constants.NO_ROW_HANDLE
End If
Return _ActiveRowHandle
End Function
Private Sub GridControl_Enter(sender As GridControl, e As EventArgs) Handles GridControl1.Enter, GridControl2.Enter, GridControl3.Enter Private Sub GridControl_Enter(sender As GridControl, e As EventArgs) Handles GridControl1.Enter, GridControl2.Enter, GridControl3.Enter
_ActiveGrid = sender _ActiveGrid = sender
@ -674,4 +629,20 @@ Public Class frmDocumentResultList
MsgBox("Unexpected Error while preparing context menu", MsgBoxStyle.Critical, Text) MsgBox("Unexpected Error while preparing context menu", MsgBoxStyle.Critical, Text)
End Try End Try
End Sub End Sub
Public Sub Show_CriticalError(Message As String)
labelCriticalError.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
labelCriticalError.Caption = Message
End Sub
Public Sub Show_Warning(Message As String)
labelWarning.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
labelWarning.Caption = Message
End Sub
Public Sub Reset_Errors()
labelCriticalError.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
labelWarning.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End Sub
End Class End Class

View File

@ -1,7 +1,8 @@
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a