Compare commits
6 Commits
590407fbce
...
083a899195
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
083a899195 | ||
|
|
ce20e124d1 | ||
|
|
88e278a3ad | ||
|
|
a846da8b58 | ||
|
|
dd09a6ce4d | ||
|
|
27cac7dbf0 |
@@ -292,15 +292,20 @@ Public Class DocumentViewer
|
|||||||
''' True means that all file info should be hidden from the end-user
|
''' True means that all file info should be hidden from the end-user
|
||||||
''' False means the end user may see the filepath or other info about the file
|
''' False means the end user may see the filepath or other info about the file
|
||||||
''' </param>
|
''' </param>
|
||||||
Public Sub RightOnlyView(ViewOnly As Boolean)
|
Public Sub SetViewOnly(ViewOnly As Boolean)
|
||||||
If ViewOnly Then
|
If ViewOnly Then
|
||||||
buttonPrint.Visibility = XtraBars.BarItemVisibility.Never
|
buttonPrint.Visibility = XtraBars.BarItemVisibility.Never
|
||||||
Else
|
Else
|
||||||
buttonPrint.Visibility = XtraBars.BarItemVisibility.Always
|
buttonPrint.Visibility = XtraBars.BarItemVisibility.Always
|
||||||
End If
|
End If
|
||||||
|
|
||||||
_hide_file_info_from_user = Not ViewOnly
|
_hide_file_info_from_user = ViewOnly
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub RightViewOnly(ViewOnly As Boolean)
|
||||||
|
SetViewOnly(ViewOnly)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateMainUi()
|
Private Sub UpdateMainUi()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -356,79 +361,6 @@ Public Class DocumentViewer
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
GdViewer.PrintDialog()
|
GdViewer.PrintDialog()
|
||||||
|
|
||||||
'Using f As New frmViewerPrint(GdViewer)
|
|
||||||
' f.ShowDialog(Me)
|
|
||||||
' If f.DialogResult <> DialogResult.OK Then
|
|
||||||
' Return
|
|
||||||
' End If
|
|
||||||
' Dim printSettings As frmViewerPrint.PrintSettings = f.printConfiguration
|
|
||||||
' If Not GdViewer.PrintSetActivePrinter(printSettings.Printer) Then
|
|
||||||
' Return
|
|
||||||
' End If
|
|
||||||
' GdViewer.PrintSetDocumentName("GdPicture Print Job " + DateTime.Now.ToString("yyyy-MM-dd HH\mm"))
|
|
||||||
' GdViewer.PrintSetAlignment(printSettings.PrintAlignment)
|
|
||||||
' Select Case printSettings.Orientation
|
|
||||||
' Case frmViewerPrint.PrintOrientation.AutoDetection
|
|
||||||
' GdViewer.PrintSetAutoRotation(True)
|
|
||||||
' Exit Select
|
|
||||||
' Case frmViewerPrint.PrintOrientation.Portrait
|
|
||||||
' GdViewer.PrintSetAutoRotation(False)
|
|
||||||
' GdViewer.PrintSetOrientation(PrinterOrientation.PrinterOrientationPortrait)
|
|
||||||
' Exit Select
|
|
||||||
' Case frmViewerPrint.PrintOrientation.Paysage
|
|
||||||
' GdViewer.PrintSetAutoRotation(False)
|
|
||||||
' GdViewer.PrintSetOrientation(PrinterOrientation.PrinterOrientationLandscape)
|
|
||||||
' Exit Select
|
|
||||||
' End Select
|
|
||||||
' GdViewer.PrintSetCopies(printSettings.Copies)
|
|
||||||
' If printSettings.Copies > 1 Then
|
|
||||||
' GdViewer.PrintSetCollate(printSettings.Collate)
|
|
||||||
' End If
|
|
||||||
' Select Case printSettings.PagesToPrint
|
|
||||||
' Case frmViewerPrint.PagesToPrint.All
|
|
||||||
' GdViewer.PrintSetFromToPage(1, GdViewer.PageCount)
|
|
||||||
' GdViewer.Print(printSettings.PrintSize)
|
|
||||||
' Exit Select
|
|
||||||
' Case frmViewerPrint.PagesToPrint.Current
|
|
||||||
' GdViewer.PrintSetFromToPage(GdViewer.CurrentPage, GdViewer.CurrentPage)
|
|
||||||
' GdViewer.Print(printSettings.PrintSize)
|
|
||||||
' Exit Select
|
|
||||||
' Case frmViewerPrint.PagesToPrint.Range
|
|
||||||
' If printSettings.PageRange IsNot Nothing And printSettings.PageRange <> String.Empty Then
|
|
||||||
' If printSettings.PageRange.Contains("-") Then
|
|
||||||
' Dim pageStart As Integer = 0
|
|
||||||
' If Integer.TryParse(printSettings.PageRange.Split("-"c)(0), pageStart) Then
|
|
||||||
' Dim pageEnd As Integer = 0
|
|
||||||
' If Integer.TryParse(printSettings.PageRange.Split("-"c)(1), pageEnd) Then
|
|
||||||
' If pageEnd < pageStart Then
|
|
||||||
' GdViewer.PrintSetFromToPage(pageEnd, pageStart)
|
|
||||||
' GdViewer.Print(printSettings.PrintSize)
|
|
||||||
' Else
|
|
||||||
' GdViewer.PrintSetFromToPage(pageStart, pageEnd)
|
|
||||||
' GdViewer.Print(printSettings.PrintSize)
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' MessageBox.Show("Page range is invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.[Error])
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' MessageBox.Show("Page range is invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.[Error])
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' Dim page As Integer = 0
|
|
||||||
' If Integer.TryParse(printSettings.PageRange, page) Then
|
|
||||||
' GdViewer.PrintSetFromToPage(page, page)
|
|
||||||
' GdViewer.Print(printSettings.PrintSize)
|
|
||||||
' Else
|
|
||||||
' MessageBox.Show("Page range is invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.[Error])
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' MessageBox.Show("Page range is invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.[Error])
|
|
||||||
' End If
|
|
||||||
' Exit Select
|
|
||||||
' End Select
|
|
||||||
'End Using
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnRotateLeft_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles buttonRotateLeft.ItemClick
|
Private Sub btnRotateLeft_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles buttonRotateLeft.ItemClick
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Public Class ProfileSearches
|
|||||||
Try
|
Try
|
||||||
If _Environment.Service.IsActive = True Then
|
If _Environment.Service.IsActive = True Then
|
||||||
Try
|
Try
|
||||||
Dim oSplit() As String = _Environment.Service.Address.Split(";")
|
Dim oSplit() As String = _Environment.Service.Address.Split(":")
|
||||||
Dim oAppServerAddress As String = oSplit(0)
|
Dim oAppServerAddress As String = oSplit(0)
|
||||||
Dim oAppServerPort As Integer = 9000
|
Dim oAppServerPort As Integer = 9000
|
||||||
If oSplit.Length = 2 Then
|
If oSplit.Length = 2 Then
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ Public Class frmMatch
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Sub TileControlMatch_ItemClick(sender As Object, e As TileItemEventArgs) Handles TileControlMatch.ItemClick
|
Private Async Sub TileControlMatch_ItemClick(sender As Object, e As TileItemEventArgs) Handles TileControlMatch.ItemClick
|
||||||
|
Try
|
||||||
Dim oItem As TileItem = e.Item
|
Dim oItem As TileItem = e.Item
|
||||||
Dim oProfileId As Integer = oItem.Tag
|
Dim oProfileId As Integer = oItem.Tag
|
||||||
|
|
||||||
@@ -252,6 +253,10 @@ Public Class frmMatch
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
Hide()
|
Hide()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox($"Error while loading Searches: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenDocumentResults(Profile As ProfileData, Searches As List(Of ProfileSearches.Search))
|
Private Sub OpenDocumentResults(Profile As ProfileData, Searches As List(Of ProfileSearches.Search))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Imports DigitalData.Modules.Logging
|
|||||||
Imports DigitalData.Modules.Windows.NativeMethods
|
Imports DigitalData.Modules.Windows.NativeMethods
|
||||||
Imports DigitalData.Modules.Windows.File
|
Imports DigitalData.Modules.Windows.File
|
||||||
Imports DigitalData.Modules.ZooFlow
|
Imports DigitalData.Modules.ZooFlow
|
||||||
|
Imports DigitalData.Modules.EDMI.API.Rights
|
||||||
|
|
||||||
Public Class DocumentPropertyMenu
|
Public Class DocumentPropertyMenu
|
||||||
Private ReadOnly _Logger As Logger
|
Private ReadOnly _Logger As Logger
|
||||||
@@ -29,26 +30,32 @@ Public Class DocumentPropertyMenu
|
|||||||
_File = New Modules.Windows.File(LogConfig)
|
_File = New Modules.Windows.File(LogConfig)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetMenuItems(IsLegacy As Boolean) As List(Of DXMenuItem)
|
Public Function GetMenuItems(IsLegacy As Boolean, AccessRight As AccessRight) As List(Of DXMenuItem)
|
||||||
If IsLegacy Then
|
If IsLegacy Then
|
||||||
Return GetLegacyMenuItems()
|
Return GetLegacyMenuItems()
|
||||||
Else
|
Else
|
||||||
Return GetIDBMenuItems()
|
Return GetIDBMenuItems(AccessRight)
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetIDBMenuItems() As List(Of DXMenuItem)
|
Public Function GetIDBMenuItems(AccessRight As AccessRight) As List(Of DXMenuItem)
|
||||||
Dim oOpenFile = New DXMenuItem(OPEN_FILE, AddressOf OpenFile_Click)
|
Dim oOpenFile = New DXMenuItem(OPEN_FILE, AddressOf OpenFile_Click)
|
||||||
Dim oOpenFolder = New DXMenuItem(OPEN_DIRECTORY, AddressOf OpenFolder_Click)
|
Dim oOpenFolder = New DXMenuItem(OPEN_DIRECTORY, AddressOf OpenFolder_Click)
|
||||||
Dim oCopyPath = New DXMenuItem(COPY_PATH, AddressOf CopyPath_Click)
|
Dim oCopyPath = New DXMenuItem(COPY_PATH, AddressOf CopyPath_Click)
|
||||||
Dim oProperties = New DXMenuItem(OPEN_PROPERTIES, AddressOf Properties_Click)
|
Dim oProperties = New DXMenuItem(OPEN_PROPERTIES, AddressOf Properties_Click)
|
||||||
|
|
||||||
|
If AccessRight = AccessRight.VIEW_ONLY Then
|
||||||
|
Return New List(Of DXMenuItem) From {
|
||||||
|
oProperties
|
||||||
|
}
|
||||||
|
Else
|
||||||
Return New List(Of DXMenuItem) From {
|
Return New List(Of DXMenuItem) From {
|
||||||
oOpenFile,
|
oOpenFile,
|
||||||
oOpenFolder,
|
oOpenFolder,
|
||||||
oCopyPath,
|
oCopyPath,
|
||||||
oProperties
|
oProperties
|
||||||
}
|
}
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetLegacyMenuItems() As List(Of DXMenuItem)
|
Public Function GetLegacyMenuItems() As List(Of DXMenuItem)
|
||||||
@@ -66,7 +73,7 @@ Public Class DocumentPropertyMenu
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Sub Properties_Click(sender As Object, e As EventArgs)
|
Public Sub Properties_Click(sender As Object, e As EventArgs)
|
||||||
If TestObjectIdExists(OPEN_PROPERTIES) Then
|
If TestObjectIdExists(OPEN_PROPERTIES) = False Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ Partial Class frmDocumentResultList
|
|||||||
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.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||||
Me.RibbonPageGroupNavigation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroup_Navigation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroup_Layout = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroup_Export = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||||
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
|
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||||
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
||||||
@@ -153,30 +153,32 @@ Partial Class frmDocumentResultList
|
|||||||
'
|
'
|
||||||
'RibbonPage1
|
'RibbonPage1
|
||||||
'
|
'
|
||||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupNavigation, Me.RibbonPageGroup1, Me.RibbonPageGroup2})
|
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup_Navigation, Me.RibbonPageGroup_Layout, Me.RibbonPageGroup_Export})
|
||||||
Me.RibbonPage1.Name = "RibbonPage1"
|
Me.RibbonPage1.Name = "RibbonPage1"
|
||||||
Me.RibbonPage1.Text = "Ergebnisse"
|
Me.RibbonPage1.Text = "Ergebnisse"
|
||||||
'
|
'
|
||||||
'RibbonPageGroupNavigation
|
'RibbonPageGroup_Navigation
|
||||||
'
|
'
|
||||||
Me.RibbonPageGroupNavigation.AllowTextClipping = False
|
Me.RibbonPageGroup_Navigation.AllowTextClipping = False
|
||||||
Me.RibbonPageGroupNavigation.ItemLinks.Add(Me.BarButtonBack)
|
Me.RibbonPageGroup_Navigation.ItemLinks.Add(Me.BarButtonBack)
|
||||||
Me.RibbonPageGroupNavigation.Name = "RibbonPageGroupNavigation"
|
Me.RibbonPageGroup_Navigation.Name = "RibbonPageGroup_Navigation"
|
||||||
Me.RibbonPageGroupNavigation.Text = "Navigation"
|
Me.RibbonPageGroup_Navigation.Text = "Navigation"
|
||||||
'
|
'
|
||||||
'RibbonPageGroup1
|
'RibbonPageGroup_Layout
|
||||||
'
|
'
|
||||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.SwitchMainContainerHorizontal)
|
Me.RibbonPageGroup_Layout.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
|
||||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.SwitchDetailContainerHorizontal)
|
Me.RibbonPageGroup_Layout.ItemLinks.Add(Me.SwitchMainContainerHorizontal)
|
||||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem5)
|
Me.RibbonPageGroup_Layout.ItemLinks.Add(Me.SwitchDetailContainerHorizontal)
|
||||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
Me.RibbonPageGroup_Layout.ItemLinks.Add(Me.BarButtonItem5)
|
||||||
Me.RibbonPageGroup1.Text = "Layout"
|
Me.RibbonPageGroup_Layout.Name = "RibbonPageGroup_Layout"
|
||||||
|
Me.RibbonPageGroup_Layout.Text = "Layout"
|
||||||
'
|
'
|
||||||
'RibbonPageGroup2
|
'RibbonPageGroup_Export
|
||||||
'
|
'
|
||||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItemExportGrid1)
|
Me.RibbonPageGroup_Export.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
|
||||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
Me.RibbonPageGroup_Export.ItemLinks.Add(Me.BarButtonItemExportGrid1)
|
||||||
Me.RibbonPageGroup2.Text = "Export"
|
Me.RibbonPageGroup_Export.Name = "RibbonPageGroup_Export"
|
||||||
|
Me.RibbonPageGroup_Export.Text = "Export"
|
||||||
'
|
'
|
||||||
'RibbonStatusBar
|
'RibbonStatusBar
|
||||||
'
|
'
|
||||||
@@ -380,7 +382,7 @@ Partial Class frmDocumentResultList
|
|||||||
|
|
||||||
Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl
|
Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl
|
||||||
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
Friend WithEvents RibbonPageGroup_Layout As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||||
Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||||
Friend WithEvents SwitchMainContainerHorizontal As DevExpress.XtraBars.BarToggleSwitchItem
|
Friend WithEvents SwitchMainContainerHorizontal As DevExpress.XtraBars.BarToggleSwitchItem
|
||||||
Friend WithEvents SwitchDetailContainerHorizontal As DevExpress.XtraBars.BarToggleSwitchItem
|
Friend WithEvents SwitchDetailContainerHorizontal As DevExpress.XtraBars.BarToggleSwitchItem
|
||||||
@@ -396,7 +398,7 @@ Partial Class frmDocumentResultList
|
|||||||
Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridView
|
Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridView
|
||||||
Friend WithEvents GridBand3 As DevExpress.XtraGrid.Views.BandedGrid.GridBand
|
Friend WithEvents GridBand3 As DevExpress.XtraGrid.Views.BandedGrid.GridBand
|
||||||
Friend WithEvents BarButtonItemExportGrid1 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItemExportGrid1 As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
Friend WithEvents RibbonPageGroup_Export As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||||
Friend WithEvents SplitContainerControl3 As DevExpress.XtraEditors.SplitContainerControl
|
Friend WithEvents SplitContainerControl3 As DevExpress.XtraEditors.SplitContainerControl
|
||||||
Friend WithEvents DocumentViewer1 As DigitalData.Controls.DocumentViewer.DocumentViewer
|
Friend WithEvents DocumentViewer1 As DigitalData.Controls.DocumentViewer.DocumentViewer
|
||||||
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
||||||
@@ -406,6 +408,6 @@ Partial Class frmDocumentResultList
|
|||||||
Friend WithEvents labelResultCount As DevExpress.XtraBars.BarStaticItem
|
Friend WithEvents labelResultCount As DevExpress.XtraBars.BarStaticItem
|
||||||
Friend WithEvents XtraSaveFileDialog As DevExpress.XtraEditors.XtraSaveFileDialog
|
Friend WithEvents XtraSaveFileDialog As DevExpress.XtraEditors.XtraSaveFileDialog
|
||||||
Friend WithEvents BarButtonBack As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonBack As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents RibbonPageGroupNavigation 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
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Imports DigitalData.Modules.Logging
|
|||||||
Imports DigitalData.Modules.ZooFlow
|
Imports DigitalData.Modules.ZooFlow
|
||||||
Imports DigitalData.Modules.Language
|
Imports DigitalData.Modules.Language
|
||||||
Imports DigitalData.Modules.EDMI.API
|
Imports DigitalData.Modules.EDMI.API
|
||||||
|
Imports DigitalData.Modules.EDMI.API.Client
|
||||||
Imports DevExpress.XtraGrid.Views.Base
|
Imports DevExpress.XtraGrid.Views.Base
|
||||||
Imports DevExpress.XtraGrid.Views.BandedGrid
|
Imports DevExpress.XtraGrid.Views.BandedGrid
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
@@ -18,6 +19,15 @@ Imports System.ComponentModel
|
|||||||
Public Class frmDocumentResultList
|
Public Class frmDocumentResultList
|
||||||
Implements IResultForm
|
Implements IResultForm
|
||||||
|
|
||||||
|
Private Const COLUMN_ICON = "ICON"
|
||||||
|
Private Const COLUMN_FILEPATH = "FULL_FILENAME"
|
||||||
|
Private Const COLUMN_FILENAME = "Filename"
|
||||||
|
Private Const COLUMN_DOCID = "DocID"
|
||||||
|
|
||||||
|
Private _IsLoading As Boolean = True
|
||||||
|
Private _IsLegacy As Boolean = True
|
||||||
|
Private _IDBClient As Client
|
||||||
|
|
||||||
Private _LogConfig As LogConfig
|
Private _LogConfig As LogConfig
|
||||||
Private _Logger As Logger
|
Private _Logger As Logger
|
||||||
Private _Config As ConfigManager(Of DocumentResultConfig)
|
Private _Config As ConfigManager(Of DocumentResultConfig)
|
||||||
@@ -29,14 +39,7 @@ Public Class frmDocumentResultList
|
|||||||
Private _ActiveGridBand As GridBand = Nothing
|
Private _ActiveGridBand As GridBand = Nothing
|
||||||
Private _ActiveRowHandle As Integer = Constants.NO_ROW_HANDLE
|
Private _ActiveRowHandle As Integer = Constants.NO_ROW_HANDLE
|
||||||
|
|
||||||
Private Const COLUMN_ICON = "ICON"
|
Private _DocumentInfo As DocumentInfo = Nothing
|
||||||
Private Const COLUMN_FILEPATH = "FULL_FILENAME"
|
|
||||||
Private Const COLUMN_FILENAME = "Filename"
|
|
||||||
Private Const COLUMN_DOCID = "DocID"
|
|
||||||
|
|
||||||
Private _IsLoading As Boolean = True
|
|
||||||
Private _IsLegacy As Boolean = True
|
|
||||||
Private _IDBClient As Client
|
|
||||||
|
|
||||||
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
|
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
|
||||||
|
|
||||||
@@ -60,7 +63,7 @@ Public Class frmDocumentResultList
|
|||||||
Private Sub MaybeInitIDB()
|
Private Sub MaybeInitIDB()
|
||||||
_IsLegacy = Not _Environment.Service.IsActive
|
_IsLegacy = Not _Environment.Service.IsActive
|
||||||
If _Environment.Service.IsActive Then
|
If _Environment.Service.IsActive Then
|
||||||
Dim oSplit As List(Of String) = _Environment.Service.Address.Split(";").ToList()
|
Dim oSplit As List(Of String) = _Environment.Service.Address.Split(":").ToList()
|
||||||
Dim oAddress As String = oSplit.Item(0)
|
Dim oAddress As String = oSplit.Item(0)
|
||||||
Dim oPort As Integer = oSplit.Item(1)
|
Dim oPort As Integer = oSplit.Item(1)
|
||||||
|
|
||||||
@@ -100,6 +103,7 @@ Public Class frmDocumentResultList
|
|||||||
' Initialize Viewer with GDPicture.NET License
|
' Initialize Viewer with GDPicture.NET License
|
||||||
DocumentViewer1.Init(_LogConfig, _Environment.Settings.GdPictureKey)
|
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
|
||||||
@@ -114,6 +118,53 @@ Public Class frmDocumentResultList
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Async Sub GridView_FocusedRowChanged(sender As GridView, e As FocusedRowChangedEventArgs)
|
||||||
|
_ActiveRowHandle = e.FocusedRowHandle
|
||||||
|
|
||||||
|
If e.FocusedRowHandle >= 0 Then
|
||||||
|
Dim oRow = sender.GetDataRow(e.FocusedRowHandle)
|
||||||
|
DocumentViewer1.CloseDocument()
|
||||||
|
|
||||||
|
If _IsLegacy Then
|
||||||
|
LoadFile_Legacy(oRow)
|
||||||
|
Else
|
||||||
|
Await LoadFile_IDB(oRow)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadFile_Legacy(GridRow As DataRow)
|
||||||
|
Try
|
||||||
|
Dim oFullPath = GridRow.Item(COLUMN_FILEPATH)
|
||||||
|
|
||||||
|
DocumentViewer1.LoadFile(oFullPath)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
MsgBox("Error while loading file", MsgBoxStyle.Critical, Text)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Async Function LoadFile_IDB(GridRow As DataRow) As Task
|
||||||
|
Try
|
||||||
|
Dim oObjectId = GridRow.Item(COLUMN_DOCID)
|
||||||
|
_DocumentInfo = Await _IDBClient.GetDocumentInfo(_Environment.User.UserId, oObjectId)
|
||||||
|
|
||||||
|
DocumentViewer1.LoadFile(_DocumentInfo.FullPath)
|
||||||
|
|
||||||
|
If _DocumentInfo.AccessRight = Rights.AccessRight.VIEW_ONLY Then
|
||||||
|
DocumentViewer1.SetViewOnly(True)
|
||||||
|
RibbonPageGroup_Export.Visible = False
|
||||||
|
Else
|
||||||
|
DocumentViewer1.SetViewOnly(False)
|
||||||
|
RibbonPageGroup_Export.Visible = True
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
MsgBox("Error while loading file", MsgBoxStyle.Critical, Text)
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean Implements IResultForm.RefreshResults
|
Public Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean Implements IResultForm.RefreshResults
|
||||||
_IsLoading = True
|
_IsLoading = True
|
||||||
Try
|
Try
|
||||||
@@ -210,32 +261,6 @@ Public Class frmDocumentResultList
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Sub GridView_FocusedRowChanged(sender As GridView, e As FocusedRowChangedEventArgs)
|
|
||||||
_ActiveRowHandle = e.FocusedRowHandle
|
|
||||||
|
|
||||||
If _IsLegacy Then
|
|
||||||
If e.FocusedRowHandle >= 0 Then
|
|
||||||
DocumentViewer1.CloseDocument()
|
|
||||||
|
|
||||||
Dim oRow = sender.GetDataRow(e.FocusedRowHandle)
|
|
||||||
Dim oFullPath = oRow.Item(COLUMN_FILEPATH)
|
|
||||||
|
|
||||||
DocumentViewer1.LoadFile(oFullPath)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
If e.FocusedRowHandle >= 0 Then
|
|
||||||
DocumentViewer1.CloseDocument()
|
|
||||||
|
|
||||||
Dim oRow = sender.GetDataRow(e.FocusedRowHandle)
|
|
||||||
Dim oObjectId = oRow.Item(COLUMN_DOCID)
|
|
||||||
|
|
||||||
Dim oInfo = Await _IDBClient.GetDocumentInfo(_Environment.User.UserId, oObjectId)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
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
|
||||||
@@ -607,7 +632,7 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
e.Menu.Items.Clear()
|
e.Menu.Items.Clear()
|
||||||
|
|
||||||
For Each oItem In oMenu.GetMenuItems(_IsLegacy)
|
For Each oItem In oMenu.GetMenuItems(_IsLegacy, _DocumentInfo.AccessRight)
|
||||||
e.Menu.Items.Add(oItem)
|
e.Menu.Items.Add(oItem)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|||||||
2
GUIs.Test.EDMIBenchmark/Form1.Designer.vb
generated
2
GUIs.Test.EDMIBenchmark/Form1.Designer.vb
generated
@@ -124,7 +124,7 @@ Partial Class Form1
|
|||||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles, Me.TextboxObjectId, Me.ButtonLoadFile, Me.BarListItem1, Me.BarButtonItem2, Me.BarToggleSwitchItem1, Me.BarDockingMenuItem1, Me.BarMdiChildrenListItem1, Me.BarButtonItem1, Me.TextboxDatatableName, Me.BarButtonItem3, Me.TextboxDatatableFilter, Me.TextboxDatatableSort})
|
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles, Me.TextboxObjectId, Me.ButtonLoadFile, Me.BarListItem1, Me.BarButtonItem2, Me.BarToggleSwitchItem1, Me.BarDockingMenuItem1, Me.BarMdiChildrenListItem1, Me.BarButtonItem1, Me.TextboxDatatableName, Me.BarButtonItem3, Me.TextboxDatatableFilter, Me.TextboxDatatableSort})
|
||||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||||
Me.RibbonControl1.MaxItemId = 19
|
Me.RibbonControl1.MaxItemId = 20
|
||||||
Me.RibbonControl1.Name = "RibbonControl1"
|
Me.RibbonControl1.Name = "RibbonControl1"
|
||||||
Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarDockingMenuItem1)
|
Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarDockingMenuItem1)
|
||||||
Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarMdiChildrenListItem1)
|
Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarMdiChildrenListItem1)
|
||||||
|
|||||||
@@ -332,12 +332,15 @@
|
|||||||
<metadata name="DocumentManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="DocumentManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="BindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>316, 17</value>
|
<value>159</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="DockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="DockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>181, 17</value>
|
<value>181, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="BindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>316, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>453, 17</value>
|
<value>453, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
@@ -130,12 +130,12 @@ Public Class Form1
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oObjectId As Integer = TextboxObjectId.EditValue
|
Dim oObjectId As Integer = TextboxObjectId.EditValue
|
||||||
Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId)
|
Dim oResponse As Client.DocumentInfo = Await _Client.GetDocumentInfo(2, oObjectId)
|
||||||
|
|
||||||
DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream)
|
DocumentViewer1.LoadFile(oResponse.FullPath)
|
||||||
|
|
||||||
oSWTotal.Stop()
|
oSWTotal.Stop()
|
||||||
AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
|
AddLogMessage($"File [{oResponse.FullPath}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
|
||||||
Catch ex As FaultException
|
Catch ex As FaultException
|
||||||
MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service")
|
MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
Reference in New Issue
Block a user