初始化项目
This commit is contained in:
47
BLV_Studio/ModelGrid/DeviceObjectClasses.vb
Normal file
47
BLV_Studio/ModelGrid/DeviceObjectClasses.vb
Normal file
@@ -0,0 +1,47 @@
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
<XmlRoot("DeviceObjects")>
|
||||
Public Class DeviceObjectClasses
|
||||
|
||||
<XmlElement("DeviceClass")>
|
||||
Public DeviceClass As List(Of DeviceObjectType)
|
||||
|
||||
|
||||
Sub New()
|
||||
DeviceClass = New List(Of DeviceObjectType)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function FindDeviceClass(name As String) As DeviceObjectType
|
||||
For Each device As DeviceObjectType In DeviceClass
|
||||
If String.Compare(name, device.Name, True) = 0 Then Return device
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
Public Class DeviceObjectType
|
||||
<XmlAttribute("Name")>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute("Desc")>
|
||||
Public Property Desc As String
|
||||
|
||||
<XmlArray("Attributes"), XmlArrayItem("Attribute", GetType(DeviceChildNodeAttribute))>
|
||||
Public Attributes As List(Of DeviceChildNodeAttribute)
|
||||
|
||||
<XmlArray("Events"), XmlArrayItem("Event", GetType(DeviceChildNodeEvent))>
|
||||
Public Events As List(Of DeviceChildNodeEvent)
|
||||
|
||||
<XmlArray("Methods"), XmlArrayItem("Method", GetType(DeviceChildNodeMethod))>
|
||||
Public Methods As List(Of DeviceChildNodeMethod)
|
||||
|
||||
Sub New()
|
||||
Attributes = New List(Of DeviceChildNodeAttribute)
|
||||
|
||||
Events = New List(Of DeviceChildNodeEvent)
|
||||
|
||||
Methods = New List(Of DeviceChildNodeMethod)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user