- templatemanager2005_bin.zip
- setup.exe
- TemplateManagerSetup.msi
- templatemanager2005_source.zip
- TemplateManager2005_Source
- TemplateManager.sln
- TemplateManager
- AssemblyInfo.cs
- Forms
- Installer
- Misc
- Page.cs
- Schemas
- TemplateManager.csproj
- TemplateManager.snk
- Templates
- CSharp
- Project Items
- VB
- Project Items
- VC++
- Project Items
- TMConstants.cs
- vssver2.scc
- VSZ files
- CSharp
- Project Items
- Krevera Template Manager
- Krevera.vsdir
- Strongly Typed Collection.vsz
- Strongly Typed Dictionary.vsz
- vssver2.scc
- Krevera Template Managerq
- VB
- Project Items
- Krevera Template Manager
- Krevera.vsdir
- Strongly Typed Collection.vsz
- Strongly Typed Dictionary.vsz
- vssver2.scc
- VC++
- Project Items
- Krevera Template Manager
- Krevera.vsdir
- Strongly Typed Collection.vsz
- Strongly Typed Dictionary.vsz
- vssver2.scc
- Wizard.cs
- TemplateManagerSetup
- TemplateManagerSetup.vdproj
- vssver2.scc
- templatemanager2003_source.zip
- TemplateManager2003_Source
- TemplateManager.sln
- TemplateManager
- AssemblyInfo.cs
- Forms
- Installer
- Misc
- Page.cs
- Schemas
- TemplateManager.csproj
- TemplateManager.snk
- Templates
- CSharp
- Project Items
- VB
- Project Items
- VC++
- Project Items
- VSZ files
- CSharp
- Project Items
- Krevera Template Manager
- Krevera.vsdir
- Strongly Typed Collection.vsz
- Strongly Typed Dictionary.vsz
- Krevera Template Managerq
- VB
- Project Items
- Krevera Template Manager
- Krevera.vsdir
- Strongly Typed Collection.vsz
- Strongly Typed Dictionary.vsz
- VC++
- Project Items
- Krevera Template Manager
- Krevera.vsdir
- Strongly Typed Collection.vsz
- Strongly Typed Dictionary.vsz
- Wizard.cs
- TemplateManagerSetup
- TemplateManagerSetup.vdproj
- templatemanager2003_bin.zip
- Setup.Exe
- Setup.Ini
- TemplateManagerSetup.msi
|
[%
<wizard>
<page>
<title>Select data type</title>
<description>Select data type for which to create a strongly typed collection</description>
<variable name="datatype"/>
</page>
</wizard>
%]Imports System
Imports System.Collections
Public Class [%<variable type="standard" name="filenamebase"/>%]
Inherits CollectionBase
Default Public Property Item(index As Integer) As [%<variable type="custom" name="datatype"/>%]
Get
Return CType(List(index), [%<variable type="custom" name="datatype"/>%])
End Get
Set
List(index) = value
End Set
End Property
Public Function Add(value As [%<variable type="custom" name="datatype"/>%]) As Integer
Return List.Add(value)
End Function 'Add
Public Function IndexOf(value As [%<variable type="custom" name="datatype"/>%]) As Integer
Return List.IndexOf(value)
End Function 'IndexOf
Public Sub Insert(index As Integer, value As [%<variable type="custom" name="datatype"/>%])
List.Insert(index, value)
End Sub 'Insert
Public Sub Remove(value As [%<variable type="custom" name="datatype"/>%])
List.Remove(value)
End Sub 'Remove
Public Function Contains(value As [%<variable type="custom" name="datatype"/>%]) As Boolean
' If value is not of type [%<variable type="custom" name="datatype"/>%], this will return false.
Return List.Contains(value)
End Function 'Contains
Protected Overrides Sub OnInsert(index As Integer, value As [Object])
' Insert additional code to be run only when inserting values.
End Sub 'OnInsert
Protected Overrides Sub OnRemove(index As Integer, value As [Object])
' Insert additional code to be run only when removing values.
End Sub 'OnRemove
Protected Overrides Sub OnSet(index As Integer, oldValue As [Object], newValue As [Object])
' Insert additional code to be run only when setting values.
End Sub 'OnSet
Protected Overrides Sub OnValidate(value As [Object])
' This check is commented out since it doesn't work for all types
'If Not value.GetType() Is Type.GetType("[%<variable type="custom" name="datatype"/>%]") Then
' Throw New ArgumentException("value must be of type [%<variable type="custom" name="datatype"/>%].", "value")
'End If
End Sub 'OnValidate
End Class '[%<variable type="custom" name="datatype"/>%]Collection
|
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.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Worked in the industry since 1996, as a developer, architect, project leader, etc.
Current interests include DirectX, Visual Studio adaptation (add-ins, macros, etc), C# and C++.