Someone finally asked me if I had actually released the Tablet Dictionary Manager I wrote about almost exactly one year ago. Well, I hadn't, but I will now.
Dictionary Manager 1.1, requires CLR 2.0:
Features:
- Add words
- Delete words
- Check for recognised words.
- Export user dictionary.
- Import from plugin:
- .NET Assembly
- Text File
- Outlook Contacts
Writing your own plugin is straightforward:
- Reference DictionaryManager.exe
- Create a static method that retuns List<String>
- Mark it with the DictionaryPlugin attribute
- Compile
- Place the dll in the DictionaryManager directory
Rather than going into more detail, here's the source code for the .NET Assembly plugin:
public static class Default { [DictionaryManager.DictionaryPlugin(".NET Assembly")] public static List<string> ReadFile() { List<string> result = new List<string>(); OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = ".NET Assembly|.dll"; if (ofd.ShowDialog() == DialogResult.OK) { System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(ofd.FileName); foreach (Type t in assembly.GetTypes()) { Add(result, t.Name); foreach (MemberInfo member in t.GetMembers()) { Add(result, member.Name); } } } return result; } public static void Add(List<string> words, string word) { int index = words.BinarySearch(word); if (index < 0) words.Insert(~index, word); } }
Changelog:
11/04/2006 - Dictionary Manager 1.1
- Bug - "Text File" import did not close file handle.
- Feature - Support recognition, word operations and dictionary refresh on individual cultures. The current culture can be changed dynamically using the Windows language bar.
2 Comments
