Common/DocumentResultList: More Performance Fixes
This commit is contained in:
@@ -311,7 +311,7 @@ Public Class frmDocumentResultList
|
||||
Select Case pIndex
|
||||
Case 0
|
||||
Dim oResult = pResultList.Item(0)
|
||||
'GridBand1.Caption = $"{oResult.Title} ({pCount})"
|
||||
GridBand1.Caption = $"{oResult.Title} ({pCount})"
|
||||
|
||||
Case 1
|
||||
Dim oResult = pResultList.Item(1)
|
||||
@@ -323,7 +323,7 @@ Public Class frmDocumentResultList
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub CreateDocumentGrid(GridView As GridView, Result As DocumentResult)
|
||||
Private Sub CreateDocumentGrid(GridView As BandedGridView, Result As DocumentResult)
|
||||
Try
|
||||
If IsNothing(GridView.Columns("ICON")) Then
|
||||
Dim oIconColumn = GridView.Columns.AddVisible("ICON", "ICON")
|
||||
@@ -337,6 +337,8 @@ Public Class frmDocumentResultList
|
||||
.MinWidth = 20
|
||||
.VisibleIndex = 0
|
||||
End With
|
||||
|
||||
GridView.Bands.First().Columns.Add(oIconColumn)
|
||||
End If
|
||||
|
||||
Dim oCreated, oChanged As String
|
||||
@@ -389,8 +391,6 @@ Public Class frmDocumentResultList
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub GridView1_CustomDrawCell(sender As Object, e As RowCellCustomDrawEventArgs) Handles GridView1.CustomDrawCell
|
||||
If e.RowHandle < 0 Then
|
||||
Exit Sub
|
||||
@@ -410,29 +410,6 @@ Public Class frmDocumentResultList
|
||||
|
||||
e.Cache.DrawImage(oIcon, e.Bounds.X + offsetX, e.Bounds.Y + offsetY, 18, 18)
|
||||
End If
|
||||
|
||||
'Dim view As GridView = TryCast(sender, GridView)
|
||||
'If e.Column.FieldName = COLUMN_FILENAME Then
|
||||
' Dim oCellInfo As GridCellInfo = TryCast(e.Cell, GridCellInfo)
|
||||
' Dim oViewInfo As TextEditViewInfo = TryCast(oCellInfo.ViewInfo, TextEditViewInfo)
|
||||
' Dim oFilename As String = e.DisplayText
|
||||
|
||||
' If oViewInfo IsNot Nothing And oFilename <> String.Empty Then
|
||||
' If OperationMode = IResultForm.Mode.NoAppServer Then
|
||||
' ' oNewRow.Item(COLUMN_ICON) = _Helpers.GetIconByExtension(oFullpath)
|
||||
' ' oNewRow.Item(COLUMN_FILEPATH) = oFullpath
|
||||
' ' oNewRow.Item(COLUMN_FILENAME) = oFilename
|
||||
' Else
|
||||
' oViewInfo.ContextImage = _Helpers.GetIconByExtension(oFilename)
|
||||
' oViewInfo.ContextImageAlignment = ContextImageAlignment.Near
|
||||
' ' oNewRow.Item(COLUMN_ICON) = _Helpers.GetIconByExtension(oFilename)
|
||||
' ' oNewRow.Item(COLUMN_FILEPATH) = String.Empty
|
||||
' ' oNewRow.Item(COLUMN_FILENAME) = oFilename
|
||||
' End If
|
||||
' oViewInfo.CalcViewInfo()
|
||||
' End If
|
||||
'End If
|
||||
'e.DefaultDraw()
|
||||
End Sub
|
||||
|
||||
Private Function TryGetItem(DataRow As DataRow, ColumnName As String, Optional DefaultValue As String = "") As String
|
||||
@@ -553,7 +530,7 @@ Public Class frmDocumentResultList
|
||||
|
||||
Private Sub SetActiveGridBand()
|
||||
If _ActiveGrid.Equals(GridControl1) Then
|
||||
'_ActiveGridBand = GridBand1
|
||||
_ActiveGridBand = GridBand1
|
||||
ElseIf _ActiveGrid.Equals(GridControl2) Then
|
||||
_ActiveGridBand = GridBand2
|
||||
ElseIf _ActiveGrid.Equals(GridControl3) Then
|
||||
|
||||
Reference in New Issue
Block a user