Skip to content

A Swiss Army knife for developers.

Added Text Comparer tool to DevToys 2.0 (#981)

Etienne BAUDOUXd9f69f20f461
diff --git a/src/app/dev/DevToys.Api/Tool/GUI/PredefinedCommonToolGroupNames.cs b/src/app/dev/DevToys.Api/Tool/GUI/PredefinedCommonToolGroupNames.cs
index c29ca7bc5..e6cca2a32 100644
--- a/src/app/dev/DevToys.Api/Tool/GUI/PredefinedCommonToolGroupNames.cs
+++ b/src/app/dev/DevToys.Api/Tool/GUI/PredefinedCommonToolGroupNames.cs
@@ -6,4 +6,5 @@ public static class PredefinedCommonToolGroupNames
public const string Converters = "Converters";
public const string Generators = "Generators";
public const string Graphic = "Graphic";
+ public const string Text = "Text";
}
diff --git a/src/app/dev/DevToys.Tools/DevToys.Tools.csproj b/src/app/dev/DevToys.Tools/DevToys.Tools.csproj
index 001db0075..7007d4187 100644
--- a/src/app/dev/DevToys.Tools/DevToys.Tools.csproj
+++ b/src/app/dev/DevToys.Tools/DevToys.Tools.csproj
@@ -104,6 +104,16 @@
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
+ <Compile Update="Tools\Text\Compare\TextCompare.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>TextCompare.resx</DependentUpon>
+ </Compile>
+ <Compile Update="Tools\Text\Text.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Text.resx</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Strings\GlobalStrings\GlobalStrings.resx">
@@ -166,6 +176,14 @@
<LastGenOutput>Test.Designer.cs</LastGenOutput>
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
+ <EmbeddedResource Update="Tools\Text\Compare\TextCompare.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>TextCompare.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Update="Tools\Text\Text.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Text.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
diff --git a/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompare.Designer.cs b/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompare.Designer.cs
new file mode 100644
index 000000000..941c81aff
--- /dev/null
+++ b/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompare.Designer.cs
@@ -0,0 +1,153 @@
+//------------------------------------------------------------------------------
+// <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 DevToys.Tools.Tools.Text.Compare {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class TextCompare {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal TextCompare() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DevToys.Tools.Tools.Text.Compare.TextCompare", typeof(TextCompare).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Text comparer tool.
+ /// </summary>
+ internal static string AccessibleName {
+ get {
+ return ResourceManager.GetString("AccessibleName", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Configuration.
+ /// </summary>
+ internal static string Configuration {
+ get {
+ return ResourceManager.GetString("Configuration", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Compare two texts.
+ /// </summary>
+ internal static string Description {
+ get {
+ return ResourceManager.GetString("Description", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Difference.
+ /// </summary>
+ internal static string Difference {
+ get {
+ return ResourceManager.GetString("Difference", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Inline mode.
+ /// </summary>
+ internal static string InlineDifference {
+ get {
+ return ResourceManager.GetString("InlineDifference", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Text Comparer.
+ /// </summary>
+ internal static string LongDisplayTitle {
+ get {
+ return ResourceManager.GetString("LongDisplayTitle", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Modified text.
+ /// </summary>
+ internal static string ModifiedText {
+ get {
+ return ResourceManager.GetString("ModifiedText", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Original text.
+ /// </summary>
+ internal static string OriginalText {
+ get {
+ return ResourceManager.GetString("OriginalText", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Diff.
+ /// </summary>
+ internal static string SearchKeywords {
+ get {
+ return ResourceManager.GetString("SearchKeywords", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Compare.
+ /// </summary>
+ internal static string ShortDisplayTitle {
+ get {
+ return ResourceManager.GetString("ShortDisplayTitle", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompare.resx b/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompare.resx
new file mode 100644
index 000000000..628c0e0dd
--- /dev/null
+++ b/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompare.resx
@@ -0,0 +1,150 @@
+<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <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" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </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" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="AccessibleName" xml:space="preserve">
+ <value>Text comparer tool</value>
+ </data>
+ <data name="Configuration" xml:space="preserve">
+ <value>Configuration</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Compare two texts</value>
+ </data>
+ <data name="Difference" xml:space="preserve">
+ <value>Difference</value>
+ </data>
+ <data name="InlineDifference" xml:space="preserve">
+ <value>Inline mode</value>
+ </data>
+ <data name="LongDisplayTitle" xml:space="preserve">
+ <value>Text Comparer</value>
+ </data>
+ <data name="ModifiedText" xml:space="preserve">
+ <value>Modified text</value>
+ </data>
+ <data name="OriginalText" xml:space="preserve">
+ <value>Original text</value>
+ </data>
+ <data name="SearchKeywords" xml:space="preserve">
+ <value>Diff</value>
+ </data>
+ <data name="ShortDisplayTitle" xml:space="preserve">
+ <value>Compare</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompareGuiTool.cs b/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompareGuiTool.cs
new file mode 100644
index 000000000..4f9178279
--- /dev/null
+++ b/src/app/dev/DevToys.Tools/Tools/Text/Compare/TextCompareGuiTool.cs
@@ -0,0 +1,146 @@
+using Microsoft.Extensions.Logging;
+
+namespace DevToys.Tools.Tools.Text.Compare;
+
+[Export(typeof(IGuiTool))]
+[Name("TextCompare")]
+[ToolDisplayInformation(
+ IconFontName = "DevToys-Tools-Icons",
+ IconGlyph = '\u0115',
+ GroupName = PredefinedCommonToolGroupNames.Text,
+ ResourceManagerAssemblyIdentifier = nameof(DevToysToolsResourceManagerAssemblyIdentifier),
+ ResourceManagerBaseName = "DevToys.Tools.Tools.Text.Compare.TextCompare",
+ ShortDisplayTitleResourceName = nameof(TextCompare.ShortDisplayTitle),
+ LongDisplayTitleResourceName = nameof(TextCompare.LongDisplayTitle),
+ DescriptionResourceName = nameof(TextCompare.Description),
+ AccessibleNameResourceName = nameof(TextCompare.AccessibleName))]
+internal sealed class TextCompareGuiTool : IGuiTool
+{
+ /// <summary>
+ /// Whether the text comparison should be inline or split,
+ /// </summary>
+ private static readonly SettingDefinition<bool> inline
+ = new(
+ name: $"{nameof(TextCompareGuiTool)}.{nameof(inline)}",
+ defaultValue: false);
+
+ private enum GridRows
+ {
+ Configuration,
+ Text,
+ }
+
+ private enum GridColumns
+ {
+ Stretch
+ }
+
+ private readonly ILogger _logger;
+ private readonly ISettingsProvider _settingsProvider;
+ private readonly IUIDiffTextInput _diffTextInput = DiffTextInput("text-compare-diff-text-input");
+
+ [ImportingConstructor]
+ public TextCompareGuiTool(ISettingsProvider settingsProvider)
+ {
+ _logger = this.Log();
+ _settingsProvider = settingsProvider;
+
+ if (_settingsProvider.GetSetting(inline))
+ {
+ _diffTextInput.InlineView();
+ }
+ else
+ {
+ _diffTextInput.SplitView();
+ }
+ }
+
+ public UIToolView View
+ => new(
+ isScrollable: false,
+ Grid()
+ .ColumnMediumSpacing()
+
+ .Rows(
+ (GridRows.Configuration, Auto),
+ (GridRows.Text, new UIGridLength(1, UIGridUnitType.Fraction)))
+
+ .Columns(
+ (GridColumns.Stretch, new UIGridLength(1, UIGridUnitType.Fraction)))
+
+ .Cells(
+ Cell(
+ GridRows.Configuration,
+ GridColumns.Stretch,
+
+ Stack()
+ .Vertical()
+
+ .WithChildren(
+ Label()
+ .Text(TextCompare.Configuration),
+
+ Setting("text-compare-inline-setting")
+ .Icon("FluentSystemIcons", '\uEB59')
+ .Title(TextCompare.InlineDifference)
+ .Handle(_settingsProvider, inline, OnInlineChanged))),
+
+ Cell(
+ GridRows.Text,
+ GridColumns.Stretch,
+
+ SplitGrid()
+ .Horizontal()
+ .TopPaneLength(new UIGridLength(1, UIGridUnitType.Fraction))
+ .BottomPaneLength(new UIGridLength(2, UIGridUnitType.Fraction))
+
+ .WithTopPaneChild(
+ SplitGrid()
+ .Vertical()
+
+ .WithLeftPaneChild(
+ MultilineTextInput()
+ .Title(TextCompare.OriginalText)
+ .OnTextChanged(OnOriginalTextChanged))
+
+ .WithRightPaneChild(
+ MultilineTextInput()
+ .Title(TextCompare.ModifiedText)
+ .OnTextChanged(OnModifiedTextChanged)))
+
+ .WithBottomPaneChild(
+ _diffTextInput
+ .Title(TextCompare.Difference)
+ .ReadOnly()
+ .Extendable()))));
+
+ public void OnDataReceived(string dataTypeName, object? parsedData)
+ {
+ }
+
+ private ValueTask OnInlineChanged(bool inline)
+ {
+ if (inline)
+ {
+ _diffTextInput.InlineView();
+ }
+ else
+ {
+ _diffTextInput.SplitView();
+ }
+
+ return ValueTask.CompletedTask;
+ }
+
+ private ValueTask OnOriginalTextChanged(string originalText)
+ {
+ _diffTextInput.OriginalText(originalText);
+ return ValueTask.CompletedTask;
+ }
+
+ private ValueTask OnModifiedTextChanged(string modifiedText)
+ {
+ _diffTextInput.ModifiedText(modifiedText);
+ return ValueTask.CompletedTask;
+ }
+}
diff --git a/src/app/dev/DevToys.Tools/Tools/Text/Text.Designer.cs b/src/app/dev/DevToys.Tools/Tools/Text/Text.Designer.cs
new file mode 100644
index 000000000..b6a353b48
--- /dev/null
+++ b/src/app/dev/DevToys.Tools/Tools/Text/Text.Designer.cs
@@ -0,0 +1,81 @@
+//------------------------------------------------------------------------------
+// <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 DevToys.Tools.Tools.Text {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Text {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Text() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DevToys.Tools.Tools.Text.Text", typeof(Text).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Text.
+ /// </summary>
+ internal static string AccessibleName {
+ get {
+ return ResourceManager.GetString("AccessibleName", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Text.
+ /// </summary>
+ internal static string DisplayTitle {
+ get {
+ return ResourceManager.GetString("DisplayTitle", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/app/dev/DevToys.Tools/Tools/Text/Text.resx b/src/app/dev/DevToys.Tools/Tools/Text/Text.resx
new file mode 100644
index 000000000..8c9f51c3d
--- /dev/null
+++ b/src/app/dev/DevToys.Tools/Tools/Text/Text.resx
@@ -0,0 +1,126 @@
+<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <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" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </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" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="AccessibleName" xml:space="preserve">
+ <value>Text</value>
+ </data>
+ <data name="DisplayTitle" xml:space="preserve">
+ <value>Text</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/app/dev/DevToys.Tools/Tools/Text/TextGroup.cs b/src/app/dev/DevToys.Tools/Tools/Text/TextGroup.cs
new file mode 100644
index 000000000..a8938a66e
--- /dev/null
+++ b/src/app/dev/DevToys.Tools/Tools/Text/TextGroup.cs
@@ -0,0 +1,15 @@
+namespace DevToys.Tools.Tools.Text;
+
+[Export(typeof(GuiToolGroup))]
+[Name(PredefinedCommonToolGroupNames.Text)]
+internal sealed class TextGroup : GuiToolGroup
+{
+ [ImportingConstructor]
+ internal TextGroup()
+ {
+ IconFontName = "DevToys-Tools-Icons";
+ IconGlyph = '\u0132';
+ DisplayTitle = Text.DisplayTitle;
+ AccessibleName = Text.AccessibleName;
+ }
+}