|
Friend NotInheritable Class IndexFactory
Private Enum WebsiteType As Integer
Undefined = 1
CodeProject = 2
PlanetSourceCode = 3
CodePlex = 4
AspNet = 5
MSDN = 6
VBNetHeaven = 7
VSMagazine = 8
WindowsForms = 9
MSDNCodeGallery = 10
Flashkit = 11
AdobeDeveloperConnection = 12
SourceForge = 13
GoogleCode = 14
Facebook = 15
End Enum
''' <summary>
''' Crude but provides the machinery to obtain the proper ImageList index
''' </summary>
''' <param name="WebsiteID"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function GetIndex(ByVal WebsiteID As Integer) As Integer
Dim IndexID As Integer = 0
Select Case CType(WebsiteID, WebsiteType)
Case WebsiteType.AdobeDeveloperConnection
IndexID = 10
Case WebsiteType.AspNet
IndexID = 11
Case WebsiteType.CodePlex
IndexID = 1
Case WebsiteType.CodeProject
IndexID = 2
Case WebsiteType.Facebook
IndexID = 3
Case WebsiteType.Flashkit
IndexID = 4
Case WebsiteType.GoogleCode
IndexID = 5
Case WebsiteType.MSDN
IndexID = 7
Case WebsiteType.MSDNCodeGallery
IndexID = 6
Case WebsiteType.PlanetSourceCode
IndexID = 8
Case WebsiteType.SourceForge
IndexID = 12
Case WebsiteType.WindowsForms
IndexID = 9
End Select
Return IndexID
End Function
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
MS, BBA, software developer, consultant, and trainer. Specializing in building data-centric applications designed for business, university, community & faith based organizations. Started developing Excel VBA macros and never looked back. Freelance developer utilizing VB.Net, SQL Server, Microsoft Access, and ASP.Net.