EDMI: First version of Updating files by replacing them!
This commit is contained in:
@@ -229,19 +229,28 @@ Public Class frmDocumentResultList
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Show_CriticalError(ex.Message)
|
||||
Show_CriticalError(ex)
|
||||
Finally
|
||||
Cursor = Cursors.Default
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub Watcher_FileChanged(sender As Object, e As DocumentResultList.Watcher.FileChangedArgs) Handles Watcher.FileChanged
|
||||
Public Async Sub Watcher_FileChanged(sender As Object, e As DocumentResultList.Watcher.FileChangedArgs) Handles Watcher.FileChanged
|
||||
Try
|
||||
Await _IDBClient.UpdateFileAsync(e.File.Document.Id, e.File.FilePath, New Options.UpdateFileOptions With {
|
||||
.CreateNewFileVersion = False,
|
||||
.Language = Environment.User.Language,
|
||||
.Username = Environment.User.UserName
|
||||
})
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Logger.Error(ex)
|
||||
Show_CriticalError(ex)
|
||||
Finally
|
||||
e.File.CurrentlyProcessing = False
|
||||
' Signal to the watcher that the file is no longer in use
|
||||
Watcher.FileSaved(e.File)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -565,11 +574,12 @@ Public Class frmDocumentResultList
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub GridControl_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick, GridControl2.DoubleClick, GridControl3.DoubleClick
|
||||
Private Async Sub GridControl_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick, GridControl2.DoubleClick, GridControl3.DoubleClick
|
||||
If _CurrentDocument IsNot Nothing AndAlso _CurrentDocument.AccessRight > Rights.AccessRight.VIEW_ONLY Then
|
||||
Process.Start(New ProcessStartInfo With {
|
||||
.FileName = _CurrentDocument.FullPath
|
||||
})
|
||||
'Process.Start(New ProcessStartInfo With {
|
||||
' .FileName = _CurrentDocument.FullPath
|
||||
'})
|
||||
Await Watcher.OpenDocument(_CurrentDocument)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -578,6 +588,11 @@ Public Class frmDocumentResultList
|
||||
labelCriticalError.Caption = Message
|
||||
End Sub
|
||||
|
||||
Public Sub Show_CriticalError(pException As Exception)
|
||||
labelCriticalError.Visibility = BarItemVisibility.Always
|
||||
labelCriticalError.Caption = pException.Message
|
||||
End Sub
|
||||
|
||||
Public Sub Show_Warning(Message As String)
|
||||
labelWarning.Visibility = BarItemVisibility.Always
|
||||
labelWarning.Caption = Message
|
||||
@@ -701,15 +716,17 @@ Public Class frmDocumentResultList
|
||||
oPropertyDialog.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItemFileOpen_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemFileOpen.ItemClick
|
||||
Private Async Sub MenuItemFileOpen_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemFileOpen.ItemClick
|
||||
If TestPathExists(OPEN_FILE) = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
Process.Start(New ProcessStartInfo With {
|
||||
.FileName = _CurrentDocument.FullPath
|
||||
})
|
||||
Await Watcher.OpenDocument(_CurrentDocument)
|
||||
|
||||
'Process.Start(New ProcessStartInfo With {
|
||||
' .FileName = _CurrentDocument.FullPath
|
||||
'})
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user