Skip to content

Commit 38ce479

Browse files
Merge pull request #1 from Niranjan16-Ninja/master
To change the font size of editor texts after config.xml file has been loaded
2 parents a070e20 + 787c18c commit 38ce479

File tree

19 files changed

+1813
-2
lines changed

19 files changed

+1813
-2
lines changed
45.5 KB
Binary file not shown.

EditControlFontCustomize/.vs/EditControlFontCustomize/v16/Server/sqlite3/db.lock

Whitespace-only changes.
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
5+
</startup>
6+
</configuration>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{5A66A55F-E798-437C-A44F-5D72D4CA36AE}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>EditControlFontCustomize</RootNamespace>
10+
<AssemblyName>EditControlFontCustomize</AssemblyName>
11+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="Syncfusion.Edit.Windows"/>
37+
<Reference Include="Syncfusion.Grid.Base"/>
38+
<Reference Include="Syncfusion.Grid.Windows"/>
39+
<Reference Include="Syncfusion.Licensing"/>
40+
<Reference Include="Syncfusion.Shared.Base"/>
41+
<Reference Include="Syncfusion.Shared.Windows"/>
42+
<Reference Include="Syncfusion.SpellChecker.Base"></Reference>
43+
<Reference Include="Syncfusion.Tools.Base"/>
44+
<Reference Include="Syncfusion.Tools.Windows"/>
45+
<Reference Include="System" />
46+
<Reference Include="System.Core" />
47+
<Reference Include="System.Xml.Linq" />
48+
<Reference Include="System.Data.DataSetExtensions" />
49+
<Reference Include="Microsoft.CSharp" />
50+
<Reference Include="System.Data" />
51+
<Reference Include="System.Deployment" />
52+
<Reference Include="System.Drawing" />
53+
<Reference Include="System.Net.Http" />
54+
<Reference Include="System.Windows.Forms" />
55+
<Reference Include="System.Xml" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<Compile Include="Form1.cs">
59+
<SubType>Form</SubType>
60+
</Compile>
61+
<Compile Include="Form1.Designer.cs">
62+
<DependentUpon>Form1.cs</DependentUpon>
63+
</Compile>
64+
<Compile Include="Program.cs" />
65+
<Compile Include="Properties\AssemblyInfo.cs" />
66+
<EmbeddedResource Include="Form1.resx">
67+
<DependentUpon>Form1.cs</DependentUpon>
68+
</EmbeddedResource>
69+
<EmbeddedResource Include="Properties\Resources.resx">
70+
<Generator>ResXFileCodeGenerator</Generator>
71+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
72+
<SubType>Designer</SubType>
73+
</EmbeddedResource>
74+
<Compile Include="Properties\Resources.Designer.cs">
75+
<AutoGen>True</AutoGen>
76+
<DependentUpon>Resources.resx</DependentUpon>
77+
</Compile>
78+
<None Include="packages.config" />
79+
<None Include="Properties\Settings.settings">
80+
<Generator>SettingsSingleFileGenerator</Generator>
81+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
82+
</None>
83+
<Compile Include="Properties\Settings.Designer.cs">
84+
<AutoGen>True</AutoGen>
85+
<DependentUpon>Settings.settings</DependentUpon>
86+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
87+
</Compile>
88+
</ItemGroup>
89+
<ItemGroup>
90+
<None Include="App.config" />
91+
</ItemGroup>
92+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
93+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29728.190
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditControlFontCustomize", "EditControlFontCustomize.csproj", "{5A66A55F-E798-437C-A44F-5D72D4CA36AE}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{5A66A55F-E798-437C-A44F-5D72D4CA36AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{5A66A55F-E798-437C-A44F-5D72D4CA36AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{5A66A55F-E798-437C-A44F-5D72D4CA36AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{5A66A55F-E798-437C-A44F-5D72D4CA36AE}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {DDB5681B-678E-482D-BB72-E7EB11860EA8}
24+
EndGlobalSection
25+
EndGlobal

EditControlFontCustomize/Form1.Designer.cs

Lines changed: 105 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EditControlFontCustomize/Form1.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
using Syncfusion.Windows.Forms.Edit.Enums;
2+
using Syncfusion.Windows.Forms.Edit.Implementation.Config;
3+
using Syncfusion.Windows.Forms.Edit.Interfaces;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.ComponentModel;
7+
using System.Data;
8+
using System.Drawing;
9+
using System.IO;
10+
using System.Linq;
11+
using System.Text;
12+
using System.Threading.Tasks;
13+
using System.Windows.Forms;
14+
15+
namespace EditControlFontCustomize
16+
{
17+
public partial class Form1 : Form
18+
{
19+
private string ConfigPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\..\..\config.xml";
20+
public Form1()
21+
{
22+
InitializeComponent();
23+
this.editControl1.Configurator.Open(ConfigPath);
24+
editControl1.NewFile(editControl1.Configurator["C#"]);
25+
editControl1.Language.CaseInsensitive = true;
26+
this.editControl1.Text = "New Table in Syntax Editor \nand how to change the font appearance \nespecially in Syntax Editor";
27+
this.editControl1.ApplyConfiguration(Syncfusion.Windows.Forms.Edit.Enums.KnownLanguages.CSharp);
28+
}
29+
30+
private void button1_Click(object sender, EventArgs e)
31+
{
32+
ISnippetFormat keywordFormat = this.editControl1.Language.Add("Keyword");
33+
keywordFormat.FontColor = Color.Red;
34+
keywordFormat.Font = new Font(FontFamily.GenericSansSerif, 14,FontStyle.Italic);
35+
36+
ConfigLexem configLex = new ConfigLexem("[A-Z]+", "", FormatType.Custom, false);
37+
38+
39+
configLex.IsBeginRegex = true;
40+
configLex.IsEndRegex = true;
41+
configLex.FormatName = "Keyword";
42+
43+
44+
editControl1.Language.Lexems.Add(configLex);
45+
editControl1.Language.ResetCaches();
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)