Common: Rework Ribbon controls and layout, add Fontsize Setting
This commit is contained in:
@@ -172,9 +172,26 @@ Public Class frmDocumentResultList
|
||||
RibbonPageGroupFilesystem.Visible = False
|
||||
End If
|
||||
|
||||
Dim oFontSizeDeltaList = New List(Of FontSetting) From {
|
||||
New FontSetting With {.Title = "Normal", .Value = 0},
|
||||
New FontSetting With {.Title = "Groß", .Value = 1},
|
||||
New FontSetting With {.Title = "Größer", .Value = 2},
|
||||
New FontSetting With {.Title = "Noch Größer", .Value = 3}
|
||||
}
|
||||
cmbGridFontSize.Items.Clear()
|
||||
cmbGridFontSize.Items.AddRange(oFontSizeDeltaList)
|
||||
BarEditItemGridFontSize.EditValue = oFontSizeDeltaList.
|
||||
Where(Function(delta) delta.Value = Config.Config.GridFontSizeDelta).
|
||||
FirstOrDefault()
|
||||
|
||||
If OperationMode = OperationMode.NoAppServer Then
|
||||
RibbonPageCategoryAttribute.Visible = False
|
||||
RibbonPageActions2.Visible = False
|
||||
'RibbonPageCategoryAttribute.Visible = False
|
||||
'RibbonPageActions2.Visible = False
|
||||
RibbonPageGroupCheckInOut.Visible = False
|
||||
RibbonPageGroupWorkflow.Visible = False
|
||||
RibbonPageGroupAttribute.Visible = False
|
||||
Else
|
||||
RibbonPageGroupFilesystem.Visible = False
|
||||
End If
|
||||
|
||||
If OperationMode = OperationMode.ZooFlow Or OperationMode = OperationMode.WithAppServer Then
|
||||
@@ -206,6 +223,16 @@ Public Class frmDocumentResultList
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Class FontSetting
|
||||
Public Property Title As String
|
||||
Public Property Value As Integer
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return Title
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Sub frmDocumentResultList_Closing(sender As Object, e As CancelEventArgs) Handles Me.FormClosing
|
||||
Try
|
||||
LayoutManager.GridView_SaveLayout(_ActiveGrid.MainView)
|
||||
@@ -231,12 +258,6 @@ Public Class frmDocumentResultList
|
||||
Dim oFullPath = oRow.ItemEx(ColumnFilepath, "")
|
||||
Dim oDocument As DocumentResultList.Document = Nothing
|
||||
|
||||
' Show Ribbon Category
|
||||
If RibbonPageCategoryFile.Visible = False Then
|
||||
RibbonPageCategoryFile.Visible = True
|
||||
RibbonControl.SelectedPage = RibbonPageActions1
|
||||
End If
|
||||
|
||||
' Load DocumentInfo
|
||||
oDocument = Documentloader.Load(oObjectId, oFullPath)
|
||||
|
||||
@@ -285,9 +306,18 @@ Public Class frmDocumentResultList
|
||||
Private Function UpdateRibbonActions(pDocument As DocumentResultList.Document) As Boolean
|
||||
Try
|
||||
If pDocument Is Nothing Then
|
||||
RibbonPageCategoryFile.Visible = False
|
||||
RibbonControl.SelectedPage = RibbonPageStart
|
||||
RibbonPageGroupFilesystem.Enabled = False
|
||||
RibbonPageGroupDocument.Enabled = False
|
||||
RibbonPageGroupCheckInOut.Enabled = False
|
||||
RibbonPageGroupWorkflow.Enabled = False
|
||||
RibbonPageGroupAttribute.Enabled = False
|
||||
Return True
|
||||
Else
|
||||
RibbonPageGroupFilesystem.Enabled = True
|
||||
RibbonPageGroupDocument.Enabled = True
|
||||
RibbonPageGroupCheckInOut.Enabled = True
|
||||
RibbonPageGroupWorkflow.Enabled = True
|
||||
RibbonPageGroupAttribute.Enabled = True
|
||||
End If
|
||||
|
||||
' Hide Export and filesystem options for view only right
|
||||
@@ -1052,12 +1082,11 @@ Public Class frmDocumentResultList
|
||||
End Sub
|
||||
|
||||
Private Sub CtrlObjectPropertyDialog_Enter(sender As Object, e As EventArgs) Handles CtrlObjectPropertyDialog.Enter
|
||||
RibbonPageCategoryAttribute.Visible = True
|
||||
RibbonControl.SelectedPage = RibbonPageAttribute
|
||||
RibbonPageGroupAttribute.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub CtrlObjectPropertyDialog_Leave(sender As Object, e As EventArgs) Handles CtrlObjectPropertyDialog.Leave
|
||||
RibbonPageCategoryAttribute.Visible = False
|
||||
RibbonPageGroupAttribute.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub GridView1_RowStyle(sender As Object, e As RowStyleEventArgs) Handles GridView1.RowStyle
|
||||
@@ -1074,4 +1103,11 @@ Public Class frmDocumentResultList
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarEditItemGridFontSize_EditValueChanged(sender As Object, e As EventArgs) Handles BarEditItemGridFontSize.EditValueChanged
|
||||
Config.Config.GridFontSizeDelta = DirectCast(BarEditItemGridFontSize.EditValue, FontSetting).Value
|
||||
Config.Save()
|
||||
|
||||
GridBuilder.WithFontSizeDelta(Config.Config.GridFontSizeDelta)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user