This repository has been archived on 2025-11-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
AUTS_OLD/UTS_Core/UTSModule/Station/RowNodeStyle.vb
2024-03-11 16:34:21 +08:00

139 lines
4.1 KiB
VB.net

Imports System.Drawing
Namespace UTSModule.Station
Public Class RowNodeStyle
Sub New()
NodeFont = New Font($"Consolas", 8.5, FontStyle.Regular)
NodeForeColor = Color.Transparent
NodeBackColor = Color.Transparent
NodeImageKey = String.Empty
ShowLabel = False
ShowDescription = False
ShowCommand = False
ShowParameter = False
ShowRetry = False
ShowRetryInterval = False
ShowErrorCode = False
ShowErrorMessage = False
ShowAction = False
ShowRecord = False
End Sub
Sub New(type As RowNode.RowTypeEnum)
Select Case type
Case RowNode.RowTypeEnum.FixedModule
NodeBackColor = Color.Transparent
NodeFont = New Font($"Consolas", 11.5, FontStyle.Bold Or FontStyle.Italic)
NodeForeColor = Color.SkyBlue
NodeImage = Nothing
NodeImageKey = type.ToString()
ShowLabel = True
ShowDescription = True
Case RowNode.RowTypeEnum.Module
NodeBackColor = Color.Transparent
NodeFont = New Font($"Consolas", 10.5, FontStyle.Bold)
NodeForeColor = Color.LightSkyBlue
NodeImage = Nothing
NodeImageKey = type.ToString()
ShowLabel = True
ShowDescription = True
Case RowNode.RowTypeEnum.Control
NodeBackColor = Color.Transparent
NodeFont = New Font($"Consolas", 9.5, FontStyle.Italic)
NodeForeColor = Color.DarkOrchid
NodeImage = Nothing
NodeImageKey = type.ToString()
ShowLabel = True
ShowDescription = True
ShowCommand = True
ShowParameter = True
Case RowNode.RowTypeEnum.Flow
NodeBackColor = Color.Transparent
NodeFont = New Font($"Consolas", 8.5, FontStyle.Regular)
NodeForeColor = Color.Black
NodeImage = Nothing
NodeImageKey = type.ToString()
ShowLabel = True
ShowDescription = True
ShowCommand = True
ShowParameter = True
ShowRetry = True
ShowRetryInterval = True
ShowErrorCode = True
ShowErrorMessage = True
ShowAction = True
ShowRecord = True
End Select
End Sub
''' <summary>
''' 节点字体
''' </summary>
''' <returns></returns>
Public Property NodeFont() As Font
''' <summary>
''' 节点字体颜色
''' </summary>
''' <returns></returns>
Public Property NodeForeColor() As Color
''' <summary>
''' 节点图标
''' </summary>
''' <returns></returns>
Public Property NodeImage() As Image
''' <summary>
''' 节点图标索引
''' </summary>
''' <returns></returns>
Public Property NodeImageKey() As String
''' <summary>
''' 节点背景颜色
''' </summary>
''' <returns></returns>
Public Property NodeBackColor() As Color
Public Property ShowRowType As Boolean
Public Property ShowLabel As Boolean
Public Property ShowDescription As Boolean
Public Property ShowAction As Boolean
Public Property ShowRecord As Boolean
Public Property ShowRetry As Boolean
Public Property ShowRetryInterval As Boolean
Public Property ShowErrorCode As Boolean
Public Property ShowErrorMessage As Boolean
Public Property ShowCommand As Boolean
Public Property ShowParameter As Boolean
End Class
End Namespace