Skip to content

A Swiss Army knife for developers.

Added Guid Generator tool (#59)

Etienne Baudoux01809e176e60
diff --git a/src/dev/impl/DevToys/App.xaml.cs b/src/dev/impl/DevToys/App.xaml.cs
index 1db529217..0e6a30705 100644
--- a/src/dev/impl/DevToys/App.xaml.cs
+++ b/src/dev/impl/DevToys/App.xaml.cs
@@ -11,7 +11,6 @@ using DevToys.Core.Threading;
using DevToys.Views;
using Microsoft.Graphics.Canvas.Text;
using System;
-using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Windows.ApplicationModel;
diff --git a/src/dev/impl/DevToys/DevToys.csproj b/src/dev/impl/DevToys/DevToys.csproj
index 972d02bf1..62c69ab29 100644
--- a/src/dev/impl/DevToys/DevToys.csproj
+++ b/src/dev/impl/DevToys/DevToys.csproj
@@ -210,6 +210,8 @@
<Compile Include="UI\Converters\NullToVisibilityConverter.cs" />
<Compile Include="Helpers\JsonHelper.cs" />
<Compile Include="Helpers\YamlHelper.cs" />
+ <Compile Include="ViewModels\Tools\GuidGenerator\GuidGeneratorToolProvider.cs" />
+ <Compile Include="ViewModels\Tools\GuidGenerator\GuidGeneratorToolViewModel.cs" />
<Compile Include="ViewModels\Tools\JsonYaml\JsonYamlToolProvider.cs" />
<Compile Include="ViewModels\Tools\JsonYaml\JsonYamlToolViewModel.cs" />
<Compile Include="ViewModels\Tools\JwtDecoderEncoder\JwtDecoderEncoderToolProvider.cs" />
@@ -276,6 +278,9 @@
<Compile Include="Views\Tools\Base64EncoderDecoder\Base64EncoderDecoderToolPage.xaml.cs">
<DependentUpon>Base64EncoderDecoderToolPage.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\Tools\GuidGenerator\GuidGeneratoToolPage.xaml.cs">
+ <DependentUpon>GuidGeneratoToolPage.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\Tools\HashGenerator\HashGeneratorToolPage.xaml.cs">
<DependentUpon>HashGeneratorToolPage.xaml</DependentUpon>
</Compile>
@@ -370,6 +375,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Views\Tools\GuidGenerator\GuidGeneratoToolPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\Tools\HashGenerator\HashGeneratorToolPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
diff --git a/src/dev/impl/DevToys/LanguageManager.cs b/src/dev/impl/DevToys/LanguageManager.cs
index a5e1bc532..c1e05aa83 100644
--- a/src/dev/impl/DevToys/LanguageManager.cs
+++ b/src/dev/impl/DevToys/LanguageManager.cs
@@ -26,6 +26,7 @@ namespace DevToys
private readonly Base64EncoderDecoderStrings _base64encoderdecoder = new Base64EncoderDecoderStrings();
private readonly CommonStrings _common = new CommonStrings();
+ private readonly GuidGeneratorStrings _guidgenerator = new GuidGeneratorStrings();
private readonly HashGeneratorStrings _hashgenerator = new HashGeneratorStrings();
private readonly JsonFormatterStrings _jsonformatter = new JsonFormatterStrings();
private readonly JsonYamlStrings _jsonyaml = new JsonYamlStrings();
@@ -57,6 +58,11 @@ namespace DevToys
/// </summary>
public CommonStrings Common => _common;
+ /// <summary>
+ /// Gets the <see cref="GuidGeneratorStrings"/>.
+ /// </summary>
+ public GuidGeneratorStrings GuidGenerator => _guidgenerator;
+
/// <summary>
/// Gets the <see cref="HashGeneratorStrings"/>.
/// </summary>
@@ -279,6 +285,51 @@ namespace DevToys
public string Undo => _resources.GetString("Undo");
}
+ public class GuidGeneratorStrings : ObservableObject
+ {
+ private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("GuidGenerator");
+
+ /// <summary>
+ /// Gets the resource Configuration.
+ /// </summary>
+ public string Configuration => _resources.GetString("Configuration");
+
+ /// <summary>
+ /// Gets the resource DisplayName.
+ /// </summary>
+ public string DisplayName => _resources.GetString("DisplayName");
+
+ /// <summary>
+ /// Gets the resource Generate.
+ /// </summary>
+ public string Generate => _resources.GetString("Generate");
+
+ /// <summary>
+ /// Gets the resource GenerateButton.
+ /// </summary>
+ public string GenerateButton => _resources.GetString("GenerateButton");
+
+ /// <summary>
+ /// Gets the resource Guids.
+ /// </summary>
+ public string Guids => _resources.GetString("Guids");
+
+ /// <summary>
+ /// Gets the resource Hyphens.
+ /// </summary>
+ public string Hyphens => _resources.GetString("Hyphens");
+
+ /// <summary>
+ /// Gets the resource MultiplySymbol.
+ /// </summary>
+ public string MultiplySymbol => _resources.GetString("MultiplySymbol");
+
+ /// <summary>
+ /// Gets the resource Uppercase.
+ /// </summary>
+ public string Uppercase => _resources.GetString("Uppercase");
+ }
+
public class HashGeneratorStrings : ObservableObject
{
private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("HashGenerator");
diff --git a/src/dev/impl/DevToys/Strings/cs-CZ/GuidGenerator.resw b/src/dev/impl/DevToys/Strings/cs-CZ/GuidGenerator.resw
new file mode 100644
index 000000000..eb0e23270
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/cs-CZ/GuidGenerator.resw
@@ -0,0 +1,144 @@
+<?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="Configuration" xml:space="preserve">
+ <value>Configuration</value>
+ </data>
+ <data name="DisplayName" xml:space="preserve">
+ <value>Guid Generator</value>
+ </data>
+ <data name="Generate" xml:space="preserve">
+ <value>Generate</value>
+ </data>
+ <data name="GenerateButton" xml:space="preserve">
+ <value>Generate GUID(s)</value>
+ </data>
+ <data name="Guids" xml:space="preserve">
+ <value>GUID(s)</value>
+ </data>
+ <data name="Hyphens" xml:space="preserve">
+ <value>Hyphens</value>
+ </data>
+ <data name="MultiplySymbol" xml:space="preserve">
+ <value>x</value>
+ </data>
+ <data name="Uppercase" xml:space="preserve">
+ <value>Uppercase</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/en-US/GuidGenerator.resw b/src/dev/impl/DevToys/Strings/en-US/GuidGenerator.resw
new file mode 100644
index 000000000..eb0e23270
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/en-US/GuidGenerator.resw
@@ -0,0 +1,144 @@
+<?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="Configuration" xml:space="preserve">
+ <value>Configuration</value>
+ </data>
+ <data name="DisplayName" xml:space="preserve">
+ <value>Guid Generator</value>
+ </data>
+ <data name="Generate" xml:space="preserve">
+ <value>Generate</value>
+ </data>
+ <data name="GenerateButton" xml:space="preserve">
+ <value>Generate GUID(s)</value>
+ </data>
+ <data name="Guids" xml:space="preserve">
+ <value>GUID(s)</value>
+ </data>
+ <data name="Hyphens" xml:space="preserve">
+ <value>Hyphens</value>
+ </data>
+ <data name="MultiplySymbol" xml:space="preserve">
+ <value>x</value>
+ </data>
+ <data name="Uppercase" xml:space="preserve">
+ <value>Uppercase</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/fr-FR/GuidGenerator.resw b/src/dev/impl/DevToys/Strings/fr-FR/GuidGenerator.resw
new file mode 100644
index 000000000..60146153b
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/fr-FR/GuidGenerator.resw
@@ -0,0 +1,144 @@
+<?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="Configuration" xml:space="preserve">
+ <value>Configuration</value>
+ </data>
+ <data name="DisplayName" xml:space="preserve">
+ <value>Générateur de Guid</value>
+ </data>
+ <data name="Generate" xml:space="preserve">
+ <value>Générer</value>
+ </data>
+ <data name="GenerateButton" xml:space="preserve">
+ <value>Générer le(s) GUID(s)</value>
+ </data>
+ <data name="Guids" xml:space="preserve">
+ <value>GUID(s)</value>
+ </data>
+ <data name="Hyphens" xml:space="preserve">
+ <value>Tirets</value>
+ </data>
+ <data name="MultiplySymbol" xml:space="preserve">
+ <value>x</value>
+ </data>
+ <data name="Uppercase" xml:space="preserve">
+ <value>Majuscule</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/ru-RU/GuidGenerator.resw b/src/dev/impl/DevToys/Strings/ru-RU/GuidGenerator.resw
new file mode 100644
index 000000000..eb0e23270
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/ru-RU/GuidGenerator.resw
@@ -0,0 +1,144 @@
+<?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="Configuration" xml:space="preserve">
+ <value>Configuration</value>
+ </data>
+ <data name="DisplayName" xml:space="preserve">
+ <value>Guid Generator</value>
+ </data>
+ <data name="Generate" xml:space="preserve">
+ <value>Generate</value>
+ </data>
+ <data name="GenerateButton" xml:space="preserve">
+ <value>Generate GUID(s)</value>
+ </data>
+ <data name="Guids" xml:space="preserve">
+ <value>GUID(s)</value>
+ </data>
+ <data name="Hyphens" xml:space="preserve">
+ <value>Hyphens</value>
+ </data>
+ <data name="MultiplySymbol" xml:space="preserve">
+ <value>x</value>
+ </data>
+ <data name="Uppercase" xml:space="preserve">
+ <value>Uppercase</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Themes/Custom.xaml b/src/dev/impl/DevToys/Themes/Custom.xaml
index 708702f10..00a731af1 100644
--- a/src/dev/impl/DevToys/Themes/Custom.xaml
+++ b/src/dev/impl/DevToys/Themes/Custom.xaml
@@ -15,6 +15,7 @@
<x:String x:Key="JsonYamlToolProvider">M 5 5 L 5 7 L 25 7 L 25 18.585938 L 23.707031 17.292969 L 22.292969 18.707031 L 26 22.414062 L 29.707031 18.707031 L 28.292969 17.292969 L 27 18.585938 L 27 5 L 5 5 z M 6 9.5859375 L 2.2929688 13.292969 L 3.7070312 14.707031 L 5 13.414062 L 5 27 L 27 27 L 27 25 L 7 25 L 7 13.414062 L 8.2929688 14.707031 L 9.7070312 13.292969 L 6 9.5859375 z M 11 11 L 11 13 L 21 13 L 21 11 L 11 11 z M 11 15 L 11 17 L 21 17 L 21 15 L 11 15 z M 11 19 L 11 21 L 18 21 L 18 19 L 11 19 z</x:String>
<x:String x:Key="JwtDecoderEncoderToolProvider">M 16.996 26.797 L 19.597 24.073 L 22.197 26.797 L 22.197 38.025 L 16.996 38.025 Z M 12.827 24.083 L 16.532 23.408 L 17.035 27.14 L 10.435 36.224 L 6.228 33.166 Z M 11.052 19.434 L 14.445 21.066 L 12.659 24.381 L 1.98 27.85 L 0.373 22.904 Z M 12.346 14.632 L 14.132 17.947 L 10.739 19.579 L 0.06 16.109 L 1.667 11.162 Z M 16.216 11.507 L 15.713 15.239 L 12.008 14.564 L 5.408 5.48 L 9.616 2.423 Z M 21.184 11.253 L 18.583 13.977 L 15.983 11.253 L 15.983 0.025 L 21.184 0.025 Z M 25.352 13.968 L 21.648 14.643 L 21.145 10.911 L 27.744 1.827 L 31.952 4.884 Z M 27.129 18.615 L 23.735 16.983 L 25.521 13.668 L 36.2 10.199 L 37.807 15.145 Z M 25.834 23.418 L 24.048 20.103 L 27.441 18.472 L 38.12 21.941 L 36.513 26.888 Z M 21.964 26.543 L 22.468 22.811 L 26.172 23.486 L 32.772 32.57 L 28.564 35.627 Z</x:String>
<x:String x:Key="MarkdownPreviewToolProvider">M 7.5 10 C 4.4802259 10 2 12.480226 2 15.5 L 2 32.5 C 2 35.519774 4.4802259 38 7.5 38 L 40.5 38 C 43.519774 38 46 35.519774 46 32.5 L 46 15.5 C 46 12.480226 43.519774 10 40.5 10 L 7.5 10 z M 7.5 13 L 40.5 13 C 41.898226 13 43 14.101774 43 15.5 L 43 32.5 C 43 33.898226 41.898226 35 40.5 35 L 7.5 35 C 6.1017741 35 5 33.898226 5 32.5 L 5 15.5 C 5 14.101774 6.1017741 13 7.5 13 z M 11.667969 17 C 10.193969 17 9 18.193969 9 19.667969 L 9 29 C 9 30.105 9.895 31 11 31 C 12.105 31 13 30.105 13 29 L 13 21.714844 L 15.564453 25.1875 C 16.361453 26.2675 17.975344 26.271312 18.777344 25.195312 L 21 22.214844 L 21 29 C 21 30.105 21.895 31 23 31 C 24.105 31 25 30.105 25 29 L 25 19.667969 C 25 18.193969 23.806031 17 22.332031 17 C 21.438031 17 20.603375 17.447359 20.109375 18.193359 L 17.167969 22.847656 L 13.898438 18.105469 C 13.396437 17.411469 12.592328 17 11.736328 17 L 11.667969 17 z M 34 17 C 32.895 17 32 17.895 32 19 L 32 24 L 30.535156 24 C 29.232156 24 28.531906 25.528578 29.378906 26.517578 L 32.712891 30.408203 C 33.388891 31.197203 34.610109 31.197203 35.287109 30.408203 L 38.621094 26.517578 C 39.469094 25.528578 38.767844 24 37.464844 24 L 36 24 L 36 19 C 36 17.895 35.105 17 34 17 z</x:String>
+ <x:String x:Key="GuidGeneratorToolProvider">M 12.109375 0 C 10.312506 -7.4014868e-17 8.6653596 0.30599153 7.1679688 0.91796875 C 5.6835984 1.5169252 4.4075487 2.395837 3.3398438 3.5546875 C 2.2851596 4.7005171 1.4648419 6.106776 0.87890625 7.7734375 C 0.29297063 9.4270781 0 11.30209 0 13.398438 C 0 15.507806 0.26041833 17.363286 0.78125 18.964844 C 1.3151025 20.566401 2.0703156 21.907556 3.046875 22.988281 C 4.0364551 24.055986 5.2278689 24.863285 6.6210938 25.410156 C 8.0273393 25.95703 9.6028701 26.230469 11.347656 26.230469 C 11.920571 26.230469 12.513023 26.197916 13.125 26.132812 C 13.736977 26.067709 14.34896 25.970051 14.960938 25.839844 C 15.585936 25.709636 16.191408 25.546874 16.777344 25.351562 C 17.3763 25.156251 17.94271 24.934895 18.476562 24.6875 L 18.476562 11.640625 L 9.8242188 11.640625 L 9.8242188 14.511719 L 15.039062 14.511719 L 15.039062 22.636719 C 14.83073 22.714844 14.589843 22.786459 14.316406 22.851562 C 14.05599 22.916669 13.782551 22.975262 13.496094 23.027344 C 13.209636 23.066406 12.923176 23.098959 12.636719 23.125 C 12.350262 23.151041 12.083333 23.164062 11.835938 23.164062 C 10.39063 23.164063 9.1471322 22.936197 8.1054688 22.480469 C 7.0768262 22.024741 6.2304665 21.367185 5.5664062 20.507812 C 4.9023458 19.64844 4.4140616 18.600256 4.1015625 17.363281 C 3.7890636 16.126306 3.6328125 14.726558 3.6328125 13.164062 C 3.6328125 11.666672 3.8216157 10.299475 4.1992188 9.0625 C 4.5898425 7.8255249 5.1432314 6.7708306 5.859375 5.8984375 C 6.5885393 5.0130237 7.4804723 4.3294256 8.5351562 3.8476562 C 9.5898405 3.3658869 10.794275 3.125 12.148438 3.125 C 13.333329 3.125 14.427086 3.2682301 15.429688 3.5546875 C 16.432288 3.828124 17.408857 4.2187515 18.359375 4.7265625 L 18.359375 1.2695312 C 17.408857 0.82682433 16.412757 0.50781187 15.371094 0.3125 C 14.342451 0.10416733 13.255205 0 12.109375 0 z M 22.832031 0.3515625 L 22.832031 17.519531 C 22.832031 18.834631 22.988282 20.026045 23.300781 21.09375 C 23.626301 22.161455 24.134117 23.079429 24.824219 23.847656 C 25.527342 24.602862 26.432295 25.188803 27.539062 25.605469 C 28.64583 26.022134 29.993495 26.230469 31.582031 26.230469 C 33.027339 26.230469 34.303389 26.015624 35.410156 25.585938 C 36.529944 25.143231 37.47396 24.524737 38.242188 23.730469 C 39.010414 22.92318 39.589847 21.953122 39.980469 20.820312 C 40.384115 19.674483 40.585938 18.398433 40.585938 16.992188 L 40.585938 0.3515625 L 37.109375 0.3515625 L 37.109375 17.207031 C 37.109375 19.147129 36.666663 20.651045 35.78125 21.71875 C 34.908857 22.786455 33.548171 23.320312 31.699219 23.320312 C 30.709638 23.320313 29.869789 23.190103 29.179688 22.929688 C 28.502606 22.669272 27.949217 22.285155 27.519531 21.777344 C 27.089844 21.269533 26.777342 20.638018 26.582031 19.882812 C 26.39974 19.127606 26.308594 18.248695 26.308594 17.246094 L 26.308594 0.3515625 L 22.832031 0.3515625 z M 2.0703125 30.978516 L 2.0703125 33.908203 L 7.9492188 33.908203 L 7.9492188 53.537109 L 2.0703125 53.537109 L 2.0703125 56.505859 L 17.34375 56.505859 L 17.34375 53.537109 L 11.464844 53.537109 L 11.464844 33.908203 L 17.34375 33.908203 L 17.34375 30.978516 L 2.0703125 30.978516 z M 22.832031 30.978516 L 22.832031 56.505859 L 28.300781 56.505859 C 29.92838 56.505859 31.380212 56.35612 32.65625 56.056641 C 33.932288 55.744142 35.052086 55.307941 36.015625 54.748047 C 36.979164 54.188153 37.792982 53.517574 38.457031 52.736328 C 39.121089 51.942058 39.661457 51.063147 40.078125 50.099609 C 40.49478 49.136072 40.794263 48.094398 40.976562 46.974609 C 41.171888 45.854821 41.269531 44.682939 41.269531 43.458984 C 41.269531 39.240248 40.286453 36.108717 38.320312 34.064453 C 36.367194 32.007168 33.398425 30.978516 29.414062 30.978516 L 22.832031 30.978516 z M 26.308594 33.908203 L 29.296875 33.908203 C 30.703121 33.908203 31.927087 34.083986 32.96875 34.435547 C 34.010413 34.774087 34.876304 35.327476 35.566406 36.095703 C 36.256508 36.86393 36.770834 37.873048 37.109375 39.123047 C 37.447917 40.373042 37.617188 41.903001 37.617188 43.712891 C 37.617188 50.236307 34.713524 53.498047 28.90625 53.498047 L 26.308594 53.498047 L 26.308594 33.908203 z</x:String>
<!-- From https://github.com/morning4coffe-dev/storylines -->
<Style x:Key="RightAlignedToggleSwitchStyle" TargetType="ToggleSwitch">
diff --git a/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml b/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml
index 1a978ef69..d1e48ad9e 100644
--- a/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml
+++ b/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml
@@ -68,15 +68,6 @@
Click="OpenFileButton_Click">
<FontIcon Glyph="&#xF378;"/>
</Button>
- <Button
- x:Name="ClearButton"
- x:DeferLoadStrategy="Lazy"
- Visibility="Collapsed"
- TabIndex="0"
- ToolTipService.ToolTip="{Binding Instance.Common.Clear, Mode=OneTime, Source={StaticResource LanguageManager}}"
- Click="ClearButton_Click">
- <FontIcon Glyph="&#xF369;"/>
- </Button>
<Button
x:Name="CopyButton"
x:DeferLoadStrategy="Lazy"
@@ -88,6 +79,15 @@
<TextBlock VerticalAlignment="Center" Text="{Binding Instance.Common.Copy, Mode=OneTime, Source={StaticResource LanguageManager}}"/>
</StackPanel>
</Button>
+ <Button
+ x:Name="ClearButton"
+ x:DeferLoadStrategy="Lazy"
+ Visibility="Collapsed"
+ TabIndex="0"
+ ToolTipService.ToolTip="{Binding Instance.Common.Clear, Mode=OneTime, Source={StaticResource LanguageManager}}"
+ Click="ClearButton_Click">
+ <FontIcon Glyph="&#xF369;"/>
+ </Button>
</StackPanel>
<Border
x:Name="InputSizeFit"
diff --git a/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml.cs b/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml.cs
index 957bdb401..af24b2f36 100644
--- a/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml.cs
+++ b/src/dev/impl/DevToys/UI/Controls/CustomTextBox.xaml.cs
@@ -12,6 +12,7 @@ using Windows.UI;
using Windows.UI.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Media;
using Clipboard = Windows.ApplicationModel.DataTransfer.Clipboard;
namespace DevToys.UI.Controls
@@ -73,6 +74,19 @@ namespace DevToys.UI.Controls
set => SetValue(AcceptsReturnProperty, value);
}
+ public static readonly DependencyProperty CanClearWhenReadOnlyProperty
+ = DependencyProperty.Register(
+ nameof(CanClearWhenReadOnly),
+ typeof(bool),
+ typeof(CustomTextBox),
+ new PropertyMetadata(false, OnCanClearWhenReadOnlyPropertyChangedCalled));
+
+ public bool CanClearWhenReadOnly
+ {
+ get => (bool)GetValue(CanClearWhenReadOnlyProperty);
+ set => SetValue(CanClearWhenReadOnlyProperty, value);
+ }
+
public static readonly DependencyProperty TextProperty
= DependencyProperty.Register(
nameof(Text),
@@ -277,6 +291,30 @@ namespace DevToys.UI.Controls
richEditBox.TextDocument.ApplyDisplayUpdates();
}
+ public void ScrollToBottom()
+ {
+ if (IsRichTextEdit)
+ {
+ RichEditBox.Document.GetRange(0, Text.Length).ScrollIntoView(PointOptions.None);
+ }
+ else
+ {
+ var grid = (Grid)VisualTreeHelper.GetChild(TextBox, 0);
+ for (var i = 0; i <= VisualTreeHelper.GetChildrenCount(grid) - 1; i++)
+ {
+ object obj = VisualTreeHelper.GetChild(grid, i);
+ if (!(obj is ScrollViewer))
+ {
+ continue;
+ }
+
+ ((ScrollViewer)obj).ChangeView(0.0f, ((ScrollViewer)obj).ExtentHeight, 1.0f);
+
+ break;
+ }
+ }
+ }
+
private void UpdateUI()
{
if (Header is not null)
@@ -307,6 +345,13 @@ namespace DevToys.UI.Controls
if (IsReadOnly)
{
+ if (PasteButton is not null)
+ {
+ GetPasteButton().Visibility = Visibility.Collapsed;
+ GetOpenFileButton().Visibility = Visibility.Collapsed;
+ GetClearButton().Visibility = Visibility.Collapsed;
+ }
+
if (!AcceptsReturn)
{
GetInlinedCopyButton().Visibility = Visibility.Visible;
@@ -322,13 +367,14 @@ namespace DevToys.UI.Controls
GetInlinedCopyButton().Visibility = Visibility.Collapsed;
}
GetCopyButton().Visibility = Visibility.Visible;
- }
-
- if (PasteButton is not null)
- {
- GetPasteButton().Visibility = Visibility.Collapsed;
- GetOpenFileButton().Visibility = Visibility.Collapsed;
- GetClearButton().Visibility = Visibility.Collapsed;
+ if (CanClearWhenReadOnly)
+ {
+ GetClearButton().Visibility = Visibility.Visible;
+ }
+ else if (ClearButton is not null)
+ {
+ GetClearButton().Visibility = Visibility.Collapsed;
+ }
}
}
else
@@ -590,6 +636,11 @@ namespace DevToys.UI.Controls
((CustomTextBox)sender).UpdateUI();
}
+ private static void OnCanClearWhenReadOnlyPropertyChangedCalled(DependencyObject sender, DependencyPropertyChangedEventArgs eventArgs)
+ {
+ ((CustomTextBox)sender).UpdateUI();
+ }
+
private static void OnIsRichTextEditPropertyChangedCalled(DependencyObject sender, DependencyPropertyChangedEventArgs eventArgs)
{
((CustomTextBox)sender).UpdateUI();
diff --git a/src/dev/impl/DevToys/UI/Controls/ExpandableSettingControl.xaml.cs b/src/dev/impl/DevToys/UI/Controls/ExpandableSettingControl.xaml.cs
index 5f941dc69..7b5b3e6c7 100644
--- a/src/dev/impl/DevToys/UI/Controls/ExpandableSettingControl.xaml.cs
+++ b/src/dev/impl/DevToys/UI/Controls/ExpandableSettingControl.xaml.cs
@@ -1,21 +1,14 @@
#nullable enable
-using DevToys.Api.Core.Theme;
-using DevToys.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Markup;
-using Windows.UI.Xaml.Media;
namespace DevToys.UI.Controls
{
[ContentProperty(Name = nameof(SettingActionableElement))]
public sealed partial class ExpandableSettingControl : UserControl
{
- private bool _isAppThemeChanging;
- private bool _isDefaultHeaderBackgroundValue = true;
- private bool _isDefaultContentBackgroundValue = true;
-
public FrameworkElement? SettingActionableElement { get; set; }
public static readonly DependencyProperty TitleProperty
diff --git a/src/dev/impl/DevToys/UI/Controls/ICustomTextBox.cs b/src/dev/impl/DevToys/UI/Controls/ICustomTextBox.cs
index 47395e71f..6cf33ffd1 100644
--- a/src/dev/impl/DevToys/UI/Controls/ICustomTextBox.cs
+++ b/src/dev/impl/DevToys/UI/Controls/ICustomTextBox.cs
@@ -7,5 +7,7 @@ namespace DevToys.UI.Controls
public interface ICustomTextBox
{
void SetHighlights(IEnumerable<HighlightSpan> spans);
+
+ void ScrollToBottom();
}
}
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/GuidGenerator/GuidGeneratorToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/GuidGenerator/GuidGeneratorToolProvider.cs
new file mode 100644
index 000000000..bb100080e
--- /dev/null
+++ b/src/dev/impl/DevToys/ViewModels/Tools/GuidGenerator/GuidGeneratorToolProvider.cs
@@ -0,0 +1,38 @@
+#nullable enable
+
+using DevToys.Api.Core.Injection;
+using DevToys.Api.Tools;
+using System.Composition;
+
+namespace DevToys.ViewModels.Tools.GuidGenerator
+{
+ [Export(typeof(IToolProvider))]
+ [Name("Guid Generator")]
+ [ProtocolName("guid")]
+ [Order(3)]
+ [CompactOverlaySize(width: 400, height: 500)]
+ internal sealed class GuidGeneratorToolProvider : ToolProviderBase, IToolProvider
+ {
+ private readonly IMefProvider _mefProvider;
+
+ public string? DisplayName => LanguageManager.Instance.GuidGenerator.DisplayName;
+
+ public object IconSource => CreatePathIconFromPath(nameof(GuidGeneratorToolProvider));
+
+ [ImportingConstructor]
+ public GuidGeneratorToolProvider(IMefProvider mefProvider)
+ {
+ _mefProvider = mefProvider;
+ }
+
+ public bool CanBeTreatedByTool(string data)
+ {
+ return false;
+ }
+
+ public IToolViewModel CreateTool()
+ {
+ return _mefProvider.Import<GuidGeneratorToolViewModel>();
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/GuidGenerator/GuidGeneratorToolViewModel.cs b/src/dev/impl/DevToys/ViewModels/Tools/GuidGenerator/GuidGeneratorToolViewModel.cs
new file mode 100644
index 000000000..47699b30e
--- /dev/null
+++ b/src/dev/impl/DevToys/ViewModels/Tools/GuidGenerator/GuidGeneratorToolViewModel.cs
@@ -0,0 +1,141 @@
+#nullable enable
+
+using DevToys.Api.Core.Settings;
+using DevToys.Api.Tools;
+using DevToys.UI.Controls;
+using DevToys.Views.Tools.GuidGenerator;
+using Microsoft.Toolkit.Mvvm.ComponentModel;
+using Microsoft.Toolkit.Mvvm.Input;
+using System;
+using System.Composition;
+using System.Text;
+
+namespace DevToys.ViewModels.Tools.GuidGenerator
+{
+ [Export(typeof(GuidGeneratorToolViewModel))]
+ public sealed class GuidGeneratorToolViewModel : ObservableRecipient, IToolViewModel
+ {
+ /// <summary>
+ /// Whether the generated GUID should be uppercase or lowercase.
+ /// </summary>
+ private static readonly SettingDefinition<bool> Uppercase
+ = new(
+ name: $"{nameof(GuidGeneratorToolViewModel)}.{nameof(Uppercase)}",
+ isRoaming: true,
+ defaultValue: false);
+
+ /// <summary>
+ /// Whether the generated GUID should have hyphens or not.
+ /// </summary>
+ private static readonly SettingDefinition<bool> Hyphens
+ = new(
+ name: $"{nameof(GuidGeneratorToolViewModel)}.{nameof(Hyphens)}",
+ isRoaming: true,
+ defaultValue: true);
+
+ /// <summary>
+ /// How many GUIDs should be generated at once.
+ /// </summary>
+ private static readonly SettingDefinition<int> GuidsToGenerate
+ = new(
+ name: $"{nameof(GuidGeneratorToolViewModel)}.{nameof(GuidsToGenerate)}",
+ isRoaming: true,
+ defaultValue: 1);
+
+ private readonly ISettingsProvider _settingsProvider;
+ private string _output = string.Empty;
+
+ public Type View { get; } = typeof(GuidGeneratoToolPage);
+
+ internal GuidGeneratorStrings Strings => LanguageManager.Instance.GuidGenerator;
+
+ internal bool IsUppercase
+ {
+ get => _settingsProvider.GetSetting(Uppercase);
+ set
+ {
+ if (_settingsProvider.GetSetting(Uppercase) != value)
+ {
+ _settingsProvider.SetSetting(Uppercase, value);
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ internal bool IncludeHyphens
+ {
+ get => _settingsProvider.GetSetting(Hyphens);
+ set
+ {
+ if (_settingsProvider.GetSetting(Hyphens) != value)
+ {
+ _settingsProvider.SetSetting(Hyphens, value);
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ internal int NumberOfGuidsToGenerate
+ {
+ get => _settingsProvider.GetSetting(GuidsToGenerate);
+ set
+ {
+ if (_settingsProvider.GetSetting(GuidsToGenerate) != value)
+ {
+ _settingsProvider.SetSetting(GuidsToGenerate, value);
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ internal string Output
+ {
+ get => _output;
+ set => SetProperty(ref _output, value);
+ }
+
+ internal ICustomTextBox? OutputTextBox { private get; set; }
+
+ [ImportingConstructor]
+ public GuidGeneratorToolViewModel(ISettingsProvider settingsProvider)
+ {
+ _settingsProvider = settingsProvider;
+
+ GenerateCommand = new RelayCommand(ExecuteGenerateCommand);
+ }
+
+ #region GenerateCommand
+
+ internal IRelayCommand GenerateCommand { get; }
+
+ private void ExecuteGenerateCommand()
+ {
+ string guidStringFormat;
+ if (IncludeHyphens)
+ {
+ guidStringFormat = "D";
+ }
+ else
+ {
+ guidStringFormat = "N";
+ }
+
+ var newGuids = new StringBuilder();
+ for (int i = 0; i < NumberOfGuidsToGenerate; i++)
+ {
+ string guid = Guid.NewGuid().ToString(guidStringFormat);
+ if (IsUppercase)
+ {
+ guid = guid.ToUpperInvariant();
+ }
+
+ newGuids.AppendLine(guid);
+ }
+
+ Output += newGuids.ToString();
+ OutputTextBox?.ScrollToBottom();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/HashGenerator/HashGeneratorToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/HashGenerator/HashGeneratorToolProvider.cs
index 6ef0f2055..7e3fa2090 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/HashGenerator/HashGeneratorToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/HashGenerator/HashGeneratorToolProvider.cs
@@ -12,7 +12,7 @@ namespace DevToys.ViewModels.Tools.HashGenerator
[Export(typeof(IToolProvider))]
[Name("Hash Generator")]
[ProtocolName("hash")]
- [Order(0)]
+ [Order(3)]
[CompactOverlaySize(width: 400, height: 500)]
internal sealed class HashGeneratorToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/JsonFormatter/JsonFormatterToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/JsonFormatter/JsonFormatterToolProvider.cs
index f258d191b..dd564c318 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/JsonFormatter/JsonFormatterToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/JsonFormatter/JsonFormatterToolProvider.cs
@@ -10,7 +10,7 @@ namespace DevToys.ViewModels.Tools.JsonFormatter
[Export(typeof(IToolProvider))]
[Name("Json Formatter")]
[ProtocolName("jsonformat")]
- [Order(0)]
+ [Order(1)]
[NotScrollable]
internal sealed class JsonFormatterToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/JsonYaml/JsonYamlToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/JsonYaml/JsonYamlToolProvider.cs
index f909a9d7e..62ebdfdd2 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/JsonYaml/JsonYamlToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/JsonYaml/JsonYamlToolProvider.cs
@@ -10,7 +10,7 @@ namespace DevToys.ViewModels.Tools.JsonYaml
[Export(typeof(IToolProvider))]
[Name("Json <> Yaml")]
[ProtocolName("jsonyaml")]
- [Order(0)]
+ [Order(1)]
[NotScrollable]
internal sealed class JsonYamlToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/JwtDecoderEncoder/JwtDecoderEncoderToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/JwtDecoderEncoder/JwtDecoderEncoderToolProvider.cs
index ee477c950..a06f28ae9 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/JwtDecoderEncoder/JwtDecoderEncoderToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/JwtDecoderEncoder/JwtDecoderEncoderToolProvider.cs
@@ -10,7 +10,7 @@ namespace DevToys.ViewModels.Tools.JwtDecoderEncoder
[Export(typeof(IToolProvider))]
[Name("Jwt Decoder / Encoder")]
[ProtocolName("jwt")]
- [Order(0)]
+ [Order(1)]
[NotScrollable]
internal sealed class JwtDecoderEncoderToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/MarkdownPreview/MarkdownPreviewToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/MarkdownPreview/MarkdownPreviewToolProvider.cs
index 8ce993652..3f28ad64b 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/MarkdownPreview/MarkdownPreviewToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/MarkdownPreview/MarkdownPreviewToolProvider.cs
@@ -10,7 +10,7 @@ namespace DevToys.ViewModels.Tools.MarkdownPreview
[Export(typeof(IToolProvider))]
[Name("Markdown Preview")]
[ProtocolName("markdown")]
- [Order(0)]
+ [Order(4)]
[NotScrollable]
internal sealed class MarkdownPreviewToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/RegEx/RegExToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/RegEx/RegExToolProvider.cs
index c390f5f48..3e3a428d9 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/RegEx/RegExToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/RegEx/RegExToolProvider.cs
@@ -9,7 +9,7 @@ namespace DevToys.ViewModels.Tools.RegEx
[Export(typeof(IToolProvider))]
[Name("Regular Expression Tester")]
[ProtocolName("regex")]
- [Order(0)]
+ [Order(2)]
[NotScrollable]
internal sealed class RegExToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/Settings/SettingsToolViewModel.cs b/src/dev/impl/DevToys/ViewModels/Tools/Settings/SettingsToolViewModel.cs
index 77eb50646..1840e9494 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/Settings/SettingsToolViewModel.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/Settings/SettingsToolViewModel.cs
@@ -15,7 +15,6 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Composition;
-using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Windows.ApplicationModel;
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/StringUtilities/StringUtilitiesToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/StringUtilities/StringUtilitiesToolProvider.cs
index 4b374f7b0..26648fdf4 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/StringUtilities/StringUtilitiesToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/StringUtilities/StringUtilitiesToolProvider.cs
@@ -5,16 +5,14 @@ using DevToys.Api.Tools;
using DevToys.Core.Threading;
using System.Composition;
using System.Threading.Tasks;
-using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Media;
namespace DevToys.ViewModels.Tools.StringUtilities
{
[Export(typeof(IToolProvider))]
[Name("String Utilities")]
[ProtocolName("string")]
- [Order(0)]
+ [Order(2)]
[NotScrollable]
internal sealed class StringUtilitiesToolProvider : ToolProviderBase, IToolProvider
{
@@ -22,24 +20,21 @@ namespace DevToys.ViewModels.Tools.StringUtilities
public string? DisplayName => LanguageManager.Instance.StringUtilities.DisplayName;
- public object IconSource { get; }
+ public object IconSource
+ => new TaskCompletionNotifier<IconElement>(
+ ThreadHelper.RunOnUIThreadAsync(() =>
+ {
+ return Task.FromResult<IconElement>(
+ new FontIcon
+ {
+ Glyph = "\uF793"
+ });
+ }));
[ImportingConstructor]
public StringUtilitiesToolProvider(IMefProvider mefProvider)
{
_mefProvider = mefProvider;
-
- IconSource
- = new TaskCompletionNotifier<IconElement>(
- ThreadHelper.RunOnUIThreadAsync(() =>
- {
- return Task.FromResult<IconElement>(
- new FontIcon
- {
- FontFamily = (FontFamily)Application.Current.Resources["FluentSystemIcons"],
- Glyph = "\uF793"
- });
- }));
}
public bool CanBeTreatedByTool(string data)
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/TextDiff/TextDiffToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/TextDiff/TextDiffToolProvider.cs
index 30d02a702..b4fc70535 100644
--- a/src/dev/impl/DevToys/ViewModels/Tools/TextDiff/TextDiffToolProvider.cs
+++ b/src/dev/impl/DevToys/ViewModels/Tools/TextDiff/TextDiffToolProvider.cs
@@ -9,7 +9,7 @@ namespace DevToys.ViewModels.Tools.TextDiff
[Export(typeof(IToolProvider))]
[Name("Text Diff")]
[ProtocolName("diff")]
- [Order(0)]
+ [Order(2)]
[NotScrollable]
internal sealed class TextDiffToolProvider : ToolProviderBase, IToolProvider
{
diff --git a/src/dev/impl/DevToys/Views/Tools/GuidGenerator/GuidGeneratoToolPage.xaml b/src/dev/impl/DevToys/Views/Tools/GuidGenerator/GuidGeneratoToolPage.xaml
new file mode 100644
index 000000000..7935d382b
--- /dev/null
+++ b/src/dev/impl/DevToys/Views/Tools/GuidGenerator/GuidGeneratoToolPage.xaml
@@ -0,0 +1,78 @@
+<Page
+ x:Class="DevToys.Views.Tools.GuidGenerator.GuidGeneratoToolPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:controls="using:DevToys.UI.Controls"
+ xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
+ mc:Ignorable="d"
+ NavigationCacheMode="Required">
+
+ <Grid Margin="0,0,0,16" RowSpacing="12">
+ <Grid.ChildrenTransitions>
+ <TransitionCollection>
+ <EntranceThemeTransition IsStaggeringEnabled="True" FromVerticalOffset="50"/>
+ </TransitionCollection>
+ </Grid.ChildrenTransitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+
+ <StackPanel Grid.Row="0" Spacing="4" >
+ <TextBlock Style="{StaticResource SubTitleTextBlock}" Text="{x:Bind ViewModel.Strings.Configuration}" />
+
+ <controls:ExpandableSettingControl
+ Title="{x:Bind ViewModel.Strings.Hyphens}">
+ <controls:ExpandableSettingControl.Icon>
+ <FontIcon Glyph="&#xF4E0;" />
+ </controls:ExpandableSettingControl.Icon>
+ <ToggleSwitch
+ Style="{StaticResource RightAlignedToggleSwitchStyle}"
+ IsOn="{x:Bind ViewModel.IncludeHyphens, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
+ </controls:ExpandableSettingControl>
+
+ <controls:ExpandableSettingControl
+ Title="{x:Bind ViewModel.Strings.Uppercase}">
+ <controls:ExpandableSettingControl.Icon>
+ <FontIcon Glyph="&#xF7B2;" />
+ </controls:ExpandableSettingControl.Icon>
+ <ToggleSwitch
+ Style="{StaticResource RightAlignedToggleSwitchStyle}"
+ IsOn="{x:Bind ViewModel.IsUppercase, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
+ </controls:ExpandableSettingControl>
+ </StackPanel>
+
+ <StackPanel Grid.Row="1" Spacing="4" >
+ <TextBlock Style="{StaticResource SubTitleTextBlock}" Text="{x:Bind ViewModel.Strings.Generate}" />
+
+ <StackPanel Spacing="8" Orientation="Horizontal">
+ <Button
+ Style="{StaticResource AccentButtonStyle}"
+ Content="{x:Bind ViewModel.Strings.GenerateButton}"
+ Command="{x:Bind ViewModel.GenerateCommand}"/>
+ <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="{x:Bind ViewModel.Strings.MultiplySymbol}"/>
+ <muxc:NumberBox
+ MinWidth="100"
+ Value="{x:Bind ViewModel.NumberOfGuidsToGenerate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+ SpinButtonPlacementMode="Compact"
+ SmallChange="1"
+ LargeChange="10"
+ Minimum="1"/>
+ </StackPanel>
+ </StackPanel>
+
+ <controls:CustomTextBox
+ x:Name="OutputTextBox"
+ Grid.Row="2"
+ Header="{x:Bind ViewModel.Strings.Guids}"
+ MinHeight="150"
+ AcceptsReturn="True"
+ IsReadOnly="True"
+ CanClearWhenReadOnly="True"
+ Text="{x:Bind ViewModel.Output, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
+ </Grid>
+</Page>
diff --git a/src/dev/impl/DevToys/Views/Tools/GuidGenerator/GuidGeneratoToolPage.xaml.cs b/src/dev/impl/DevToys/Views/Tools/GuidGenerator/GuidGeneratoToolPage.xaml.cs
new file mode 100644
index 000000000..81fb5fedf
--- /dev/null
+++ b/src/dev/impl/DevToys/Views/Tools/GuidGenerator/GuidGeneratoToolPage.xaml.cs
@@ -0,0 +1,52 @@
+#nullable enable
+
+using DevToys.Api.Core.Navigation;
+using DevToys.Core;
+using DevToys.ViewModels.Tools.GuidGenerator;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Navigation;
+
+namespace DevToys.Views.Tools.GuidGenerator
+{
+ public sealed partial class GuidGeneratoToolPage : Page
+ {
+ public static readonly DependencyProperty ViewModelProperty
+ = DependencyProperty.Register(
+ nameof(ViewModel),
+ typeof(GuidGeneratorToolViewModel),
+ typeof(GuidGeneratoToolPage),
+ new PropertyMetadata(null));
+
+ /// <summary>
+ /// Gets the page's view model.
+ /// </summary>
+ public GuidGeneratorToolViewModel ViewModel
+ {
+ get => (GuidGeneratorToolViewModel)GetValue(ViewModelProperty);
+ set => SetValue(ViewModelProperty, value);
+ }
+
+ public GuidGeneratoToolPage()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ if (ViewModel is null)
+ {
+ var parameters = (NavigationParameter)e.Parameter;
+
+ // Set the view model
+ Assumes.NotNull(parameters.ViewModel, nameof(parameters.ViewModel));
+ ViewModel = (GuidGeneratorToolViewModel)parameters.ViewModel!;
+ DataContext = ViewModel;
+
+ ViewModel.OutputTextBox = OutputTextBox;
+ }
+
+ base.OnNavigatedTo(e);
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/Views/Tools/MarkdownPreview/MarkdownPreviewToolPage.xaml b/src/dev/impl/DevToys/Views/Tools/MarkdownPreview/MarkdownPreviewToolPage.xaml
index 7d0e24cdc..917dc8eae 100644
--- a/src/dev/impl/DevToys/Views/Tools/MarkdownPreview/MarkdownPreviewToolPage.xaml
+++ b/src/dev/impl/DevToys/Views/Tools/MarkdownPreview/MarkdownPreviewToolPage.xaml
@@ -64,6 +64,7 @@
Grid.Column="1"
Width="16"
Margin="0,42,0,0"
+ MinHeight="150"
ResizeBehavior="BasedOnAlignment"
ResizeDirection="Auto">
<toolkit:GridSplitter.Element>
@@ -77,6 +78,7 @@
Grid.Column="2"
Header="{x:Bind ViewModel.Strings.Output}"
Margin="0,16,0,0"
+ MinHeight="150"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch">
<Border
diff --git a/src/tests/DevToys.Tests/MefBaseTest.cs b/src/tests/DevToys.Tests/MefBaseTest.cs
index 9cf064022..0ce209bdd 100644
--- a/src/tests/DevToys.Tests/MefBaseTest.cs
+++ b/src/tests/DevToys.Tests/MefBaseTest.cs
@@ -1,7 +1,6 @@
using DevToys.Api.Core.Injection;
using DevToys.Core;
using System;
-using System.Globalization;
namespace DevToys.Tests
{
diff --git a/src/tests/DevToys.Tests/Providers/Tools/StringUtilitiesTests.cs b/src/tests/DevToys.Tests/Providers/Tools/StringUtilitiesTests.cs
index 4e3dc7a76..f12fa50eb 100644
--- a/src/tests/DevToys.Tests/Providers/Tools/StringUtilitiesTests.cs
+++ b/src/tests/DevToys.Tests/Providers/Tools/StringUtilitiesTests.cs
@@ -1,5 +1,4 @@
-using DevToys.Core.Threading;
-using DevToys.ViewModels.Tools.StringUtilities;
+using DevToys.ViewModels.Tools.StringUtilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Threading.Tasks;