menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Config - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Config

    Represents a class that is used for reading xml configuration and also creating array of ConfigLanguage. (ConfigLanguage - object which describes concrete programming language: how to parse current source).

    Inheritance
    System.Object
    Config
    Implements
    IConfig
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Syncfusion.Windows.Forms.Edit.Implementation.Config
    Assembly: Syncfusion.Edit.Windows.dll
    Syntax
    public class Config : IConfig, IDisposable

    Constructors

    Config()

    Initializes a new instance of the Config class.

    Declaration
    public Config()

    Config(Boolean)

    Initializes a new instance of the Config class.

    Declaration
    public Config(bool design)
    Parameters
    Type Name Description
    System.Boolean design

    Indicates whether underlying control is in design mode.

    Config(Boolean, Boolean)

    Initializes a new instance of the Config class.

    Declaration
    public Config(bool bDesign, bool bLoadConfigFile)
    Parameters
    Type Name Description
    System.Boolean bDesign

    Indicates whether underlying control is in design mode.

    System.Boolean bLoadConfigFile

    Indicates whether config file should be loaded.

    Config(Stream)

    Initializes a new instance of the Config using stream.

    Declaration
    public Config(Stream cfgStream)
    Parameters
    Type Name Description
    System.IO.Stream cfgStream

    Stream which filled with data.

    Config(String)

    Initializes a new instance of the Config using file name.

    Declaration
    public Config(string strFileName)
    Parameters
    Type Name Description
    System.String strFileName

    Xml file name.

    Config(XmlDocument)

    Initializes a new instance of the Config using xmlDocument.

    Declaration
    public Config(XmlDocument xmlDoc)
    Parameters
    Type Name Description
    System.Xml.XmlDocument xmlDoc

    Obj which represents xml file.

    Fields

    DEF_DEFAULT_LANGUAGE_NAME

    Holds the default language name.

    Declaration
    public const string DEF_DEFAULT_LANGUAGE_NAME = "default_language"
    Field Value
    Type
    System.String

    Properties

    DefaultLanguage

    Gets default language configuration that is stored in embedded resource.

    Declaration
    public IConfigLanguage DefaultLanguage { get; }
    Property Value
    Type
    IConfigLanguage

    DefConfigStream

    Gets the stream of default configuration document.

    Declaration
    public static Stream DefConfigStream { get; }
    Property Value
    Type
    System.IO.Stream

    Item[Int32]

    Gets configuration for language by index.

    Declaration
    public IConfigLanguage this[int iIndex] { get; }
    Parameters
    Type Name Description
    System.Int32 iIndex
    Property Value
    Type
    IConfigLanguage

    Item[String]

    Gets configuration for language by specified name.

    Declaration
    public IConfigLanguage this[string name] { get; }
    Parameters
    Type Name Description
    System.String name
    Property Value
    Type
    IConfigLanguage

    KnownLanguageNames

    Gets the list of known language names.

    Declaration
    public ArrayList KnownLanguageNames { get; }
    Property Value
    Type
    System.Collections.ArrayList

    KnownLanguages

    Gets list of known languages.

    Declaration
    public ArrayList KnownLanguages { get; }
    Property Value
    Type
    System.Collections.ArrayList

    Methods

    Add(IConfigLanguage, DuplicatesOptions)

    Adds configuration language to config.

    Declaration
    protected void Add(IConfigLanguage language, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    IConfigLanguage language

    Language for adding.

    DuplicatesOptions duplicatesProcessing

    Specifies how to process duplicates.

    Append(Stream)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    public void Append(Stream configStream)
    Parameters
    Type Name Description
    System.IO.Stream configStream

    Stream with XML config

    Append(Stream, DuplicatesOptions)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    public void Append(Stream configStream, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    System.IO.Stream configStream

    Stream with XML config

    DuplicatesOptions duplicatesProcessing

    Application's behaviour on duplicates occurance.

    Append(String)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    public void Append(string configFile)
    Parameters
    Type Name Description
    System.String configFile

    File path to config file.

    Append(String, DuplicatesOptions)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    public void Append(string configFile, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    System.String configFile

    File path to config file.

    DuplicatesOptions duplicatesProcessing

    Application`s behaviour on duplicates occurance.

    Append(XmlDocument)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    public void Append(XmlDocument configXml)
    Parameters
    Type Name Description
    System.Xml.XmlDocument configXml

    XML document which contains formatting data

    Append(XmlDocument, DuplicatesOptions)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    public void Append(XmlDocument configXml, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    System.Xml.XmlDocument configXml

    XML document which contains formatting data

    DuplicatesOptions duplicatesProcessing

    Application's behaviour on duplicates occurance.

    AppendConfig(Stream)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    [Obsolete("This method has been renamed. It's new name is Append.")]
    public void AppendConfig(Stream configStream)
    Parameters
    Type Name Description
    System.IO.Stream configStream

    Stream with XML config

    AppendConfig(Stream, DuplicatesOptions)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    [Obsolete("This method has been renamed. It's new name is Append.")]
    public void AppendConfig(Stream configStream, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    System.IO.Stream configStream

    Stream with XML config

    DuplicatesOptions duplicatesProcessing

    Application`s behaviour on duplicates occurance.

    AppendConfig(String)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    [Obsolete("This method has been renamed. It's new name is Append.")]
    public void AppendConfig(string configFile)
    Parameters
    Type Name Description
    System.String configFile

    File path to config file.

    AppendConfig(String, DuplicatesOptions)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    [Obsolete("This method has been renamed. It's new name is Append.")]
    public void AppendConfig(string configFile, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    System.String configFile

    file path to config file

    DuplicatesOptions duplicatesProcessing

    Application`s behaviour on duplicates occurance.

    AppendConfig(XmlDocument)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    [Obsolete("This method has been renamed. It's new name is Append.")]
    public void AppendConfig(XmlDocument configXml)
    Parameters
    Type Name Description
    System.Xml.XmlDocument configXml

    XML document which contains formatting data

    AppendConfig(XmlDocument, DuplicatesOptions)

    If config file divided by user on many small one for each language then this methods will help him to load them in one call.

    Declaration
    [Obsolete("This method has been renamed. It's new name is Append.")]
    public void AppendConfig(XmlDocument configXml, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    System.Xml.XmlDocument configXml

    XML document which contains formatting data

    DuplicatesOptions duplicatesProcessing

    Application's behaviour on duplicates occurance.

    AppendDefaultLanguage()

    Appends default language from embedded resource.

    Declaration
    protected void AppendDefaultLanguage()

    BindToLanguageEvents()

    Binds events.

    Declaration
    protected void BindToLanguageEvents()

    ClearStaticData()

    Helps to clears the static collection of default languages.

    Declaration
    public static void ClearStaticData()

    CreateLanguageConfiguration(String)

    Creates new language configuration and adds it to the configurations list.

    Declaration
    public IConfigLanguage CreateLanguageConfiguration(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the new language.

    Returns
    Type Description
    IConfigLanguage

    New instance of language configuration.

    Dispose()

    Releases all resources used by this Controls component.

    Declaration
    public void Dispose()

    GetLanguage(String)

    Detect language by file name extension.

    Declaration
    public IConfigLanguage GetLanguage(string extension)
    Parameters
    Type Name Description
    System.String extension

    File extension.

    Returns
    Type Description
    IConfigLanguage

    IConfigLanguage - config obj for parsing.

    OnConfigurationChanged()

    Raises ConfigurationChanged event.

    Declaration
    protected void OnConfigurationChanged()

    Open(Stream)

    Reads config from stream.

    Declaration
    public void Open(Stream configFile)
    Parameters
    Type Name Description
    System.IO.Stream configFile

    stream which contains configuration for parsers.

    Open(String)

    Open configuration file by using its path.

    Declaration
    public void Open(string configFile)
    Parameters
    Type Name Description
    System.String configFile

    File name of config.

    Open(XmlDocument)

    Opens the XML Document which contains configuration rules for parsers.

    Declaration
    public void Open(XmlDocument configFile)
    Parameters
    Type Name Description
    System.Xml.XmlDocument configFile

    XML Document.

    ProcessAndAppend(ConfigLanguage[], DuplicatesOptions)

    Appends languages to the configuration.

    Declaration
    protected void ProcessAndAppend(ConfigLanguage[] languages, DuplicatesOptions duplicatesProcessing)
    Parameters
    Type Name Description
    ConfigLanguage[] languages

    Array of languages to append.

    DuplicatesOptions duplicatesProcessing

    Specifies how to process duplicates.

    Remove(IConfigLanguage)

    Removes language from collection.

    Declaration
    protected bool Remove(IConfigLanguage language)
    Parameters
    Type Name Description
    IConfigLanguage language

    Language which must be removed.

    Returns
    Type Description
    System.Boolean

    TRUE - if language deleted, FALSE - otherwise.

    Reset()

    Resets configuration languages list and loads default configuration.

    Declaration
    public void Reset()

    Save(Stream)

    Save configuration to output stream.

    Declaration
    public void Save(Stream configStream)
    Parameters
    Type Name Description
    System.IO.Stream configStream

    Stream for config saving.

    Save(String)

    Saves current configuration to file.

    Declaration
    public void Save(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    Output file name.

    Save(XmlDocument)

    Save configuration to XML Document.

    Declaration
    public void Save(XmlDocument configXml)
    Parameters
    Type Name Description
    System.Xml.XmlDocument configXml

    XML document to which data must be saved.

    ToString()

    Converts class object to string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    String representation of config.

    Overrides
    System.Object.ToString()

    Events

    ConfigurationChanged

    Occurs after the configuration has changed.

    Declaration
    public event EventHandler ConfigurationChanged
    Event Type
    Type
    System.EventHandler

    FormatsChanged

    Occurs after the formats configuration has changed.

    Declaration
    public event EventHandler FormatsChanged
    Event Type
    Type
    System.EventHandler

    Implements

    IConfig
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved