| 1 |
Public Class clsHint |
| 2 |
Inherits clsItem |
| 3 |
|
| 4 |
Private sQuestion As String |
| 5 |
Private oSubtleHint As Description |
| 6 |
Private oSledgeHammerHint As Description |
| 7 |
Friend arlRestrictions As New RestrictionArrayList |
| 8 |
|
| 9 |
|
| 10 |
Public Sub New() |
| 11 |
oSubtleHint = New Description |
| 12 |
oSledgeHammerHint = New Description |
| 13 |
End Sub |
| 14 |
Public Overrides Function DeleteKey(ByVal sKey As String) As Boolean |
| 15 |
|
| 16 |
For Each d As Description In AllDescriptions |
| 17 |
If Not d.DeleteKey(sKey) Then Return False |
| 18 |
Next |
| 19 |
If Not arlRestrictions.DeleteKey(sKey) Then Return False |
| 20 |
|
| 21 |
Return (True) |
| 22 |
|
| 23 |
End Function |
| 24 |
|
| 25 |
|
| 26 |
Public Property Question() As String |
| 27 |
Get |
| 28 |
Return sQuestion |
| 29 |
End Get |
| 30 |
Set(ByVal Value As String) |
| 31 |
sQuestion = Value |
| 32 |
End Set |
| 33 |
End Property |
| 34 |
|
| 35 |
Friend Property SubtleHint() As Description |
| 36 |
Get |
| 37 |
Return oSubtleHint |
| 38 |
End Get |
| 39 |
Set(ByVal Value As Description) |
| 40 |
oSubtleHint = Value |
| 41 |
End Set |
| 42 |
End Property |
| 43 |
|
| 44 |
Friend Property SledgeHammerHint() As Description |
| 45 |
Get |
| 46 |
Return oSledgeHammerHint |
| 47 |
End Get |
| 48 |
Set(ByVal Value As Description) |
| 49 |
oSledgeHammerHint = Value |
| 50 |
End Set |
| 51 |
End Property |
| 52 |
|
| 53 |
Public Overrides ReadOnly Property Clone() As clsItem |
| 54 |
Get |
| 55 |
Return CType(Me.MemberwiseClone, clsHint) |
| 56 |
End Get |
| 57 |
End Property |
| 58 |
|
| 59 |
Public Overrides ReadOnly Property CommonName() As String |
| 60 |
Get |
| 61 |
Return Question |
| 62 |
End Get |
| 63 |
End Property |
| 64 |
|
| 65 |
Friend Overrides ReadOnly Property AllDescriptions() As System.Collections.Generic.List(Of SharedModule.Description) |
| 66 |
Get |
| 67 |
Dim all As New Generic.List(Of Description) |
| 68 |
all.Add(SledgeHammerHint) |
| 69 |
all.Add(SubtleHint) |
| 70 |
Return all |
| 71 |
End Get |
| 72 |
End Property |
| 73 |
|
| 74 |
|
| 75 |
Friend Overrides Function FindStringLocal(sSearchString As String, Optional sReplace As String = Nothing, Optional bFindAll As Boolean = True, Optional ByRef iReplacements As Integer = 0) As Object |
| 76 |
Dim iCount As Integer = iReplacements |
| 77 |
iReplacements += MyBase.FindStringInStringProperty(Me.sQuestion, sSearchString, sReplace, bFindAll) |
| 78 |
Return iReplacements - iCount |
| 79 |
End Function |
| 80 |
|
| 81 |
Public Overrides Function ReferencesKey(ByVal sKey As String) As Integer |
| 82 |
|
| 83 |
End Function |
| 84 |
End Class |