Filesystem: fix references
This commit is contained in:
parent
db55734f53
commit
a2916b5cb5
@ -19,6 +19,8 @@ Imports DigitalData.Modules.EDMI.API.Client
|
|||||||
Imports DigitalData.Modules.Language
|
Imports DigitalData.Modules.Language
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.ZooFlow
|
Imports DigitalData.Modules.ZooFlow
|
||||||
|
Imports DigitalData.Modules.Windows
|
||||||
|
Imports DigitalData.Modules.Filesystem
|
||||||
|
|
||||||
Public Class frmDocumentResultList
|
Public Class frmDocumentResultList
|
||||||
Implements IResultForm
|
Implements IResultForm
|
||||||
@ -48,7 +50,7 @@ Public Class frmDocumentResultList
|
|||||||
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 _Helpers As DocumentResultList
|
||||||
Private _Filesystem As DigitalData.Modules.Filesystem.File
|
Private _Filesystem As Modules.Filesystem.File
|
||||||
Private _GridBuilder As GridBuilder
|
Private _GridBuilder As GridBuilder
|
||||||
Private _File As Modules.Windows.File
|
Private _File As Modules.Windows.File
|
||||||
|
|
||||||
@ -90,6 +92,7 @@ Public Class frmDocumentResultList
|
|||||||
_GridBuilder = New GridBuilder(New List(Of GridView) From {GridView1, GridView2, GridView3})
|
_GridBuilder = New GridBuilder(New List(Of GridView) From {GridView1, GridView2, GridView3})
|
||||||
_Environment = Environment
|
_Environment = Environment
|
||||||
_Params = Params
|
_Params = Params
|
||||||
|
_File = New Modules.Windows.File(LogConfig)
|
||||||
_ResultLists = Params.Results
|
_ResultLists = Params.Results
|
||||||
_Language = Utils.NotNull(_Environment.User.Language, State.UserState.LANG_EN_US)
|
_Language = Utils.NotNull(_Environment.User.Language, State.UserState.LANG_EN_US)
|
||||||
End Sub
|
End Sub
|
||||||
@ -179,7 +182,7 @@ Public Class frmDocumentResultList
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not File.Exists(oDocumentInfo.FullPath) Then
|
If Not IO.File.Exists(oDocumentInfo.FullPath) Then
|
||||||
Show_Warning("File does not exist!")
|
Show_Warning("File does not exist!")
|
||||||
' TODO: Create checksum after closing, compare and take action
|
' TODO: Create checksum after closing, compare and take action
|
||||||
'_HashOriginalFile = Nothing
|
'_HashOriginalFile = Nothing
|
||||||
@ -233,7 +236,7 @@ Public Class frmDocumentResultList
|
|||||||
.FullPath = oFullPath
|
.FullPath = oFullPath
|
||||||
}
|
}
|
||||||
|
|
||||||
If File.Exists(oDocumentInfo.FullPath) Then
|
If IO.File.Exists(oDocumentInfo.FullPath) Then
|
||||||
oDocumentInfo = LoadFile_AsByteArray(oDocumentInfo)
|
oDocumentInfo = LoadFile_AsByteArray(oDocumentInfo)
|
||||||
_OpenDocuments.Add(oDocumentInfo)
|
_OpenDocuments.Add(oDocumentInfo)
|
||||||
_CurrentDocument = oDocumentInfo
|
_CurrentDocument = oDocumentInfo
|
||||||
@ -260,7 +263,7 @@ Public Class frmDocumentResultList
|
|||||||
_Logger.Debug("Successfully loaded Information for ObjectId: [{0}]", oObjectId)
|
_Logger.Debug("Successfully loaded Information for ObjectId: [{0}]", oObjectId)
|
||||||
|
|
||||||
_Logger.Debug("Loading file [{0}]", oResultDocumentInfo.FullPath)
|
_Logger.Debug("Loading file [{0}]", oResultDocumentInfo.FullPath)
|
||||||
If File.Exists(oResultDocumentInfo.FullPath) Then
|
If IO.File.Exists(oResultDocumentInfo.FullPath) Then
|
||||||
oResultDocumentInfo = LoadFile_AsByteArray(oResultDocumentInfo)
|
oResultDocumentInfo = LoadFile_AsByteArray(oResultDocumentInfo)
|
||||||
_OpenDocuments.Add(oResultDocumentInfo)
|
_OpenDocuments.Add(oResultDocumentInfo)
|
||||||
_CurrentDocument = oResultDocumentInfo
|
_CurrentDocument = oResultDocumentInfo
|
||||||
@ -337,7 +340,7 @@ Public Class frmDocumentResultList
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function LoadFile_FromDisk(pDocumentInfo As DocumentResultInfo, pFileInfo As FileInfo) As DocumentResultInfo
|
Private Function LoadFile_FromDisk(pDocumentInfo As DocumentResultInfo, pFileInfo As FileInfo) As DocumentResultInfo
|
||||||
Using oStream = File.OpenRead(pDocumentInfo.FullPath)
|
Using oStream = IO.File.OpenRead(pDocumentInfo.FullPath)
|
||||||
_Logger.Debug("File opened.")
|
_Logger.Debug("File opened.")
|
||||||
|
|
||||||
Using oMemoryStream = New MemoryStream()
|
Using oMemoryStream = New MemoryStream()
|
||||||
@ -665,7 +668,7 @@ Public Class frmDocumentResultList
|
|||||||
Private Sub RestoreLayout(pGridView As GridView)
|
Private Sub RestoreLayout(pGridView As GridView)
|
||||||
Try
|
Try
|
||||||
Dim oLayoutFile As String = GetDevexpressGrid_LayoutName(pGridView)
|
Dim oLayoutFile As String = GetDevexpressGrid_LayoutName(pGridView)
|
||||||
If File.Exists(oLayoutFile) Then
|
If IO.File.Exists(oLayoutFile) Then
|
||||||
pGridView.RestoreLayoutFromXml(oLayoutFile, OptionsLayoutBase.FullLayout)
|
pGridView.RestoreLayoutFromXml(oLayoutFile, OptionsLayoutBase.FullLayout)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@ -810,8 +813,8 @@ Public Class frmDocumentResultList
|
|||||||
If Not IsNothing(_ActiveGrid) Then
|
If Not IsNothing(_ActiveGrid) Then
|
||||||
Try
|
Try
|
||||||
Dim oFile = GetDevexpressGrid_LayoutName(_ActiveGrid.MainView)
|
Dim oFile = GetDevexpressGrid_LayoutName(_ActiveGrid.MainView)
|
||||||
If File.Exists(oFile) Then
|
If IO.File.Exists(oFile) Then
|
||||||
File.Delete(oFile)
|
IO.File.Delete(oFile)
|
||||||
End If
|
End If
|
||||||
UpdateGridData()
|
UpdateGridData()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user