customsourcecs.cs

来自「Telerik是很大的第三方软件制造商」· CS 代码 · 共 65 行

CS
65
字号
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 + =
减小字号Ctrl + -
显示快捷键?