mirror of
https://github.com/abrendan/smolEdit.git
synced 2025-06-16 20:55:01 +02:00
Projektdateien hinzufügen.
This commit is contained in:
parent
c37870554a
commit
4f60cbb5de
25
V_EditorPro.sln
Normal file
25
V_EditorPro.sln
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.9.34902.65
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V_EditorPro", "V_EditorPro\V_EditorPro.csproj", "{640BD762-E2CC-4EFD-8748-80AE809CB5F3}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{640BD762-E2CC-4EFD-8748-80AE809CB5F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{640BD762-E2CC-4EFD-8748-80AE809CB5F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{640BD762-E2CC-4EFD-8748-80AE809CB5F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{640BD762-E2CC-4EFD-8748-80AE809CB5F3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {E19AB131-3C7A-4FD3-BF03-8A3097EC5AD6}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
6
V_EditorPro/App.config
Normal file
6
V_EditorPro/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
119
V_EditorPro/MainForm.Designer.cs
generated
Normal file
119
V_EditorPro/MainForm.Designer.cs
generated
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace V_EditorPro
|
||||||
|
{
|
||||||
|
public partial class MainForm : Form
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||||
|
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.searchReplaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||||
|
this.menuStrip1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
|
||||||
|
// MenuStrip
|
||||||
|
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.fileToolStripMenuItem,
|
||||||
|
this.editToolStripMenuItem,
|
||||||
|
this.helpToolStripMenuItem
|
||||||
|
});
|
||||||
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.menuStrip1.Name = "menuStrip1";
|
||||||
|
this.menuStrip1.Size = new System.Drawing.Size(800, 24);
|
||||||
|
this.menuStrip1.TabIndex = 0;
|
||||||
|
this.menuStrip1.Text = "menuStrip1";
|
||||||
|
|
||||||
|
// File Menu
|
||||||
|
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.openToolStripMenuItem,
|
||||||
|
this.saveToolStripMenuItem
|
||||||
|
});
|
||||||
|
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
|
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||||
|
this.fileToolStripMenuItem.Text = "File";
|
||||||
|
|
||||||
|
// Open
|
||||||
|
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||||
|
this.openToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
|
||||||
|
this.openToolStripMenuItem.Text = "Open";
|
||||||
|
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||||
|
|
||||||
|
// Save
|
||||||
|
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||||
|
this.saveToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
|
||||||
|
this.saveToolStripMenuItem.Text = "Save";
|
||||||
|
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||||
|
|
||||||
|
// Edit Menu
|
||||||
|
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.searchReplaceToolStripMenuItem
|
||||||
|
});
|
||||||
|
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||||
|
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||||
|
this.editToolStripMenuItem.Text = "Edit";
|
||||||
|
|
||||||
|
// Search/Replace
|
||||||
|
this.searchReplaceToolStripMenuItem.Name = "searchReplaceToolStripMenuItem";
|
||||||
|
this.searchReplaceToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||||
|
this.searchReplaceToolStripMenuItem.Text = "Search/Replace";
|
||||||
|
this.searchReplaceToolStripMenuItem.Click += new System.EventHandler(this.searchReplaceToolStripMenuItem_Click);
|
||||||
|
|
||||||
|
// Help Menu
|
||||||
|
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.aboutToolStripMenuItem
|
||||||
|
});
|
||||||
|
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||||
|
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||||
|
this.helpToolStripMenuItem.Text = "Help";
|
||||||
|
|
||||||
|
// About
|
||||||
|
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||||
|
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
||||||
|
this.aboutToolStripMenuItem.Text = "About";
|
||||||
|
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||||
|
|
||||||
|
// RichTextBox
|
||||||
|
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.richTextBox1.Location = new System.Drawing.Point(0, 24);
|
||||||
|
this.richTextBox1.Name = "richTextBox1";
|
||||||
|
this.richTextBox1.Size = new System.Drawing.Size(800, 426);
|
||||||
|
this.richTextBox1.TabIndex = 1;
|
||||||
|
this.richTextBox1.Text = "";
|
||||||
|
|
||||||
|
// MainForm
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
this.Controls.Add(this.richTextBox1);
|
||||||
|
this.Controls.Add(this.menuStrip1);
|
||||||
|
this.MainMenuStrip = this.menuStrip1;
|
||||||
|
this.Name = "MainForm";
|
||||||
|
this.Text = "V_EditorPro";
|
||||||
|
this.menuStrip1.ResumeLayout(false);
|
||||||
|
this.menuStrip1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem searchReplaceToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||||
|
}
|
||||||
|
}
|
71
V_EditorPro/MainForm.cs
Normal file
71
V_EditorPro/MainForm.cs
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace V_EditorPro
|
||||||
|
{
|
||||||
|
public partial class MainForm : Form
|
||||||
|
{
|
||||||
|
public MainForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.KeyDown += new KeyEventHandler(MainForm_KeyDown);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainForm_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Control && e.KeyCode == Keys.O)
|
||||||
|
{
|
||||||
|
OpenFile();
|
||||||
|
}
|
||||||
|
if (e.Control && e.KeyCode == Keys.S)
|
||||||
|
{
|
||||||
|
SaveFile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
OpenFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SaveFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void searchReplaceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using (SearchReplaceDialog searchReplaceDialog = new SearchReplaceDialog(richTextBox1))
|
||||||
|
{
|
||||||
|
searchReplaceDialog.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"V_EditorPro\nVersion 1.0\nOS: {RuntimeInformation.OSDescription}", "About");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenFile()
|
||||||
|
{
|
||||||
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||||
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
richTextBox1.Text = File.ReadAllText(openFileDialog.FileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SaveFile()
|
||||||
|
{
|
||||||
|
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||||
|
saveFileDialog.FileName = $"{DateTime.Now.ToString("yyyy-MM-dd")}.txt";
|
||||||
|
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
File.WriteAllText(saveFileDialog.FileName, richTextBox1.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
23
V_EditorPro/Program.cs
Normal file
23
V_EditorPro/Program.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using V_EditorPro;
|
||||||
|
|
||||||
|
namespace V_EditorPro
|
||||||
|
{
|
||||||
|
internal static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new MainForm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
V_EditorPro/Properties/AssemblyInfo.cs
Normal file
36
V_EditorPro/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die einer Assembly zugeordnet sind.
|
||||||
|
[assembly: AssemblyTitle("V_EditorPro")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("V_EditorPro")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||||
|
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||||
|
[assembly: Guid("640bd762-e2cc-4efd-8748-80ae809cb5f3")]
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
V_EditorPro/Properties/Resources.Designer.cs
generated
Normal file
71
V_EditorPro/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code neu generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace V_EditorPro.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
|
||||||
|
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources
|
||||||
|
{
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if ((resourceMan == null))
|
||||||
|
{
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("V_EditorPro.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
V_EditorPro/Properties/Resources.resx
Normal file
117
V_EditorPro/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
30
V_EditorPro/Properties/Settings.Designer.cs
generated
Normal file
30
V_EditorPro/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace V_EditorPro.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||||
|
{
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
V_EditorPro/Properties/Settings.settings
Normal file
7
V_EditorPro/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
118
V_EditorPro/SearchReplaceDialog.cs
Normal file
118
V_EditorPro/SearchReplaceDialog.cs
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace V_EditorPro
|
||||||
|
{
|
||||||
|
public partial class SearchReplaceDialog : Form
|
||||||
|
{
|
||||||
|
private RichTextBox _richTextBox;
|
||||||
|
|
||||||
|
public SearchReplaceDialog(RichTextBox richTextBox)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_richTextBox = richTextBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnFindNext_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int startIndex = _richTextBox.SelectionStart + _richTextBox.SelectionLength;
|
||||||
|
int wordStartIndex = _richTextBox.Find(txtFind.Text, startIndex, RichTextBoxFinds.None);
|
||||||
|
if (wordStartIndex != -1)
|
||||||
|
{
|
||||||
|
_richTextBox.Select(wordStartIndex, txtFind.Text.Length);
|
||||||
|
_richTextBox.ScrollToCaret();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Text not found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnReplace_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_richTextBox.SelectedText == txtFind.Text)
|
||||||
|
{
|
||||||
|
_richTextBox.SelectedText = txtReplace.Text;
|
||||||
|
}
|
||||||
|
btnFindNext.PerformClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnReplaceAll_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_richTextBox.Text = _richTextBox.Text.Replace(txtFind.Text, txtReplace.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.txtFind = new System.Windows.Forms.TextBox();
|
||||||
|
this.txtReplace = new System.Windows.Forms.TextBox();
|
||||||
|
this.btnFindNext = new System.Windows.Forms.Button();
|
||||||
|
this.btnReplace = new System.Windows.Forms.Button();
|
||||||
|
this.btnReplaceAll = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// txtFind
|
||||||
|
//
|
||||||
|
this.txtFind.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.txtFind.Name = "txtFind";
|
||||||
|
this.txtFind.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.txtFind.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// txtReplace
|
||||||
|
//
|
||||||
|
this.txtReplace.Location = new System.Drawing.Point(12, 38);
|
||||||
|
this.txtReplace.Name = "txtReplace";
|
||||||
|
this.txtReplace.Size = new System.Drawing.Size(200, 20);
|
||||||
|
this.txtReplace.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// btnFindNext
|
||||||
|
//
|
||||||
|
this.btnFindNext.Location = new System.Drawing.Point(218, 10);
|
||||||
|
this.btnFindNext.Name = "btnFindNext";
|
||||||
|
this.btnFindNext.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnFindNext.TabIndex = 2;
|
||||||
|
this.btnFindNext.Text = "Find Next";
|
||||||
|
this.btnFindNext.UseVisualStyleBackColor = true;
|
||||||
|
this.btnFindNext.Click += new System.EventHandler(this.btnFindNext_Click);
|
||||||
|
//
|
||||||
|
// btnReplace
|
||||||
|
//
|
||||||
|
this.btnReplace.Location = new System.Drawing.Point(218, 36);
|
||||||
|
this.btnReplace.Name = "btnReplace";
|
||||||
|
this.btnReplace.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnReplace.TabIndex = 3;
|
||||||
|
this.btnReplace.Text = "Replace";
|
||||||
|
this.btnReplace.UseVisualStyleBackColor = true;
|
||||||
|
this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
|
||||||
|
//
|
||||||
|
// btnReplaceAll
|
||||||
|
//
|
||||||
|
this.btnReplaceAll.Location = new System.Drawing.Point(218, 65);
|
||||||
|
this.btnReplaceAll.Name = "btnReplaceAll";
|
||||||
|
this.btnReplaceAll.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnReplaceAll.TabIndex = 4;
|
||||||
|
this.btnReplaceAll.Text = "Replace All";
|
||||||
|
this.btnReplaceAll.UseVisualStyleBackColor = true;
|
||||||
|
this.btnReplaceAll.Click += new System.EventHandler(this.btnReplaceAll_Click);
|
||||||
|
//
|
||||||
|
// SearchReplaceDialog
|
||||||
|
//
|
||||||
|
this.ClientSize = new System.Drawing.Size(305, 100);
|
||||||
|
this.Controls.Add(this.btnReplaceAll);
|
||||||
|
this.Controls.Add(this.btnReplace);
|
||||||
|
this.Controls.Add(this.btnFindNext);
|
||||||
|
this.Controls.Add(this.txtReplace);
|
||||||
|
this.Controls.Add(this.txtFind);
|
||||||
|
this.Name = "SearchReplaceDialog";
|
||||||
|
this.Text = "SearchReplaceDialog";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox txtFind;
|
||||||
|
private System.Windows.Forms.TextBox txtReplace;
|
||||||
|
private System.Windows.Forms.Button btnFindNext;
|
||||||
|
private System.Windows.Forms.Button btnReplace;
|
||||||
|
private System.Windows.Forms.Button btnReplaceAll;
|
||||||
|
}
|
||||||
|
}
|
83
V_EditorPro/V_EditorPro.csproj
Normal file
83
V_EditorPro/V_EditorPro.csproj
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{640BD762-E2CC-4EFD-8748-80AE809CB5F3}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>V_EditorPro</RootNamespace>
|
||||||
|
<AssemblyName>V_EditorPro</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="MainForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForm.Designer.cs">
|
||||||
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SearchReplaceDialog.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
Loading…
x
Reference in New Issue
Block a user