📄 customsourcevb.vb
字号:
Imports System
Imports System.Web
Imports System.Collections
Imports Telerik.RadSpellUtils.Dictionary
Namespace Telerik.SpellExamplesVBNET.Programming.CustomDictionary
'/ <summary>
'/ Summary description for CustomSource.
'/ </summary>
Public Class CustomSource
Implements ICustomDictionarySource
Private position As Integer = 0
Public Sub New()
End Sub 'New
Private ReadOnly Property WordsList() As ArrayList
Get
If HttpContext.Current.Cache("words") Is Nothing Then
HttpContext.Current.Cache("words") = New ArrayList
End If
Return CType(HttpContext.Current.Cache("words"), ArrayList)
End Get
End Property
Public Property DictionaryPath() As String Implements ICustomDictionarySource.DictionaryPath
Get
Return String.Empty
End Get
Set(ByVal Value As String)
End Set
End Property
Public Property Language() As String Implements ICustomDictionarySource.Language
Get
Return String.Empty
End Get
Set(ByVal Value As String)
End Set
End Property
Public Property CustomAppendix() As String Implements ICustomDictionarySource.CustomAppendix
Get
Return String.Empty
End Get
Set(ByVal Value As String)
End Set
End Property
Public Function ReadWord() As String Implements ICustomDictionarySource.ReadWord
If position >= WordsList.Count Then
Return Nothing
End If
Dim currentWord As String = CStr(WordsList(position))
position += 1
Return currentWord
End Function 'ReadWord
Public Sub AddWord(ByVal word As String) Implements ICustomDictionarySource.AddWord
WordsList.Add(word)
End Sub 'AddWord
End Class 'CustomSource
End Namespace
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -