Common: Use GridBuilder in DocumentResultList
This commit is contained in:
parent
dd2ed7d6a0
commit
04db51f845
@ -40,6 +40,7 @@ Public Class frmDocumentResultList
|
|||||||
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 DigitalData.Modules.Filesystem.File
|
||||||
|
Private _GridBuilder As GridBuilder
|
||||||
|
|
||||||
' Runtime variables
|
' Runtime variables
|
||||||
Private _IsLoading As Boolean = True
|
Private _IsLoading As Boolean = True
|
||||||
@ -74,6 +75,7 @@ Public Class frmDocumentResultList
|
|||||||
_Config = New ConfigManager(Of DocumentResultConfig)(LogConfig, oConfigPath, oConfigPath)
|
_Config = New ConfigManager(Of DocumentResultConfig)(LogConfig, oConfigPath, oConfigPath)
|
||||||
_Helpers = New DocumentResultList(LogConfig)
|
_Helpers = New DocumentResultList(LogConfig)
|
||||||
_Filesystem = New Modules.Filesystem.File(_LogConfig)
|
_Filesystem = New Modules.Filesystem.File(_LogConfig)
|
||||||
|
_GridBuilder = New GridBuilder(New List(Of GridView) From {GridView1, GridView2, GridView3})
|
||||||
|
|
||||||
_Environment = Environment
|
_Environment = Environment
|
||||||
_Params = Params
|
_Params = Params
|
||||||
@ -126,6 +128,10 @@ Public Class frmDocumentResultList
|
|||||||
SwitchDetailContainerHorizontal.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
SwitchDetailContainerHorizontal.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
_GridBuilder.
|
||||||
|
WithDefaults().
|
||||||
|
WithReadOnlyOptions()
|
||||||
|
|
||||||
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
|
||||||
@ -928,24 +934,24 @@ Public Class frmDocumentResultList
|
|||||||
_DragBoxFromMouseDown = Rectangle.Empty
|
_DragBoxFromMouseDown = Rectangle.Empty
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GridView1_MouseMove(sender As GridView, e As MouseEventArgs) Handles GridView1.MouseMove
|
Private Sub GridView1_MouseMove(sender As GridView, e As MouseEventArgs) Handles GridView1.MouseMove
|
||||||
If e.Button AndAlso e.Button = MouseButtons.Left Then
|
If e.Button AndAlso e.Button = MouseButtons.Left Then
|
||||||
If _DragBoxFromMouseDown <> Rectangle.Empty And Not _DragBoxFromMouseDown.Contains(e.X, e.Y) Then
|
If _DragBoxFromMouseDown <> Rectangle.Empty And Not _DragBoxFromMouseDown.Contains(e.X, e.Y) Then
|
||||||
|
|
||||||
Dim oHitInfo = sender.CalcHitInfo(e.Location)
|
Dim oHitInfo = sender.CalcHitInfo(e.Location)
|
||||||
|
|
||||||
If oHitInfo.InRow Then
|
If oHitInfo.InRow Then
|
||||||
If _CurrentDocument IsNot Nothing AndAlso _CurrentDocument.AccessRight >= Rights.AccessRight.VIEW_EXPORT Then
|
If _CurrentDocument IsNot Nothing AndAlso _CurrentDocument.AccessRight >= Rights.AccessRight.VIEW_EXPORT Then
|
||||||
_ScreenOffset = SystemInformation.WorkingArea.Location
|
_ScreenOffset = SystemInformation.WorkingArea.Location
|
||||||
|
|
||||||
Dim oFullPath As String = _CurrentDocument.FullPath
|
Dim oFullPath As String = _CurrentDocument.FullPath
|
||||||
Dim oFiles As String() = {oFullPath}
|
Dim oFiles As String() = {oFullPath}
|
||||||
Dim oData As New DataObject(DataFormats.FileDrop, oFiles)
|
Dim oData As New DataObject(DataFormats.FileDrop, oFiles)
|
||||||
|
|
||||||
sender.GridControl.DoDragDrop(oData, DragDropEffects.All)
|
sender.GridControl.DoDragDrop(oData, DragDropEffects.All)
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End If
|
||||||
End Class
|
End Sub
|
||||||
|
End Class
|
||||||
Loading…
x
Reference in New Issue
Block a user