Settings.SetLicense

Settings SetLicense method. Licenses the component.

SetLicense(string)

Licenses the component.

public static void SetLicense(string licenseName)
ParameterTypeDescription
licenseNameStringCan be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.

Remarks

Tries to find the license in the following locations:

  1. Explicit path.

  2. The folder that contains the Wordize component assembly.

  3. The folder that contains the client’s calling assembly.

  4. The folder that contains the entry (startup) assembly.

  5. An embedded resource in the client’s calling assembly.

Examples

Shows how to set license for several modules from explicit file path.

Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Core_for_.NET.lic"));

// Formats
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Rendering_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_OpenOffice_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Web_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_eBook_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_PDF_Load_for_.NET.lic"));

// Features 
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Comparison_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Signature_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Mail_Merge_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Merge_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Replacement_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Splitter_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_Watermark_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_LINQ_Reporting_Engine_for_.NET.lic"));
Wordize.Settings.SetLicense(Path.Combine(LicenseDir, @"Wordize\Wordize_AI_for_.NET.lic"));

See Also


SetLicense(Stream)

Licenses the component.

public static void SetLicense(Stream stream)
ParameterTypeDescription
streamStreamA stream that contains the license.

Remarks

Use this method to load a license from a stream.

Examples

Shows how to set license for several modules from stream.

using (Stream coreLic = File.OpenRead(Path.Combine(LicenseDir, @"Wordize\Wordize_Core_for_.NET.lic")))
using (Stream renderingLic = File.OpenRead(Path.Combine(LicenseDir, @"Wordize\Wordize_Rendering_for_.NET.lic")))
{
    Wordize.Settings.SetLicense(coreLic);
    Wordize.Settings.SetLicense(renderingLic);
}

See Also