TX Spell .NET for Windows Forms

OpenOfficeDictionary Constructor

Constructor
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WinForms.SDK as TXSpell.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll

Description

Initializes a new instance of the OpenOfficeDictionary class.

Syntax

OpenOfficeDictionary(string)

Initializes a new instance of the OpenOfficeDictionary class by loading a Hunspell Open Source dictionary from a file.

public OpenOfficeDictionary(string dictionaryPath);
ParameterDescription
dictionaryPath

Specifies the path for the Hunspell Open Source dictionary dict file. By specifying only the dictionary name without any file path, the corresponding dictionary file of the default dictionary folder is used. The name of the specified Hunspell Open Source dictionary file must end with ".dic" or ".aff". If the file does not exist, an ArgumentException is thrown.

OpenOfficeDictionary(string[], string[], CultureInfo)

Initializes a new instance of the OpenOfficeDictionary class by loading a dictionary from string arrays that represent the content of a Hunspell Open Source dictionary and the corresponding affix file.

public OpenOfficeDictionary(string[] dictionaryLines, string[] affixLines, CultureInfo language);
ParameterDescription
dictionaryLines

The string array that represents the content of a Hunspell Open Source dictionary file. Each string of this array is considered as a line of the dictionary file.

affixLines

The string array that represents the content of a Hunspell Open Source affix file. Each string of this array is considered as a line of the affix file.

language

Specifies the language of the dictionary.

Examples

The following example creates an Open Office Dictionary instance and configures its display name setting for a document workflow.

TXTextControl.Proofing.OpenOfficeDictionary openOfficeDictionary = new("document.docx");
openOfficeDictionary.DisplayName = "CustomerName";