pageproperties.vb
来自「This is a book about vb.you could learn 」· VB 代码 · 共 51 行
VB
51 行
Imports System
Imports System.Collections
Imports System.Xml
Imports System.Configuration
Imports System.Web.Configuration
Namespace Wrox
Friend Class PagePropertiesHandler
Implements IConfigurationSectionHandler
Public Overridable Function Create(parent As Object, context As Object, node As XmlNode) As Object _
Implements IConfigurationSectionHandler.Create
Dim config As New PagePropertiesConfig(CType(parent, PagePropertiesConfig))
config.LoadValuesFromConfigurationXml(node)
Return config
End Function
End Class
Public Class PagePropertiesConfig
Dim _backColor As String
Friend Sub New(parent As PagePropertiesConfig)
If parent Is Nothing Then
_backColor = parent._backColor
End If
End Sub
Friend Sub LoadValuesFromConfigurationXml(node As XmlNode)
'Dim err As Exception = Nothing
Dim attributeCollection As XmlAttributeCollection = node.Attributes
_backColor = attributeCollection("backColor").Value
End Sub
Public ReadOnly Property BackColor() As String
Get
Return _backColor
End Get
End Property
End Class
End Namespace
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?