From d8cc993e831bd064fd22e543ffdbe231a310c4f8 Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Thu, 5 Jul 2018 16:28:32 +0100 Subject: [PATCH] Add sample app --- .../ICSharpCode.TextEditor.Sample.csproj | 60 +++++++++ ICSharpCode.TextEditor.Sample/Program.cs | 16 +++ .../Properties/AssemblyInfo.cs | 36 ++++++ .../SampleForm.Designer.cs | 52 ++++++++ ICSharpCode.TextEditor.Sample/SampleForm.cs | 12 ++ ICSharpCode.TextEditor.Sample/SampleForm.resx | 120 ++++++++++++++++++ ICSharpCode.TextEditor.sln | 14 +- 7 files changed, 306 insertions(+), 4 deletions(-) create mode 100644 ICSharpCode.TextEditor.Sample/ICSharpCode.TextEditor.Sample.csproj create mode 100644 ICSharpCode.TextEditor.Sample/Program.cs create mode 100644 ICSharpCode.TextEditor.Sample/Properties/AssemblyInfo.cs create mode 100644 ICSharpCode.TextEditor.Sample/SampleForm.Designer.cs create mode 100644 ICSharpCode.TextEditor.Sample/SampleForm.cs create mode 100644 ICSharpCode.TextEditor.Sample/SampleForm.resx diff --git a/ICSharpCode.TextEditor.Sample/ICSharpCode.TextEditor.Sample.csproj b/ICSharpCode.TextEditor.Sample/ICSharpCode.TextEditor.Sample.csproj new file mode 100644 index 0000000..33bbeb1 --- /dev/null +++ b/ICSharpCode.TextEditor.Sample/ICSharpCode.TextEditor.Sample.csproj @@ -0,0 +1,60 @@ + + + + + Debug + AnyCPU + {7A53A84D-78B1-40B8-8D26-4724D829A756} + WinExe + ICSharpCode.TextEditor.Sample + ICSharpCode.TextEditor.Sample + v4.6 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + Form + + + SampleForm.cs + + + + + SampleForm.cs + + + + + {2d18be89-d210-49eb-a9dd-2246fbb3df6d} + ICSharpCode.TextEditor + + + + \ No newline at end of file diff --git a/ICSharpCode.TextEditor.Sample/Program.cs b/ICSharpCode.TextEditor.Sample/Program.cs new file mode 100644 index 0000000..d2b0e64 --- /dev/null +++ b/ICSharpCode.TextEditor.Sample/Program.cs @@ -0,0 +1,16 @@ +using System; +using System.Windows.Forms; + +namespace ICSharpCode.TextEditor.Sample +{ + internal static class Program + { + [STAThread] + private static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new SampleForm()); + } + } +} diff --git a/ICSharpCode.TextEditor.Sample/Properties/AssemblyInfo.cs b/ICSharpCode.TextEditor.Sample/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..25178e2 --- /dev/null +++ b/ICSharpCode.TextEditor.Sample/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ICSharpCode.TextEditor.Sample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ICSharpCode.TextEditor.Sample")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7a53a84d-78b1-40b8-8d26-4724d829a756")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ICSharpCode.TextEditor.Sample/SampleForm.Designer.cs b/ICSharpCode.TextEditor.Sample/SampleForm.Designer.cs new file mode 100644 index 0000000..7b62dca --- /dev/null +++ b/ICSharpCode.TextEditor.Sample/SampleForm.Designer.cs @@ -0,0 +1,52 @@ +namespace ICSharpCode.TextEditor.Sample +{ + partial class SampleForm + { + private System.ComponentModel.IContainer components = null; + + protected override void Dispose(bool disposing) + { + if (disposing) + { + components?.Dispose(); + } + + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + private void InitializeComponent() + { + this.textEditor = new ICSharpCode.TextEditor.TextEditorControl(); + this.SuspendLayout(); + // + // textEditor + // + this.textEditor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textEditor.IsReadOnly = false; + this.textEditor.Location = new System.Drawing.Point(0, 0); + this.textEditor.Name = "textEditor"; + this.textEditor.Size = new System.Drawing.Size(989, 628); + this.textEditor.TabIndex = 0; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(989, 628); + this.Controls.Add(this.textEditor); + this.Name = "SampleForm"; + this.Text = "ICSharpCode.TextEditor Sample"; + this.ResumeLayout(false); + + } + + #endregion + + private ICSharpCode.TextEditor.TextEditorControl textEditor; + } +} + diff --git a/ICSharpCode.TextEditor.Sample/SampleForm.cs b/ICSharpCode.TextEditor.Sample/SampleForm.cs new file mode 100644 index 0000000..25b81d6 --- /dev/null +++ b/ICSharpCode.TextEditor.Sample/SampleForm.cs @@ -0,0 +1,12 @@ +using System.Windows.Forms; + +namespace ICSharpCode.TextEditor.Sample +{ + public sealed partial class SampleForm : Form + { + public SampleForm() + { + InitializeComponent(); + } + } +} diff --git a/ICSharpCode.TextEditor.Sample/SampleForm.resx b/ICSharpCode.TextEditor.Sample/SampleForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ICSharpCode.TextEditor.Sample/SampleForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ICSharpCode.TextEditor.sln b/ICSharpCode.TextEditor.sln index b75ad8e..8c14506 100644 --- a/ICSharpCode.TextEditor.sln +++ b/ICSharpCode.TextEditor.sln @@ -6,20 +6,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor.Test EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor.Sample", "ICSharpCode.TextEditor.Sample\ICSharpCode.TextEditor.Sample.csproj", "{7A53A84D-78B1-40B8-8D26-4724D829A756}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.Build.0 = Release|Any CPU {6259D767-BA7C-484D-9472-68F350A20086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6259D767-BA7C-484D-9472-68F350A20086}.Debug|Any CPU.Build.0 = Debug|Any CPU {6259D767-BA7C-484D-9472-68F350A20086}.Release|Any CPU.ActiveCfg = Release|Any CPU {6259D767-BA7C-484D-9472-68F350A20086}.Release|Any CPU.Build.0 = Release|Any CPU + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.Build.0 = Release|Any CPU + {7A53A84D-78B1-40B8-8D26-4724D829A756}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A53A84D-78B1-40B8-8D26-4724D829A756}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A53A84D-78B1-40B8-8D26-4724D829A756}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A53A84D-78B1-40B8-8D26-4724D829A756}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE