Control List Inherits Listbox
ControlInstance List Inherits Listbox
EventHandler Sub ExpandRow(row As Integer)
Dim v As Variant = Me.RowTag(row)
if v isa NSRangeMBS then
dim k as NSRangeMBS = v
list.AddRow "Location", str(k.Location)
list.AddRow "Length", str(k.Length)
elseif v isa MLImageConstraintMBS then
dim k as MLImageConstraintMBS = v
list.AddRow "pixelsWide", str(k.pixelsWide)
list.AddRow "pixelsHigh", str(k.pixelsHigh)
list.AddRow "pixelFormatType", hex(k.pixelFormatType)
list.addFolder "sizeConstraint", k.sizeConstraint
elseif v isa MLImageSizeConstraintMBS then
dim k as MLImageSizeConstraintMBS = v
list.AddRow "pixelsWideRange", k.pixelsWideRange
list.AddRow "pixelsHighRange", k.pixelsHighRange
dim t as string
Select case k.type
case MLImageSizeConstraintMBS.TypeUnspecified
t = "Unspecified"
case MLImageSizeConstraintMBS.TypeEnumerated
t = "Enumerated"
case MLImageSizeConstraintMBS.TypeRange
t = "Range"
end Select
list.AddRow "type", str(k.type)+" "+t
dim enumeratedImageSizes() as MLImageSizeMBS = k.enumeratedImageSizes
dim u as integer = enumeratedImageSizes.Ubound
for i as integer = 0 to u
dim a as MLImageSizeMBS = enumeratedImageSizes(i)
List.addFolder "size "+str(i), a
next
elseif v isa MLDictionaryConstraintMBS then
dim k as MLDictionaryConstraintMBS = v
dim t as string = KeyType(k.keyType)
List.AddRow "keyType", str(k.keyType)+" "+t
elseif v isa MLMultiArrayConstraintMBS then
dim k as MLMultiArrayConstraintMBS = v
dim t as string
Select case k.dataType
case MLMultiArrayMBS.DataTypeFloat32
t = "Float32"
case MLMultiArrayMBS.DataTypeDouble
t = "Double"
case MLMultiArrayMBS.DataTypeInt32
t = "Int32"
end select
list.AddRow "dataType", hex(k.dataType)+" "+t
dim shapes() as string
dim shape() as Integer = k.shape
for each s as integer in shape
shapes.Append str(s)
next
list.AddRow "shape", join(shapes, ", ")
list.addFolder "shapeConstraint", k.shapeConstraint
elseif v isa MLNumericConstraintMBS then
dim k as MLNumericConstraintMBS = v
list.AddRow "minNumber", str(k.minNumber)
list.AddRow "maxNumber", str(k.maxNumber)
dim enumeratedNumberss() as string
dim enumeratedNumbers() as Double = k.enumeratedNumbers
for each s as integer in enumeratedNumbers
enumeratedNumberss.Append str(s)
next
list.AddRow "Numbers", join(enumeratedNumberss, ", ")
elseif v isa MLSequenceConstraintMBS then
dim k as MLSequenceConstraintMBS = v
list.AddRow "countRange", k.countRange
list.addFolder "valueDescription", k.valueDescription
elseif v isa MLSequenceMBS then
dim k as MLSequenceMBS = v
dim t as string = KeyType(k.type)
List.AddRow "type", str(k.Type)+" "+t
dim int64Valuess() as string
dim int64Values() as Integer = k.int64Values
for each s as integer in int64Values
int64Valuess.Append str(s)
next
list.AddRow "int64Values", join(int64Valuess, ", ")
dim stringValues() as string = k.stringValues
list.AddRow "stringValues", join(stringValues, ", ")
elseif v isa MLKeyMBS then
dim k as MLKeyMBS = v
list.AddRow "Name", k.Name
list.AddRow "Scope", k.Scope
elseif v isa MLImageSizeMBS then
dim k as MLImageSizeMBS = v
list.AddRow "pixelsWide", str(k.pixelsWide)
list.AddRow "pixelsHigh", str(k.pixelsHigh)
elseif v isa MLParameterDescriptionMBS then
dim k as MLParameterDescriptionMBS = v
list.AddFolder "Key", k.key
list.AddRow "defaultValue", k.defaultValue
list.AddFolder "numericConstraint", k.numericConstraint
elseif v isa MLFeatureDescriptionMBS then
dim md as MLFeatureDescriptionMBS = v
if md <> nil then
List.AddRow "name", md.Name
dim t as string = KeyType(md.type)
List.AddRow "type", str(md.Type)+" "+t
dim o as string
if md.isOptional then
o = "Yes"
else
o = "No"
end if
List.AddRow "optional", o
end if
List.AddFolder "imageConstraint", md.imageConstraint
List.AddFolder "dictionaryConstraint", md.dictionaryConstraint
List.AddFolder "multiArrayConstraint", md.multiArrayConstraint
List.AddFolder "sequenceConstraint", md.sequenceConstraint
elseif v isa Dictionary then
dim d as Dictionary = v
for each key as Variant in d.keys
dim val as Variant = d.Value(key)
if VarType(val) = Variant.TypeObject then
list.AddFolder key, val
else
List.AddRow key, val
end if
next
else
Break
end if
End EventHandler
End Control