Common: improve file watcher, fix refreshing data after update
This commit is contained in:
parent
533df59b1f
commit
c6e67a967c
@ -0,0 +1 @@
|
|||||||
|
DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
@ -9,9 +9,10 @@ Public Class ProfileSearches
|
|||||||
Private _LogConfig As LogConfig
|
Private _LogConfig As LogConfig
|
||||||
Private _Logger As Logger
|
Private _Logger As Logger
|
||||||
Private _Environment As Environment
|
Private _Environment As Environment
|
||||||
Private _Params As ClipboardWatcherParams
|
|
||||||
Private _Client As Client
|
Private _Client As Client
|
||||||
|
|
||||||
|
Private _ClipboardContents As String
|
||||||
|
|
||||||
Public Class Search
|
Public Class Search
|
||||||
Public Guid As Integer
|
Public Guid As Integer
|
||||||
Public DataTable As DataTable
|
Public DataTable As DataTable
|
||||||
@ -21,11 +22,11 @@ Public Class ProfileSearches
|
|||||||
Public SQLCommand As String
|
Public SQLCommand As String
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ClipboardWatcherParams)
|
Public Sub New(LogConfig As LogConfig, Environment As Environment, pClipboardContents As String)
|
||||||
_LogConfig = LogConfig
|
_LogConfig = LogConfig
|
||||||
_Logger = LogConfig.GetLogger()
|
_Logger = LogConfig.GetLogger()
|
||||||
_Environment = Environment
|
_Environment = Environment
|
||||||
_Params = Params
|
_ClipboardContents = pClipboardContents
|
||||||
Try
|
Try
|
||||||
If _Environment.Service.IsActive = True Then
|
If _Environment.Service.IsActive = True Then
|
||||||
Try
|
Try
|
||||||
@ -84,7 +85,7 @@ Public Class ProfileSearches
|
|||||||
oSQL = oRow.Item("SQL_COMMAND")
|
oSQL = oRow.Item("SQL_COMMAND")
|
||||||
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
|
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
|
||||||
oSQL = oPatterns.ReplaceInternalValues(oSQL)
|
oSQL = oPatterns.ReplaceInternalValues(oSQL)
|
||||||
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _Params.ClipboardContents)
|
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _ClipboardContents)
|
||||||
|
|
||||||
Dim oConnectionString = ProfileUtils.GetConnectionString(_Environment.Database, oConnectionId)
|
Dim oConnectionString = ProfileUtils.GetConnectionString(_Environment.Database, oConnectionId)
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ Public Class ProfileSearches
|
|||||||
oSQL = oRow.Item("SQL_COMMAND")
|
oSQL = oRow.Item("SQL_COMMAND")
|
||||||
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
|
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
|
||||||
oSQL = oPatterns.ReplaceInternalValues(oSQL)
|
oSQL = oPatterns.ReplaceInternalValues(oSQL)
|
||||||
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _Params.ClipboardContents)
|
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _ClipboardContents)
|
||||||
|
|
||||||
Dim oConnectionString = ProfileUtils.GetConnectionString(_Environment.Database, oConnectionId)
|
Dim oConnectionString = ProfileUtils.GetConnectionString(_Environment.Database, oConnectionId)
|
||||||
|
|
||||||
|
|||||||
@ -41,8 +41,11 @@ Public Class frmMatch
|
|||||||
Private ShouldHideInitially As Boolean = False
|
Private ShouldHideInitially As Boolean = False
|
||||||
|
|
||||||
Private Const NO_COUNT_SQL As Integer = 99998
|
Private Const NO_COUNT_SQL As Integer = 99998
|
||||||
|
|
||||||
Private Const INVALID_COUNT_SQL As Integer = 99999
|
Private Const INVALID_COUNT_SQL As Integer = 99999
|
||||||
|
|
||||||
|
'Public Event ResultsRefreshed As EventHandler
|
||||||
|
|
||||||
Private Enum ProfileType
|
Private Enum ProfileType
|
||||||
ANY = 0
|
ANY = 0
|
||||||
DOCS_ONLY = 1
|
DOCS_ONLY = 1
|
||||||
@ -133,7 +136,7 @@ Public Class frmMatch
|
|||||||
|
|
||||||
If oCreatedTiles = 1 Then
|
If oCreatedTiles = 1 Then
|
||||||
Dim oProfile As ProfileData = _Params.MatchingProfiles.First()
|
Dim oProfile As ProfileData = _Params.MatchingProfiles.First()
|
||||||
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params)
|
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params.ClipboardContents)
|
||||||
|
|
||||||
If oProfile.CountDocs > 0 And oProfile.CountData = 0 Then
|
If oProfile.CountDocs > 0 And oProfile.CountData = 0 Then
|
||||||
_Logger.Debug($"ONLY Docs")
|
_Logger.Debug($"ONLY Docs")
|
||||||
@ -308,7 +311,7 @@ Public Class frmMatch
|
|||||||
Dim oItem As TileItem = e.Item
|
Dim oItem As TileItem = e.Item
|
||||||
Dim oProfileId As Integer = oItem.Tag
|
Dim oProfileId As Integer = oItem.Tag
|
||||||
|
|
||||||
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params)
|
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params.ClipboardContents)
|
||||||
Dim oProfile As ProfileData = _Params.MatchingProfiles.
|
Dim oProfile As ProfileData = _Params.MatchingProfiles.
|
||||||
Where(Function(p) p.Guid = oProfileId).
|
Where(Function(p) p.Guid = oProfileId).
|
||||||
ToList().
|
ToList().
|
||||||
@ -345,7 +348,8 @@ Public Class frmMatch
|
|||||||
Dim oParams = New DocumentResultList.Params() With {
|
Dim oParams = New DocumentResultList.Params() With {
|
||||||
.WindowGuid = oWindowGuid,
|
.WindowGuid = oWindowGuid,
|
||||||
.WindowTitle = GetResultWindowString(_Params.ClipboardContents),
|
.WindowTitle = GetResultWindowString(_Params.ClipboardContents),
|
||||||
.OperationModeOverride = _Params.OperationModeOverride
|
.OperationModeOverride = _Params.OperationModeOverride,
|
||||||
|
.ProfileGuid = Profile.Guid
|
||||||
}
|
}
|
||||||
|
|
||||||
For Each oSearch In Searches
|
For Each oSearch In Searches
|
||||||
@ -357,8 +361,11 @@ Public Class frmMatch
|
|||||||
|
|
||||||
Dim oForm As New frmDocumentResultList(_LogConfig, _Environment, oParams)
|
Dim oForm As New frmDocumentResultList(_LogConfig, _Environment, oParams)
|
||||||
AddHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed
|
AddHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed
|
||||||
|
AddHandler oForm.NeedsRefresh, AddressOf ProfileResultForm_NeedsRefresh
|
||||||
|
|
||||||
OpenForms.Add(oForm)
|
OpenForms.Add(oForm)
|
||||||
oForm.Show()
|
oForm.Show()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenDataResults(Profile As ProfileData, Searches As List(Of ProfileSearches.Search))
|
Private Sub OpenDataResults(Profile As ProfileData, Searches As List(Of ProfileSearches.Search))
|
||||||
@ -406,4 +413,23 @@ Public Class frmMatch
|
|||||||
Show()
|
Show()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Async Sub ProfileResultForm_NeedsRefresh(sender As Object, e As Integer)
|
||||||
|
Dim oThisForm As IResultForm = sender
|
||||||
|
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params.ClipboardContents)
|
||||||
|
|
||||||
|
If TypeOf sender Is frmDocumentResultList Then
|
||||||
|
Dim oProfileId = e
|
||||||
|
Dim oSearches = Await oProfileSearch.LoadDocumentSearchesAsync(oProfileId)
|
||||||
|
Dim oResults = oSearches.Select(Function(search)
|
||||||
|
Return New DocumentResultList.DocumentResult() With {
|
||||||
|
.Title = search.TabCaption,
|
||||||
|
.Datatable = search.DataTable
|
||||||
|
}
|
||||||
|
End Function).ToList()
|
||||||
|
|
||||||
|
'RaiseEvent ResultsRefreshed(Me, Nothing)
|
||||||
|
oThisForm.RefreshResults(oResults)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -190,6 +190,10 @@
|
|||||||
<Project>{3DCD6D1A-C830-4241-B7E4-27430E7EA483}</Project>
|
<Project>{3DCD6D1A-C830-4241-B7E4-27430E7EA483}</Project>
|
||||||
<Name>LookupControl</Name>
|
<Name>LookupControl</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\MessageBoxEx\MessageBoxEx.vbproj">
|
||||||
|
<Project>{ef29f400-be45-4283-9d18-ca7acd9accc9}</Project>
|
||||||
|
<Name>MessageBoxEx</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Modules.Base\Base\Base.vbproj">
|
<ProjectReference Include="..\Modules.Base\Base\Base.vbproj">
|
||||||
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
||||||
<Name>Base</Name>
|
<Name>Base</Name>
|
||||||
@ -303,5 +307,14 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\editcolors.svg" />
|
<None Include="Resources\editcolors.svg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\actions_question.svg" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{94E38DFF-614B-4CBD-B67C-F211BB35CE8B}" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\refreshallpivottable.svg" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@ -33,6 +33,8 @@ Public Class frmDataResultList
|
|||||||
|
|
||||||
Private Property OperationMode As OperationMode Implements IResultForm.OperationMode
|
Private Property OperationMode As OperationMode Implements IResultForm.OperationMode
|
||||||
|
|
||||||
|
Public Event NeedsRefresh As EventHandler(Of Integer) Implements IResultForm.NeedsRefresh
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As DataResultParams)
|
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As DataResultParams)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|||||||
@ -10,6 +10,7 @@ Namespace DocumentResultList
|
|||||||
Public Results As New List(Of DocumentResult)
|
Public Results As New List(Of DocumentResult)
|
||||||
Public ColumnNames As New ColumnNames
|
Public ColumnNames As New ColumnNames
|
||||||
Public OperationModeOverride As OperationMode = OperationMode.None
|
Public OperationModeOverride As OperationMode = OperationMode.None
|
||||||
|
Public ProfileGuid As Integer
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class DocumentResult
|
Public Class DocumentResult
|
||||||
|
|||||||
@ -35,6 +35,7 @@ Namespace DocumentResultList
|
|||||||
Public ProcessId As Integer
|
Public ProcessId As Integer
|
||||||
Public FilePath As String
|
Public FilePath As String
|
||||||
Public CurrentlyProcessing As Boolean = False
|
Public CurrentlyProcessing As Boolean = False
|
||||||
|
Public Exited As Boolean = False
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class FileChangedArgs
|
Public Class FileChangedArgs
|
||||||
@ -51,11 +52,11 @@ Namespace DocumentResultList
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Async Function OpenDocument(pDocument As Document) As Task(Of Boolean)
|
Public Async Function OpenDocument(pDocument As Document) As Task(Of Boolean)
|
||||||
Dim oResult As Tuple(Of Process, String) = Nothing
|
Dim oResult As Tuple(Of Integer, String) = Nothing
|
||||||
|
|
||||||
If pDocument.FullPath IsNot Nothing AndAlso pDocument.FullPath.Trim <> String.Empty Then
|
If pDocument.FullPath IsNot Nothing AndAlso pDocument.FullPath.Trim <> String.Empty Then
|
||||||
' TODO: DONT put into openfiles
|
' TODO: DONT put into openfiles
|
||||||
oResult = OpenFileFromPath(pDocument)
|
oResult = Await OpenFileFromPath(pDocument)
|
||||||
|
|
||||||
ElseIf pDocument.Extension IsNot Nothing AndAlso pDocument.Contents IsNot Nothing Then
|
ElseIf pDocument.Extension IsNot Nothing AndAlso pDocument.Contents IsNot Nothing Then
|
||||||
oResult = Await OpenFileFromByteArray(pDocument)
|
oResult = Await OpenFileFromByteArray(pDocument)
|
||||||
@ -67,15 +68,15 @@ Namespace DocumentResultList
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oProcess = oResult.Item1
|
Dim oProcessId = oResult.Item1
|
||||||
Dim oFilePath = oResult.Item2
|
Dim oFilePath = oResult.Item2
|
||||||
|
|
||||||
Logger.Debug("File [{0}] opened with ProcessId [{1}]", oFilePath, oProcess.Id)
|
Logger.Debug("File [{0}] opened with ProcessId [{1}]", oFilePath, oProcessId)
|
||||||
|
|
||||||
Dim oOpenFile = New OpenFile With {
|
Dim oOpenFile = New OpenFile With {
|
||||||
.Document = pDocument,
|
.Document = pDocument,
|
||||||
.FilePath = oFilePath,
|
.FilePath = oFilePath,
|
||||||
.ProcessId = oProcess.Id
|
.ProcessId = oProcessId
|
||||||
}
|
}
|
||||||
OpenFiles.Add(oOpenFile)
|
OpenFiles.Add(oOpenFile)
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ Namespace DocumentResultList
|
|||||||
ProcessedFiles.Remove(pOpenFile)
|
ProcessedFiles.Remove(pOpenFile)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Function OpenFileFromByteArray(pDocument As Document) As Task(Of Tuple(Of Process, String))
|
Private Async Function OpenFileFromByteArray(pDocument As Document) As Task(Of Tuple(Of Integer, String))
|
||||||
Try
|
Try
|
||||||
Dim oTempPath = Path.Combine(Path.GetTempPath(), Constants.TEMP_PATH_SUBFOLDER)
|
Dim oTempPath = Path.Combine(Path.GetTempPath(), Constants.TEMP_PATH_SUBFOLDER)
|
||||||
Dim oDirectory = Directory.CreateDirectory(oTempPath)
|
Dim oDirectory = Directory.CreateDirectory(oTempPath)
|
||||||
@ -110,8 +111,9 @@ Namespace DocumentResultList
|
|||||||
End Using
|
End Using
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
Dim oProcess = DoOpenFile(oFilePath)
|
Dim oProcessId = Await DoOpenFile(oFilePath)
|
||||||
Return New Tuple(Of Process, String)(oProcess, oFilePath)
|
|
||||||
|
Return New Tuple(Of Integer, String)(oProcessId, oFilePath)
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
@ -120,10 +122,10 @@ Namespace DocumentResultList
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function OpenFileFromPath(pDocument As Document) As Tuple(Of Process, String)
|
Private Async Function OpenFileFromPath(pDocument As Document) As Task(Of Tuple(Of Integer, String))
|
||||||
Try
|
Try
|
||||||
Dim oProcess = DoOpenFile(pDocument.FullPath)
|
Dim oProcessId = Await DoOpenFile(pDocument.FullPath)
|
||||||
Return New Tuple(Of Process, String)(oProcess, pDocument.FullPath)
|
Return New Tuple(Of Integer, String)(oProcessId, pDocument.FullPath)
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
@ -131,12 +133,28 @@ Namespace DocumentResultList
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function DoOpenFile(pFilePath As String) As Process
|
Private Async Function DoOpenFile(pFilePath As String) As Task(Of Integer)
|
||||||
Dim oProcess = Process.Start(New ProcessStartInfo With {
|
Dim _Process = New Process
|
||||||
.FileName = pFilePath
|
_Process.StartInfo.FileName = pFilePath
|
||||||
})
|
_Process.EnableRaisingEvents = True
|
||||||
|
|
||||||
Return oProcess
|
AddHandler _Process.Exited, AddressOf Process_Exited
|
||||||
|
|
||||||
|
_Process.Start()
|
||||||
|
|
||||||
|
Return _Process.Id
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Process_Exited(sender As Object, e As EventArgs) As Boolean
|
||||||
|
Debug.WriteLine("Process is exited")
|
||||||
|
|
||||||
|
Dim oProcess As Process = sender
|
||||||
|
Dim oOpenFile = OpenFiles.
|
||||||
|
Where(Function(file) file.ProcessId = oProcess.Id).
|
||||||
|
SingleOrDefault()
|
||||||
|
oOpenFile.Exited = True
|
||||||
|
|
||||||
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub FileOpenTimer_Elapsed() Handles FileOpenTimer.Elapsed
|
Private Sub FileOpenTimer_Elapsed() Handles FileOpenTimer.Elapsed
|
||||||
@ -154,9 +172,11 @@ Namespace DocumentResultList
|
|||||||
|
|
||||||
' Check if the file is currently in use, and skip if it is.
|
' Check if the file is currently in use, and skip if it is.
|
||||||
Dim oIsLocked = FileEx.TestFileIsLocked(oOpenFile.FilePath)
|
Dim oIsLocked = FileEx.TestFileIsLocked(oOpenFile.FilePath)
|
||||||
|
Dim oIsExited = oOpenFile.Exited
|
||||||
Debug.WriteLine($"File is locked: [{oIsLocked}]")
|
Debug.WriteLine($"File is locked: [{oIsLocked}]")
|
||||||
|
Debug.WriteLine($"File is exited: [{oIsExited}]")
|
||||||
|
|
||||||
If oIsLocked Then
|
If oIsLocked Or oIsExited = False Then
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
Public Interface IResultForm
|
Public Interface IResultForm
|
||||||
Property OperationMode As OperationMode
|
Property OperationMode As OperationMode
|
||||||
|
|
||||||
Property ShouldReturnToPreviousForm As Boolean
|
Property ShouldReturnToPreviousForm As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
Event NeedsRefresh As EventHandler(Of Integer)
|
||||||
|
|
||||||
Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean
|
Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean
|
||||||
End Interface
|
End Interface
|
||||||
|
|||||||
20
GUIs.Common/My Project/Resources.Designer.vb
generated
20
GUIs.Common/My Project/Resources.Designer.vb
generated
@ -80,6 +80,16 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property actions_question() As DevExpress.Utils.Svg.SvgImage
|
||||||
|
Get
|
||||||
|
Dim obj As Object = ResourceManager.GetObject("actions_question", resourceCulture)
|
||||||
|
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@ -230,6 +240,16 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property refreshallpivottable() As DevExpress.Utils.Svg.SvgImage
|
||||||
|
Get
|
||||||
|
Dim obj As Object = ResourceManager.GetObject("refreshallpivottable", resourceCulture)
|
||||||
|
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@ -127,6 +127,9 @@
|
|||||||
<data name="tiff" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="tiff" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\tiff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\tiff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="_blank" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\_blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="ZooFlow-Vergroessern" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ZooFlow-Vergroessern" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ZooFlow-Vergroessern.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>..\Resources\ZooFlow-Vergroessern.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
@ -172,6 +175,9 @@
|
|||||||
<data name="zoom_more" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="zoom_more" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\zoom_more.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\zoom_more.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="actions_question" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\actions_question.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
<data name="grid" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="grid" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\grid.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>..\Resources\grid.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
@ -181,8 +187,8 @@
|
|||||||
<data name="dxf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="dxf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\dxf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\dxf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="_blank" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="editcolors" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\_blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\editcolors.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="singlepageview1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="singlepageview1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\singlepageview1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>..\Resources\singlepageview1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
@ -190,7 +196,7 @@
|
|||||||
<data name="copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\copy.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>..\Resources\copy.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="editcolors" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="refreshallpivottable" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\editcolors.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>..\Resources\refreshallpivottable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@ -1,3 +1,4 @@
|
|||||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
|||||||
15
GUIs.Common/Resources/actions_question.svg
Normal file
15
GUIs.Common/Resources/actions_question.svg
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||||
|
<style type="text/css">
|
||||||
|
.Blue{fill:#1177D7;}
|
||||||
|
.Yellow{fill:#FFB115;}
|
||||||
|
.Black{fill:#727272;}
|
||||||
|
.Green{fill:#039C23;}
|
||||||
|
.Red{fill:#D11C1C;}
|
||||||
|
.st0{opacity:0.75;}
|
||||||
|
.st1{opacity:0.5;}
|
||||||
|
</style>
|
||||||
|
<g id="Question">
|
||||||
|
<path d="M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14S23.7,2,16,2z M16,24c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2 s2,0.9,2,2C18,23.1,17.1,24,16,24z M20.7,13.3c-0.2,0.4-0.4,0.7-0.6,1c-0.3,0.3-0.5,0.5-0.8,0.7c-0.3,0.2-0.6,0.4-0.9,0.6 c-0.3,0.2-0.5,0.4-0.7,0.7c-0.2,0.3-0.3,0.6-0.4,1V18h-2.7v-0.9c0-0.6,0.2-1,0.3-1.4c0.2-0.4,0.4-0.7,0.6-1 c0.2-0.3,0.5-0.5,0.8-0.7c0.3-0.2,0.5-0.4,0.8-0.6c0.2-0.2,0.4-0.4,0.6-0.6c0.1-0.2,0.2-0.5,0.2-0.9c0-0.6-0.2-1-0.5-1.3 c-0.3-0.3-0.7-0.4-1.3-0.4c-0.4,0-0.7,0.1-0.9,0.2c-0.3,0.1-0.5,0.3-0.7,0.5c-0.2,0.2-0.3,0.5-0.4,0.8C14,12.1,14,12.7,14,13h-3 c0-0.7,0.1-1.6,0.4-2.1c0.2-0.6,0.6-1.1,1-1.5c0.4-0.4,0.9-0.8,1.5-1c0.6-0.2,1.3-0.4,2-0.4c1,0,1.8,0.1,2.4,0.4 c0.6,0.3,1.2,0.6,1.6,0.9c0.4,0.4,0.7,0.8,0.8,1.2s0.3,0.8,0.3,1.2C21,12.4,20.9,12.9,20.7,13.3z" class="Green" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
7
GUIs.Common/Resources/refreshallpivottable.svg
Normal file
7
GUIs.Common/Resources/refreshallpivottable.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Refresh_All_Pivot_Table" style="enable-background:new 0 0 32 32">
|
||||||
|
<style type="text/css">
|
||||||
|
.Green{fill:#039C23;}
|
||||||
|
</style>
|
||||||
|
<path d="M30,2v12h-0.2h-4H18l5-5c-1.8-1.8-4.3-3-7-3c-4.8,0-8.9,3.4-9.8,8h-4C3.1,7.2,8.9,2,16,2 c3.9,0,7.4,1.6,9.9,4.1L30,2z M16,26c-2.8,0-5.2-1.1-7-3l5-5H6.2h-4H2v12l4.1-4.1c2.5,2.5,6,4.1,9.9,4.1c7.1,0,12.9-5.2,13.8-12h-4 C24.9,22.6,20.8,26,16,26z" class="Green" />
|
||||||
|
</svg>
|
||||||
14
GUIs.Common/frmDocumentResultList.Designer.vb
generated
14
GUIs.Common/frmDocumentResultList.Designer.vb
generated
@ -43,6 +43,7 @@ Partial Class frmDocumentResultList
|
|||||||
Me.MenuItemPropertiesECM = New DevExpress.XtraBars.BarButtonItem()
|
Me.MenuItemPropertiesECM = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.MenuItemsOpenFileZooFlow = New DevExpress.XtraBars.BarButtonItem()
|
Me.MenuItemsOpenFileZooFlow = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.MenuItemPropertiesZooFlow = New DevExpress.XtraBars.BarButtonItem()
|
Me.MenuItemPropertiesZooFlow = New DevExpress.XtraBars.BarButtonItem()
|
||||||
|
Me.ButtonRefresh = New DevExpress.XtraBars.BarButtonItem()
|
||||||
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()
|
||||||
@ -150,9 +151,9 @@ 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.BarStaticItem1, Me.labelResultCount, Me.BarButtonBack, Me.BarButtonResetLayout, Me.labelCriticalError, Me.labelWarning, Me.MenuItemFileOpen, Me.MenuItemPropertiesIDB, Me.MenuItemFolderOpen, Me.MenuItemFilepathCopy, Me.MenuItemFolderpathCopy, Me.MenuItemPropertiesECM, Me.MenuItemsOpenFileZooFlow, Me.MenuItemPropertiesZooFlow})
|
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.MenuItemPropertiesECM, Me.MenuItemsOpenFileZooFlow, Me.MenuItemPropertiesZooFlow, Me.ButtonRefresh})
|
||||||
resources.ApplyResources(Me.RibbonControl, "RibbonControl")
|
resources.ApplyResources(Me.RibbonControl, "RibbonControl")
|
||||||
Me.RibbonControl.MaxItemId = 29
|
Me.RibbonControl.MaxItemId = 30
|
||||||
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.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1, Me.RepositoryItemTextEdit2})
|
||||||
@ -295,6 +296,13 @@ Partial Class frmDocumentResultList
|
|||||||
Me.MenuItemPropertiesZooFlow.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.editcolors
|
Me.MenuItemPropertiesZooFlow.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.editcolors
|
||||||
Me.MenuItemPropertiesZooFlow.Name = "MenuItemPropertiesZooFlow"
|
Me.MenuItemPropertiesZooFlow.Name = "MenuItemPropertiesZooFlow"
|
||||||
'
|
'
|
||||||
|
'BarButtonItem1
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.ButtonRefresh, "BarButtonItem1")
|
||||||
|
Me.ButtonRefresh.Id = 29
|
||||||
|
Me.ButtonRefresh.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.refreshallpivottable
|
||||||
|
Me.ButtonRefresh.Name = "BarButtonItem1"
|
||||||
|
'
|
||||||
'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})
|
||||||
@ -305,6 +313,7 @@ Partial Class frmDocumentResultList
|
|||||||
'
|
'
|
||||||
Me.RibbonPageGroup_Navigation.AllowTextClipping = False
|
Me.RibbonPageGroup_Navigation.AllowTextClipping = False
|
||||||
Me.RibbonPageGroup_Navigation.ItemLinks.Add(Me.BarButtonBack)
|
Me.RibbonPageGroup_Navigation.ItemLinks.Add(Me.BarButtonBack)
|
||||||
|
Me.RibbonPageGroup_Navigation.ItemLinks.Add(Me.ButtonRefresh)
|
||||||
Me.RibbonPageGroup_Navigation.Name = "RibbonPageGroup_Navigation"
|
Me.RibbonPageGroup_Navigation.Name = "RibbonPageGroup_Navigation"
|
||||||
resources.ApplyResources(Me.RibbonPageGroup_Navigation, "RibbonPageGroup_Navigation")
|
resources.ApplyResources(Me.RibbonPageGroup_Navigation, "RibbonPageGroup_Navigation")
|
||||||
'
|
'
|
||||||
@ -571,4 +580,5 @@ Partial Class frmDocumentResultList
|
|||||||
Friend WithEvents MenuFullAccess_ZOOFLOW As DevExpress.XtraBars.PopupMenu
|
Friend WithEvents MenuFullAccess_ZOOFLOW As DevExpress.XtraBars.PopupMenu
|
||||||
Friend WithEvents MenuItemsOpenFileZooFlow As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents MenuItemsOpenFileZooFlow As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents MenuItemPropertiesZooFlow As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents MenuItemPropertiesZooFlow As DevExpress.XtraBars.BarButtonItem
|
||||||
|
Friend WithEvents ButtonRefresh As DevExpress.XtraBars.BarButtonItem
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -426,6 +426,9 @@
|
|||||||
<data name="MenuItemPropertiesZooFlow.Caption" xml:space="preserve">
|
<data name="MenuItemPropertiesZooFlow.Caption" xml:space="preserve">
|
||||||
<value>Eigenschaften</value>
|
<value>Eigenschaften</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BarButtonItem1.Caption" xml:space="preserve">
|
||||||
|
<value>Ergebnisse aktualisieren</value>
|
||||||
|
</data>
|
||||||
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
@ -975,6 +978,12 @@
|
|||||||
<data name=">>MenuItemPropertiesZooFlow.Type" xml:space="preserve">
|
<data name=">>MenuItemPropertiesZooFlow.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>BarButtonItem1.Name" xml:space="preserve">
|
||||||
|
<value>BarButtonItem1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>BarButtonItem1.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
||||||
<value>RibbonPage1</value>
|
<value>RibbonPage1</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@ -20,6 +20,7 @@ Imports DigitalData.Modules.Logging
|
|||||||
Imports DigitalData.Modules.ZooFlow
|
Imports DigitalData.Modules.ZooFlow
|
||||||
Imports DigitalData.Modules.ZooFlow.Constants
|
Imports DigitalData.Modules.ZooFlow.Constants
|
||||||
Imports DigitalData.Modules.Base.IDB.FileStore
|
Imports DigitalData.Modules.Base.IDB.FileStore
|
||||||
|
Imports DigitalData.Controls.MessageBoxEx
|
||||||
|
|
||||||
Public Class frmDocumentResultList
|
Public Class frmDocumentResultList
|
||||||
Implements IResultForm
|
Implements IResultForm
|
||||||
@ -46,7 +47,6 @@ Public Class frmDocumentResultList
|
|||||||
Private ReadOnly Logger As Logger
|
Private ReadOnly Logger As Logger
|
||||||
Private ReadOnly Config As ConfigManager(Of DocumentResultList.Config)
|
Private ReadOnly Config As ConfigManager(Of DocumentResultList.Config)
|
||||||
Private ReadOnly Environment As Environment
|
Private ReadOnly Environment As Environment
|
||||||
Private ReadOnly ResultLists As List(Of DocumentResultList.DocumentResult)
|
|
||||||
Private ReadOnly Filesystem As Modules.Filesystem.File
|
Private ReadOnly Filesystem As Modules.Filesystem.File
|
||||||
Private ReadOnly GridBuilder As GridBuilder
|
Private ReadOnly GridBuilder As GridBuilder
|
||||||
Private ReadOnly FileEx As Modules.Windows.File
|
Private ReadOnly FileEx As Modules.Windows.File
|
||||||
@ -59,6 +59,8 @@ Public Class frmDocumentResultList
|
|||||||
Private Documentloader As DocumentResultList.Loader
|
Private Documentloader As DocumentResultList.Loader
|
||||||
|
|
||||||
' Runtime variables
|
' Runtime variables
|
||||||
|
Private Property _ResultLists As List(Of DocumentResultList.DocumentResult)
|
||||||
|
|
||||||
Private _IsLoading As Boolean = True
|
Private _IsLoading As Boolean = True
|
||||||
Private _ActiveGrid As GridControl = Nothing
|
Private _ActiveGrid As GridControl = Nothing
|
||||||
Private _ActiveGridBand As GridBand = Nothing
|
Private _ActiveGridBand As GridBand = Nothing
|
||||||
@ -72,6 +74,11 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
|
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
|
||||||
|
|
||||||
|
Public Event NeedsRefresh As EventHandler(Of Integer) Implements IResultForm.NeedsRefresh
|
||||||
|
Public Event ResultsRefreshed As EventHandler(Of List(Of DocumentResultList.DocumentResult))
|
||||||
|
|
||||||
|
Public Delegate Sub SetDatasourceCallback(pDatatable As DataTable)
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pParams As DocumentResultList.Params)
|
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pParams As DocumentResultList.Params)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
@ -96,7 +103,7 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
Environment = pEnvironment
|
Environment = pEnvironment
|
||||||
Params = pParams
|
Params = pParams
|
||||||
ResultLists = pParams.Results
|
_ResultLists = pParams.Results
|
||||||
|
|
||||||
_Language = Utils.NotNull(Me.Environment.User.Language, State.UserState.LANG_EN_US)
|
_Language = Utils.NotNull(Me.Environment.User.Language, State.UserState.LANG_EN_US)
|
||||||
End Sub
|
End Sub
|
||||||
@ -127,6 +134,8 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Documentloader = New DocumentResultList.Loader(LogConfig, OperationMode, _IDBClient, Environment.User)
|
Documentloader = New DocumentResultList.Loader(LogConfig, OperationMode, _IDBClient, Environment.User)
|
||||||
|
|
||||||
If Params.WindowTitle <> "" Then
|
If Params.WindowTitle <> "" Then
|
||||||
@ -316,26 +325,29 @@ Public Class frmDocumentResultList
|
|||||||
MsgBox($"Beim Speichern der Datei '{oFileInfo.Name}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
|
MsgBox($"Beim Speichern der Datei '{oFileInfo.Name}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
|
||||||
Else
|
Else
|
||||||
MsgBox($"Die Datei '{oFileInfo.Name}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
|
MsgBox($"Die Datei '{oFileInfo.Name}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
|
||||||
|
RaiseEvent NeedsRefresh(Me, Params.ProfileGuid)
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Async Function Watcher_Ask(pFile As DocumentResultList.Watcher.OpenFile) As Task
|
Private Async Function Watcher_Ask(pFile As DocumentResultList.Watcher.OpenFile) As Task
|
||||||
Dim oFileInfo = New FileInfo(pFile.FilePath)
|
Dim oFileInfo = New FileInfo(pFile.FilePath)
|
||||||
Dim oMessage = $"Die Datei '{oFileInfo.Name}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen? 'Nein' überschreibt die ursprüngliche Datei."
|
Dim oMessage = $"Die Datei '{oFileInfo.Name}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
|
||||||
Dim oResult As DialogResult = MsgBox(oMessage, MsgBoxStyle.YesNoCancel Or MsgBoxStyle.Question, "Datei verändert")
|
|
||||||
|
|
||||||
Select Case oResult
|
Dim oMessageBox As New MsgBoxEx(oMessage, "Datei verändert", MessageBoxIcon.Question)
|
||||||
Case DialogResult.Yes
|
oMessageBox.SetButtons("Überschreiben", "Neue Version", "Abbrechen")
|
||||||
Await Watcher_VersionFile(pFile)
|
oMessageBox.ShowDialog()
|
||||||
|
|
||||||
Case DialogResult.No
|
Select Case oMessageBox.Result
|
||||||
|
Case MsgBoxEx.DialogBoxResult.Button1
|
||||||
Await Watcher_OverwriteFile(pFile)
|
Await Watcher_OverwriteFile(pFile)
|
||||||
|
|
||||||
|
Case MsgBoxEx.DialogBoxResult.Button2
|
||||||
|
Await Watcher_VersionFile(pFile)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
' Cancel, do nothing
|
' Cancel, do nothing
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
@ -366,7 +378,8 @@ Public Class frmDocumentResultList
|
|||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
MessageBox.Show("Error while loading results:" & vbNewLine & vbNewLine & ex.Message, Text)
|
|
||||||
|
MessageBox.Show("Error while loading results:" & vbNewLine & vbNewLine & ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||||
Return False
|
Return False
|
||||||
Finally
|
Finally
|
||||||
_IsLoading = False
|
_IsLoading = False
|
||||||
@ -382,37 +395,49 @@ Public Class frmDocumentResultList
|
|||||||
Throw New ApplicationException($"Datatable is missing Filepath Column [{COLUMN_FILEPATH}] for search {Result.Title}!")
|
Throw New ApplicationException($"Datatable is missing Filepath Column [{COLUMN_FILEPATH}] for search {Result.Title}!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GridControl1.DataSource = Result.Datatable
|
' This is needed to update the grid from another form like frmMatch
|
||||||
GridControl1.ForceInitialize()
|
' Another form means another thread, so we need a delegate here
|
||||||
|
If GridControl1.InvokeRequired Then
|
||||||
|
Dim oCallback As New SetDatasourceCallback(AddressOf SetGridDataSource)
|
||||||
|
Invoke(oCallback, Result.Datatable)
|
||||||
|
|
||||||
|
Else
|
||||||
|
SetGridDataSource(Result.Datatable)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetGridDataSource(pTable As DataTable)
|
||||||
|
GridControl1.DataSource = Nothing
|
||||||
|
GridControl1.DataSource = pTable
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateGridData()
|
Private Sub UpdateGridData()
|
||||||
' Load Grids
|
' Load Grids
|
||||||
For oIndex = 0 To ResultLists.Count - 1
|
For oIndex = 0 To _ResultLists.Count - 1
|
||||||
Select Case oIndex
|
Select Case oIndex
|
||||||
Case 0
|
Case 0
|
||||||
Dim oResult As DocumentResultList.DocumentResult = ResultLists.Item(0)
|
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(0)
|
||||||
|
|
||||||
LoadGridData(oResult)
|
LoadGridData(oResult)
|
||||||
CreateDocumentGrid(GridView1, oResult)
|
CreateDocumentGrid(GridView1, oResult)
|
||||||
RestoreLayout(GridView1)
|
RestoreLayout(GridView1)
|
||||||
UpdateGridHeader(ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
||||||
|
|
||||||
Case 1
|
Case 1
|
||||||
Dim oResult As DocumentResultList.DocumentResult = ResultLists.Item(1)
|
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(1)
|
||||||
|
|
||||||
LoadGridData(oResult)
|
LoadGridData(oResult)
|
||||||
CreateDocumentGrid(GridView2, oResult)
|
CreateDocumentGrid(GridView2, oResult)
|
||||||
RestoreLayout(GridView2)
|
RestoreLayout(GridView2)
|
||||||
UpdateGridHeader(ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
||||||
|
|
||||||
Case 2
|
Case 2
|
||||||
Dim oResult As DocumentResultList.DocumentResult = ResultLists.Item(2)
|
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(2)
|
||||||
|
|
||||||
LoadGridData(oResult)
|
LoadGridData(oResult)
|
||||||
CreateDocumentGrid(GridView3, oResult)
|
CreateDocumentGrid(GridView3, oResult)
|
||||||
RestoreLayout(GridView3)
|
RestoreLayout(GridView3)
|
||||||
UpdateGridHeader(ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
MessageBox.Show(Constants.MESSAGE_TOO_MANY_SEARCHES, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
MessageBox.Show(Constants.MESSAGE_TOO_MANY_SEARCHES, Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
||||||
@ -421,7 +446,7 @@ Public Class frmDocumentResultList
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
' Hide Grids depending on Result count
|
' Hide Grids depending on Result count
|
||||||
Select Case ResultLists.Count
|
Select Case _ResultLists.Count
|
||||||
Case 0
|
Case 0
|
||||||
|
|
||||||
SplitContainerControl1.SetPanelCollapsed(True)
|
SplitContainerControl1.SetPanelCollapsed(True)
|
||||||
@ -453,7 +478,7 @@ Public Class frmDocumentResultList
|
|||||||
Private Sub UpdateTotalResults()
|
Private Sub UpdateTotalResults()
|
||||||
Dim oTotalResults = 0
|
Dim oTotalResults = 0
|
||||||
|
|
||||||
For Each oList In ResultLists
|
For Each oList In _ResultLists
|
||||||
oTotalResults += oList.Datatable.Rows.Count
|
oTotalResults += oList.Datatable.Rows.Count
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@ -640,17 +665,17 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
Private Sub GridView1_ColumnFilterChanged(sender As GridView, e As EventArgs) Handles GridView1.ColumnFilterChanged
|
Private Sub GridView1_ColumnFilterChanged(sender As GridView, e As EventArgs) Handles GridView1.ColumnFilterChanged
|
||||||
Dim oRowCount = sender.RowCount
|
Dim oRowCount = sender.RowCount
|
||||||
UpdateGridHeader(ResultLists, 0, oRowCount)
|
UpdateGridHeader(_ResultLists, 0, oRowCount)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GridView2_ColumnFilterChanged(sender As GridView, e As EventArgs) Handles GridView2.ColumnFilterChanged
|
Private Sub GridView2_ColumnFilterChanged(sender As GridView, e As EventArgs) Handles GridView2.ColumnFilterChanged
|
||||||
Dim oRowCount = sender.RowCount
|
Dim oRowCount = sender.RowCount
|
||||||
UpdateGridHeader(ResultLists, 1, oRowCount)
|
UpdateGridHeader(_ResultLists, 1, oRowCount)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GridView3_ColumnFilterChanged(sender As GridView, e As EventArgs) Handles GridView3.ColumnFilterChanged
|
Private Sub GridView3_ColumnFilterChanged(sender As GridView, e As EventArgs) Handles GridView3.ColumnFilterChanged
|
||||||
Dim oRowCount = sender.RowCount
|
Dim oRowCount = sender.RowCount
|
||||||
UpdateGridHeader(ResultLists, 2, oRowCount)
|
UpdateGridHeader(_ResultLists, 2, oRowCount)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonBack.ItemClick
|
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonBack.ItemClick
|
||||||
@ -825,8 +850,8 @@ Public Class frmDocumentResultList
|
|||||||
oPropertyDialog.Show()
|
oPropertyDialog.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MenuItemsOpenFileZooFlow_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemsOpenFileZooFlow.ItemClick
|
Private Async Sub MenuItemsOpenFileZooFlow_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemsOpenFileZooFlow.ItemClick
|
||||||
'TODO: Save file to temp dir and then open
|
Await Watcher.OpenDocument(_CurrentDocument)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@ -924,14 +949,10 @@ Public Class frmDocumentResultList
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RibbonControl_Click(sender As Object, e As EventArgs) Handles RibbonControl.Click
|
Private Sub ButtonRefresh_ItemClick(sender As Object, e As ItemClickEventArgs) Handles ButtonRefresh.ItemClick
|
||||||
|
RaiseEvent NeedsRefresh(Me, Params.ProfileGuid)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Loading…
x
Reference in New Issue
Block a user