📄 customsourcecs.cs
字号:
using System;
using System.Web;
using System.Collections;
namespace Telerik.SpellExamplesCSharp.Programming.CustomDictionary
{
/// <summary>
/// Summary description for CustomSource.
/// </summary>
public class CustomSource : Telerik.RadSpellUtils.Dictionary.ICustomDictionarySource
{
private int position = 0;
public CustomSource()
{
}
private ArrayList WordsList
{
get
{
if (HttpContext.Current.Cache["words"] == null)
{
HttpContext.Current.Cache["words"] = new ArrayList();
}
return (ArrayList) HttpContext.Current.Cache["words"];
}
}
public string DictionaryPath
{
get{ return string.Empty; }
set{}
}
public string Language
{
get{ return string.Empty; }
set{}
}
public string CustomAppendix
{
get{ return string.Empty; }
set{}
}
public string ReadWord()
{
if (position >= WordsList.Count)
return null;
string currentWord = (string) WordsList[position];
position++;
return currentWord;
}
public void AddWord(string word)
{
WordsList.Add(word);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -