|
<ConfigLanguage name="CustomLanguage" CaseInsensitive="true">
<formats>
<format name="Text" Font="Courier New, 10pt" FontColor="Black" />
<format name="PreprocessorKeyword" Font="Courier New, 10pt" FontColor="Red" />
<format name="Comment" Font="Courier New, 10pt" FontColor="Green" />
<format name="CollapsedText" Font="Courier New, 10pt" FontColor="Red" BackColor="White"
BorderColor="Gray" BorderStyle="Solid" />
</formats>
<extensions>
<extension>cl</extension>
</extensions>
<lexems>
<!-- ; denotes the comment-->
<lexem BeginBlock=";" EndBlock="\n" IsEndRegex="true" Type="Comment" IsComplex="true" OnlyLocalSublexems="true" />
<!-- For collapsed region -->
<lexem BeginBlock=";region" EndBlock=";endregion" Type="PreprocessorKeyword" IsEndRegex="false"
IsComplex="true" IsCollapsable="true" AutoNameExpression='(;region)\s*"(?<text>.*)".*(?<!\n)\n'
AutoNameTemplate="${text}" IsCollapseAutoNamed="true" CollapseName="Variable Section">
<SubLexems>
<lexem BeginBlock="\n" IsBeginRegex="true"/>
</SubLexems>
</lexem>
</lexems>
<splits>
<split>;region</split>
<split>;endregion</split>
</splits>
</ConfigLanguage> |
|
//Define config file path
private string configPath = Path.GetDirectoryName(Application.ExecutablePath) + "\\..\\..\\Config.xml";
// External configuration file.
this.editControl1.Configurator.Open(configPath);
// Apply the configuration defined in the configuration file.
this.editControl1.ApplyConfiguration("CustomLanguage"); |