ZooFlow: Administration

This commit is contained in:
Jonathan Jenne
2021-03-16 10:46:05 +01:00
parent 022d124ee0
commit 5df3f4a32d
8 changed files with 136 additions and 185 deletions

View File

@@ -1,6 +1,8 @@
Imports System.ComponentModel
Imports DevExpress.Utils
Imports DevExpress.XtraBars.Ribbon
Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraEditors.Repository
Imports DevExpress.XtraTab
Imports DevExpress.XtraTreeList
Imports DigitalData.Modules.Logging
@@ -181,34 +183,75 @@ Public Class frmAdmin_Start
End Sub
Private Sub Load_Tree(Source As List(Of AdminItem), TreeList As TreeList)
' === ACTIVE COLUMN
Dim oActiveEditor As New RepositoryItemImageComboBox With {
.SmallImages = SvgImageCollection1,
.GlyphAlignment = HorzAlignment.Center
}
oActiveEditor.Buttons.Clear()
oActiveEditor.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Active", True, 0),
New ImageComboBoxItem("Inactive", False, 1)
})
Dim oActiveColumn = New Columns.TreeListColumn() With {
.Name = "columnActive",
.Caption = "Aktiv",
.FieldName = "Active",
.Visible = True,
.VisibleIndex = 1,
.ColumnEdit = oActiveEditor,
.MaxWidth = 30,
.MinWidth = 30
}
oActiveColumn.OptionsColumn.AllowEdit = False
' === TYPE/SCOPE COLUMN
Dim oTypeEditor As New RepositoryItemImageComboBox With {
.SmallImages = CWImages,
.GlyphAlignment = HorzAlignment.Center
}
oTypeEditor.Buttons.Clear()
oTypeEditor.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Profil", "PROFILE", 0),
New ImageComboBoxItem("Prozess", "PROCESS", 1),
New ImageComboBoxItem("Fenster", "WINDOW", 2),
New ImageComboBoxItem("Feld", "CONTROL", 3)
})
Dim oTypeColumn = New Columns.TreeListColumn() With {
.Name = "columnType",
.Caption = "Typ",
.FieldName = "Scope",
.Visible = True,
.VisibleIndex = 2,
.ColumnEdit = oTypeEditor,
.MaxWidth = 30,
.MinWidth = 30
}
oTypeColumn.OptionsColumn.AllowEdit = False
Dim oColumns As New List(Of Columns.TreeListColumn) From {
oActiveColumn,
oTypeColumn,
New Columns.TreeListColumn() With {
.Name = "columnTitle",
.Caption = "Titel",
.FieldName = "Title",
.Visible = True,
.VisibleIndex = 0
.VisibleIndex = 5
},
New Columns.TreeListColumn() With {
.Name = "columnScope",
.Caption = "Typ",
.FieldName = "Scope",
.Visible = True,
.VisibleIndex = 1
.VisibleIndex = 6
},
New Columns.TreeListColumn() With {
.Name = "columnSummary",
.Caption = "Beschreibung",
.FieldName = "Summary",
.Visible = True,
.VisibleIndex = 2
},
New Columns.TreeListColumn() With {
.Name = "columnActive",
.Caption = "Aktiv",
.FieldName = "Active",
.Visible = True,
.VisibleIndex = 3
.VisibleIndex = 7
}
}
@@ -239,6 +282,9 @@ Public Class frmAdmin_Start
.ShowAutoFilterRow = True
.EnableAppearanceEvenRow = True
.ShowIndicator = False
.ShowHorzLines = True
.ShowVertLines = True
.ShowTreeLines = True
End With
With TreeList.OptionsClipboard
@@ -278,7 +324,12 @@ Public Class frmAdmin_Start
Load_IDBEntity(oItem.RealGuid)
Case TreeList_CWProfiles.Name
Load_CWProfile(oItem.RealGuid)
Select Case oItem.Scope
Case "PROFILE"
Load_CWProfile(oItem.RealGuid)
Case Else
ShowError($"Scope {oItem.Scope} is not implemented!")
End Select
End Select
End If
Catch ex As Exception
@@ -358,52 +409,4 @@ Public Class frmAdmin_Start
Private Sub ResetStatus()
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End Sub
Private Sub TreeList1_GetStateImage(sender As Object, e As GetStateImageEventArgs) Handles TreeList_CWProfiles.GetStateImage
Dim oTreeList As TreeList = DirectCast(sender, TreeList)
Dim oItem As AdminItem = DirectCast(oTreeList.GetRow(e.Node.Id), AdminItem)
Select Case oItem.Scope
Case "PROFILE"
e.NodeImageIndex = 0
Case "PROCESS"
e.NodeImageIndex = 1
Case "WINDOW"
e.NodeImageIndex = 2
Case "CONTROL"
e.NodeImageIndex = 3
End Select
End Sub
Private Sub TreeList2_GetStateImage(sender As Object, e As GetStateImageEventArgs) Handles TreeList_GLOBIXProfiles.GetStateImage
Dim oTreeList As TreeList = DirectCast(sender, TreeList)
Dim oItem As AdminItem = DirectCast(oTreeList.GetRow(e.Node.Id), AdminItem)
Select Case oItem.Scope
Case "PROFILE"
e.NodeImageIndex = 0
Case "INDEX_MAN"
e.NodeImageIndex = 1
Case "INDEX_AUTO"
e.NodeImageIndex = 2
End Select
End Sub
Private Sub TreeListIDBAttributes_GetStateImage(sender As Object, e As GetStateImageEventArgs) Handles TreeList_IDBAttributes.GetStateImage
e.NodeImageIndex = 1
End Sub
Private Sub TreeListIDBEntities_GetStateImage(sender As Object, e As GetStateImageEventArgs) Handles TreeList_IDBEntities.GetStateImage
e.NodeImageIndex = 0
End Sub
End Class