Skip to content

Instantly share code, notes, and snippets.

@appcove
Created May 3, 2011 18:47
Show Gist options
  • Save appcove/953950 to your computer and use it in GitHub Desktop.
Save appcove/953950 to your computer and use it in GitHub Desktop.
Public Class SimpleMenu
Inherits List(Of Entry)
Public Class Entry
Public Property Label As String
Public Property Type As Types
Public Property href As String
Public Property id As String
Public Property onclick As String
End Class
Public Enum Types
Link = 4
End Enum
Sub New()
MyBase.New()
End Sub
Public Overloads Sub Clear()
MyBase.Clear()
End Sub
Public Overloads Sub AddLink(Label As String, Optional href As String = "#", Optional id As String = Nothing, Optional onclick As String = Nothing)
MyBase.Add(New Entry With {.Label = Label, .Type = Types.Link, .href = href, .id = id, .onclick = onclick})
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment