Skip to content

A Swiss Army knife for developers.

Added Color Blindness Simulator (#138)

Etienne Baudoux8abcf397de48
diff --git a/README.md b/README.md
index 288fd5296..98b974002 100644
--- a/README.md
+++ b/README.md
@@ -7,16 +7,19 @@
<p align="center">
A Swiss Army knife for developers.
</p>
-<p align="center">
- <a style="text-decoration:none" href="https://etienne-baudoux.visualstudio.com/Side%20projects/_build/latest?definitionId=15&branchName=main">
+<p align="center">
+ <a style="text-decoration:none" href="https://etienne-baudoux.visualstudio.com/Side%20projects/_build/latest?definitionId=15&branchName=main" target="_blank">
<img src="https://etienne-baudoux.visualstudio.com/Side%20projects/_apis/build/status/DevToys?branchName=main" alt="Build Status" />
</a>
- <a style="text-decoration:none" href="https://github.com/veler/DevToys/releases">
+ <a style="text-decoration:none" href="https://github.com/veler/DevToys/releases" target="_blank">
<img src="https://img.shields.io/github/release/veler/devtoys.svg?label=Latest%20version" alt="Latest version" />
</a>
- <a style="text-decoration:none" href="https://www.microsoft.com/store/apps/9PGCV4V3BK4W">
+ <a style="text-decoration:none" href="https://www.microsoft.com/store/apps/9PGCV4V3BK4W" target="_blank">
<img src="https://img.shields.io/badge/Microsoft%20Store-Download-green" alt="Store link" />
</a>
+ <a style="text-decoration:none" href="https://devtoys.app" target="_blank">
+ <img src="https://img.shields.io/badge/Website-devtoys.app-blue" alt="Website" />
+ </a>
</p>
## Introduction
@@ -44,6 +47,7 @@ Many tools are available.
- Text Comparer
- Markdown Preview
- Graphic
+ - Color Blindness Simulator
- PNG / JPEG Compressor
... and more are coming!
@@ -89,6 +93,7 @@ Here is the list of tool name you can use:
- `jsonformat` Json Formatter
- `jsonyaml` - Json <> Yaml
- `jwt` - JWT Decoder
+- `colorblind` - Color Blindness Simulator
- `imgcomp` - PNG/JPEG compressor
- `markdown` - Markdown Preview
- `regex` - Regular Expression Tester
diff --git a/src/dev/impl/DevToys/Assets/Icons/ColorBlindnessSimulator.svg b/src/dev/impl/DevToys/Assets/Icons/ColorBlindnessSimulator.svg
new file mode 100644
index 000000000..f745814de
--- /dev/null
+++ b/src/dev/impl/DevToys/Assets/Icons/ColorBlindnessSimulator.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ viewBox="0.008 0.008 31.984 31.984"
+ version="1.1"
+ id="svg19"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <g
+ id="g1233"
+ transform="matrix(0.0605755,0,0,0.0605755,-6.6778951,-6.9803939)">
+ <path
+ id="path1231"
+ fill="#000000"
+ d="m 523.71,213.06 c -3.8438,0.11719 -7.4961,1.7227 -10.176,4.4805 l -295.99,295.99 c -2.8672,2.7539 -4.5078,6.5508 -4.5469,10.527 -0.043,3.9766 1.5195,7.8047 4.332,10.617 2.8125,2.8123 6.6406,4.375 10.617,4.332 3.9766,-0.0391 7.7695,-1.6797 10.527,-4.5469 l 295.99,-295.99 c 2.8672,-2.7891 4.4844,-6.6211 4.4844,-10.621 -0.004,-4 -1.625,-7.8281 -4.4961,-10.613 -2.8672,-2.7891 -6.7461,-4.293 -10.742,-4.1758 z M 376,287.46 c -48.719,0 -88.535,39.816 -88.535,88.535 0,4.0859 0.28906,8.168 0.85156,12.211 v 0.004 c 0.46094,3.957 2.4961,7.5625 5.6484,10.004 3.1523,2.4375 7.1523,3.5 11.102,2.9492 3.9453,-0.55078 7.5039,-2.668 9.8672,-5.8789 2.3672,-3.207 3.3359,-7.2305 2.6953,-11.164 -0.375,-2.6953 -0.56641,-5.4062 -0.56641,-8.125 0,-32.723 26.215,-58.938 58.938,-58.938 2.7188,0 5.4414,0.1875 8.1367,0.5625 v 0.004 c 3.9414,0.65234 7.9766,-0.31641 11.191,-2.6797 3.2148,-2.3672 5.3398,-5.9297 5.8906,-9.8867 0.54688,-3.9531 -0.52344,-7.9609 -2.9727,-11.113 -2.4453,-3.1523 -6.0664,-5.1836 -10.031,-5.6328 -4.0469,-0.5625 -8.1289,-0.85156 -12.215,-0.85156 z m 72.21,63.38 c -4.1758,0.22656 -8.0625,2.2031 -10.695,5.4531 -2.6367,3.2461 -3.7734,7.4531 -3.1367,11.586 0.375,2.6914 0.5625,5.4023 0.5625,8.1211 0,32.723 -26.215,58.938 -58.938,58.938 -2.7188,0 -5.4414,-0.1875 -8.1367,-0.5625 -3.9375,-0.65234 -7.9727,0.3125 -11.188,2.6797 -3.2148,2.3672 -5.3398,5.9297 -5.8906,9.8828 -0.55078,3.957 0.52344,7.9648 2.9688,11.117 2.4492,3.1523 6.0664,5.1836 10.035,5.6289 4.0469,0.5625 8.125,0.85156 12.211,0.85156 48.719,0 88.535,-39.816 88.535,-88.535 0,-4.0859 -0.28906,-8.168 -0.85156,-12.211 -0.46094,-3.7148 -2.3164,-7.1172 -5.1875,-9.5234 -2.875,-2.4023 -6.5508,-3.625 -10.289,-3.4258 z M 376,233.15 c -125.47,0 -219.17,134.16 -219.17,134.16 -1.832,2.5234 -2.8164,5.5664 -2.8164,8.6836 0,3.1211 0.98438,6.1602 2.8164,8.6875 0,0 28.559,39.52 73.883,75.516 3.0625,2.5352 7.0195,3.7344 10.977,3.3203 3.957,-0.41406 7.582,-2.4062 10.055,-5.5195 2.4727,-3.1172 3.5898,-7.0977 3.0938,-11.047 -0.49609,-3.9453 -2.5625,-7.5273 -5.7266,-9.9375 -33.641,-26.715 -53.098,-50.691 -61.094,-60.945 17.504,-21.688 96.285,-113.32 187.98,-113.32 17.293,0 34.207,3.2305 50.512,8.7578 3.7461,1.375 7.8828,1.1797 11.48,-0.54297 3.5977,-1.7188 6.3477,-4.8203 7.6328,-8.5938 1.2812,-3.7773 0.98438,-7.9102 -0.82422,-11.465 -1.8086,-3.5547 -4.9727,-6.2305 -8.7773,-7.4219 -18.879,-6.3984 -39.039,-10.332 -60.023,-10.332 z m 54.2,9.5 c -4.6328,0.26953 -8.8711,2.6953 -11.449,6.5547 -2.5779,3.8594 -3.1953,8.7031 -1.6719,13.086 1.5273,4.3828 5.0195,7.7969 9.4336,9.2188 4.7695,1.6172 9.4844,3.4375 14.133,5.418 l 0.004,0.004 c 3.6094,1.543 7.6836,1.5859 11.328,0.12109 3.6445,-1.4648 6.5547,-4.3125 8.0977,-7.9258 1.5391,-3.6094 1.5859,-7.6875 0.12109,-11.328 -1.4648,-3.6445 -4.3164,-6.5547 -7.9297,-8.0977 -5.3047,-2.2617 -10.723,-4.3398 -16.246,-6.2148 h 0.004 c -1.8672,-0.66406 -3.8477,-0.94922 -5.8242,-0.83594 z m 81.51,45.81 c -4.1211,0.0625 -8.0273,1.8398 -10.781,4.9023 -2.7578,3.0625 -4.1094,7.1367 -3.7383,11.238 0.375,4.1055 2.4414,7.8672 5.7031,10.383 33.641,26.715 53.098,50.691 61.09,60.945 -17.5,21.684 -96.281,113.32 -187.98,113.32 -17.293,0 -34.207,-3.2305 -50.512,-8.7578 -3.7422,-1.3711 -7.8828,-1.1758 -11.48,0.54687 -3.5977,1.7188 -6.3477,4.8203 -7.6289,8.5938 -1.2812,3.7773 -0.98438,7.9102 0.82422,11.465 1.8047,3.5547 4.9727,6.2305 8.7773,7.418 18.879,6.4023 39.039,10.332 60.02,10.332 125.47,0 219.17,-134.16 219.17,-134.16 l 0.004,0.004 c 1.8281,-2.5273 2.8164,-5.5664 2.8164,-8.6875 0,-3.1172 -0.98828,-6.1602 -2.8164,-8.6836 0,0 -28.559,-39.52 -73.883,-75.516 -2.6992,-2.207 -6.0938,-3.3906 -9.582,-3.3398 z" />
+ </g>
+</svg>
diff --git a/src/dev/impl/DevToys/DevToys.csproj b/src/dev/impl/DevToys/DevToys.csproj
index fdeb31d2c..009f4b6b4 100644
--- a/src/dev/impl/DevToys/DevToys.csproj
+++ b/src/dev/impl/DevToys/DevToys.csproj
@@ -28,6 +28,7 @@
<Compile Include="Api\Tools\ParentAttribute.cs" />
<Compile Include="Core\OOP\AppService.cs" />
<Compile Include="Core\Threading\AsyncLazy.cs" />
+ <Compile Include="Helpers\ColorBlindnessSimulatorHelper.cs" />
<Compile Include="Helpers\NumberBaseHelper.cs" />
<Compile Include="Messages\PinToolToStartMessage.cs" />
<Compile Include="Messages\OpenToolInNewWindowMessage.cs" />
@@ -49,6 +50,8 @@
<Compile Include="ViewModels\Tools\Generators\GeneratorsGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\LoremIpsumGenerator\LoremIpsumGeneratorToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\LoremIpsumGenerator\LoremIpsumGeneratorToolViewModel.cs" />
+ <Compile Include="ViewModels\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolProvider.cs" />
+ <Compile Include="ViewModels\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolViewModel.cs" />
<Compile Include="ViewModels\Tools\Graphic\GraphicGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\GroupToolProviderBase.cs" />
<Compile Include="ViewModels\Tools\GroupToolViewModel.cs" />
@@ -64,6 +67,12 @@
<Compile Include="Views\Tools\AllTools\AllToolsToolPage.xaml.cs">
<DependentUpon>AllToolsToolPage.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolPage.xaml.cs">
+ <DependentUpon>ColorBlindnessSimulatorToolPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\Tools\Graphic\ColorBlindnessSimulator\ImagePreview.xaml.cs">
+ <DependentUpon>ImagePreview.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\Tools\GroupToolPage.xaml.cs">
<DependentUpon>GroupToolPage.xaml</DependentUpon>
</Compile>
@@ -207,6 +216,7 @@
<Content Include="Assets\GitHubMarkdownCss\github-markdown-light.css" />
<Content Include="Assets\GitHubMarkdownCss\github-markdown.css" />
<Content Include="Assets\GitHubMarkdownCss\index.html" />
+ <Content Include="Assets\Icons\ColorBlindnessSimulator.svg" />
<Content Include="Assets\Icons\EncodersDecoders.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -496,6 +506,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Views\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\Tools\Graphic\ColorBlindnessSimulator\ImagePreview.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\Tools\GroupToolPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
diff --git a/src/dev/impl/DevToys/Helpers/ColorBlindnessSimulatorHelper.cs b/src/dev/impl/DevToys/Helpers/ColorBlindnessSimulatorHelper.cs
new file mode 100644
index 000000000..d4d1e43b9
--- /dev/null
+++ b/src/dev/impl/DevToys/Helpers/ColorBlindnessSimulatorHelper.cs
@@ -0,0 +1,167 @@
+#nullable enable
+
+using System;
+using System.Threading;
+using DevToys.Shared.Core;
+
+namespace DevToys.Helpers
+{
+ internal static class ColorBlindnessSimulatorHelper
+ {
+ // Original source: https://github.com/DaltonLens/libDaltonLens/blob/master/libDaltonLens.c
+ // http://daltonlens.org
+
+ private struct Brettel1997Parameters
+ {
+ /// <summary>
+ /// Transformation using plane 1 == rgbFromLms . projection1 . lmsFromRgb
+ /// </summary>
+ internal float[] RgbCvdFromRgb1 { get; set; }
+
+ /// <summary>
+ /// Full transformation using plane 2 == rgbFromLms . projection2 . lmsFromRgb
+ /// </summary>
+ internal float[] RgbCvdFromRgb2 { get; set; }
+
+ /// <summary>
+ /// Normal of the separation plane to pick the right transform, already in the RGB space == normalInLms . lmsFromRgb
+ /// </summary>
+ internal float[] SeparationPlaneNormalInRgb { get; set; }
+ }
+
+ /// <summary>
+ /// Represents the default severity of the color blindness.
+ /// </summary>
+ private const float Severity = 1f;
+
+ private static readonly Brettel1997Parameters ProtanopiaParameters
+ = new Brettel1997Parameters
+ {
+ RgbCvdFromRgb1 = new[] { 0.14980f, 1.19548f, -0.34528f, 0.10764f, 0.84864f, 0.04372f, 0.00384f, -0.00540f, 1.00156f },
+ RgbCvdFromRgb2 = new[] { 0.14570f, 1.16172f, -0.30742f, 0.10816f, 0.85291f, 0.03892f, 0.00386f, -0.00524f, 1.00139f },
+ SeparationPlaneNormalInRgb = new[] { 0.00048f, 0.00393f, -0.00441f }
+ };
+
+ private static readonly Brettel1997Parameters TritanopiaParameters
+ = new Brettel1997Parameters
+ {
+ RgbCvdFromRgb1 = new[] { 1.01277f, 0.13548f, -0.14826f, -0.01243f, 0.86812f, 0.14431f, 0.07589f, 0.80500f, 0.11911f },
+ RgbCvdFromRgb2 = new[] { 0.93678f, 0.18979f, -0.12657f, 0.06154f, 0.81526f, 0.12320f, -0.37562f, 1.12767f, 0.24796f },
+ SeparationPlaneNormalInRgb = new[] { 0.03901f, -0.02788f, -0.01113f }
+ };
+
+ private static readonly Brettel1997Parameters DeuteranopiaParameters
+ = new Brettel1997Parameters
+ {
+ RgbCvdFromRgb1 = new[] { 0.36477f, 0.86381f, -0.22858f, 0.26294f, 0.64245f, 0.09462f, -0.02006f, 0.02728f, 0.99278f },
+ RgbCvdFromRgb2 = new[] { 0.37298f, 0.88166f, -0.25464f, 0.25954f, 0.63506f, 0.10540f, -0.01980f, 0.02784f, 0.99196f },
+ SeparationPlaneNormalInRgb = new[] { -0.00281f, -0.00611f, 0.00892f }
+ };
+
+ internal static byte[] SimulateProtanopia(byte[] bgra8SourcePixels, Action<int> progressReport, CancellationToken cancellationToken)
+ {
+ return SimulateColorBlindness(bgra8SourcePixels, ProtanopiaParameters, progressReport, cancellationToken);
+ }
+
+ internal static byte[] SimulateTritanopia(byte[] bgra8SourcePixels, Action<int> progressReport, CancellationToken cancellationToken)
+ {
+ return SimulateColorBlindness(bgra8SourcePixels, TritanopiaParameters, progressReport, cancellationToken);
+ }
+
+ internal static byte[] SimulateDeuteranopia(byte[] bgra8SourcePixels, Action<int> progressReport, CancellationToken cancellationToken)
+ {
+ return SimulateColorBlindness(bgra8SourcePixels, DeuteranopiaParameters, progressReport, cancellationToken);
+ }
+
+ private static byte[] SimulateColorBlindness(byte[] bgra8SourcePixels, Brettel1997Parameters brettel1997Parameters, Action<int> progressReport, CancellationToken cancellationToken)
+ {
+ Arguments.NotNull(bgra8SourcePixels, nameof(bgra8SourcePixels));
+
+ byte[] result = new byte[bgra8SourcePixels.Length];
+
+ for (int i = 0; i <= bgra8SourcePixels.Length - 4; i += 4)
+ {
+ if (cancellationToken.IsCancellationRequested)
+ {
+ return Array.Empty<byte>();
+ }
+
+ float[] rgbPixel
+ = new float[3]
+ {
+ SRgbToLinearRgb(bgra8SourcePixels[i + 2]), // R
+ SRgbToLinearRgb(bgra8SourcePixels[i + 1]), // G
+ SRgbToLinearRgb(bgra8SourcePixels[i]), // B
+ };
+
+ float[]? separationPlaneNormalInRgb = brettel1997Parameters.SeparationPlaneNormalInRgb;
+ float dotWithSepPlane = rgbPixel[0] * separationPlaneNormalInRgb[0] + rgbPixel[1] * separationPlaneNormalInRgb[1] + rgbPixel[2] * separationPlaneNormalInRgb[2];
+ float[] rgbCvdFromRgb;
+ if (dotWithSepPlane >= 0)
+ {
+ rgbCvdFromRgb = brettel1997Parameters.RgbCvdFromRgb1;
+ }
+ else
+ {
+ rgbCvdFromRgb = brettel1997Parameters.RgbCvdFromRgb2;
+ }
+
+ float[] rgbCvd
+ = new float[3]
+ {
+ rgbCvdFromRgb[0] * rgbPixel[0] + rgbCvdFromRgb[1] * rgbPixel[1] + rgbCvdFromRgb[2] * rgbPixel[2], // R
+ rgbCvdFromRgb[3] * rgbPixel[0] + rgbCvdFromRgb[4] * rgbPixel[1] + rgbCvdFromRgb[5] * rgbPixel[2], // G
+ rgbCvdFromRgb[6] * rgbPixel[0] + rgbCvdFromRgb[7] * rgbPixel[1] + rgbCvdFromRgb[8] * rgbPixel[2], // B
+ };
+
+ // Apply the severity factor as a linear interpolation.
+ // It's the same to do it in the RGB space or in the LMS
+ // space since it's a linear transform.
+ rgbCvd[0] = rgbCvd[0] * Severity + rgbPixel[0] * (1f - Severity);
+ rgbCvd[1] = rgbCvd[1] * Severity + rgbPixel[1] * (1f - Severity);
+ rgbCvd[2] = rgbCvd[2] * Severity + rgbPixel[2] * (1f - Severity);
+
+ // Encode as sRGB and write the result.
+ result[i + 2] = LinearRgbToSRgb(rgbCvd[0]); // R
+ result[i + 1] = LinearRgbToSRgb(rgbCvd[1]); // G
+ result[i] = LinearRgbToSRgb(rgbCvd[2]); // B
+ result[i + 3] = bgra8SourcePixels[i + 3]; // A
+
+ progressReport((int)(100 * (long)i / bgra8SourcePixels.Length));
+ }
+
+ return result;
+ }
+
+ private static float SRgbToLinearRgb(byte input)
+ {
+ float floatInput = input / 255f;
+ if (floatInput < 0.04045f)
+ {
+ return floatInput / 12.92f;
+ }
+
+ return MathF.Pow((floatInput + 0.055f) / 1.055f, 2.4f);
+ }
+
+ private static byte LinearRgbToSRgb(float input)
+ {
+ if (input <= 0f)
+ {
+ return 0;
+ }
+
+ if (input >= 1f)
+ {
+ return 255;
+ }
+
+ if (input < 0.0031308f)
+ {
+ return (byte)(0.5f + (input * 12.92 * 255f));
+ }
+
+ return (byte)(255f * (MathF.Pow(input, 1f / 2.4f) * 1.055f - 0.055f));
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/LanguageManager.cs b/src/dev/impl/DevToys/LanguageManager.cs
index 48abf635c..2a5bc1759 100644
--- a/src/dev/impl/DevToys/LanguageManager.cs
+++ b/src/dev/impl/DevToys/LanguageManager.cs
@@ -26,6 +26,7 @@ namespace DevToys
private readonly AllToolsStrings _alltools = new AllToolsStrings();
private readonly Base64EncoderDecoderStrings _base64encoderdecoder = new Base64EncoderDecoderStrings();
+ private readonly ColorBlindnessSimulatorStrings _colorblindnesssimulator = new ColorBlindnessSimulatorStrings();
private readonly CommonStrings _common = new CommonStrings();
private readonly GuidGeneratorStrings _guidgenerator = new GuidGeneratorStrings();
private readonly HashGeneratorStrings _hashgenerator = new HashGeneratorStrings();
@@ -66,6 +67,11 @@ namespace DevToys
/// </summary>
public Base64EncoderDecoderStrings Base64EncoderDecoder => _base64encoderdecoder;
+ /// <summary>
+ /// Gets the <see cref="ColorBlindnessSimulatorStrings"/>.
+ /// </summary>
+ public ColorBlindnessSimulatorStrings ColorBlindnessSimulator => _colorblindnesssimulator;
+
/// <summary>
/// Gets the <see cref="CommonStrings"/>.
/// </summary>
@@ -303,6 +309,86 @@ namespace DevToys
public string SearchDisplayName => _resources.GetString("SearchDisplayName");
}
+ public class ColorBlindnessSimulatorStrings : ObservableObject
+ {
+ private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("ColorBlindnessSimulator");
+
+ /// <summary>
+ /// Gets the resource AccessibleName.
+ /// </summary>
+ public string AccessibleName => _resources.GetString("AccessibleName");
+
+ /// <summary>
+ /// Gets the resource MenuDisplayName.
+ /// </summary>
+ public string MenuDisplayName => _resources.GetString("MenuDisplayName");
+
+ /// <summary>
+ /// Gets the resource Description.
+ /// </summary>
+ public string Description => _resources.GetString("Description");
+
+ /// <summary>
+ /// Gets the resource SearchDisplayName.
+ /// </summary>
+ public string SearchDisplayName => _resources.GetString("SearchDisplayName");
+
+ /// <summary>
+ /// Gets the resource InvalidSelectedFiles.
+ /// </summary>
+ public string InvalidSelectedFiles => _resources.GetString("InvalidSelectedFiles");
+
+ /// <summary>
+ /// Gets the resource SelectFilesInstruction1.
+ /// </summary>
+ public string SelectFilesInstruction1 => _resources.GetString("SelectFilesInstruction1");
+
+ /// <summary>
+ /// Gets the resource SelectFilesInstruction2.
+ /// </summary>
+ public string SelectFilesInstruction2 => _resources.GetString("SelectFilesInstruction2");
+
+ /// <summary>
+ /// Gets the resource SelectFilesInstruction3.
+ /// </summary>
+ public string SelectFilesInstruction3 => _resources.GetString("SelectFilesInstruction3");
+
+ /// <summary>
+ /// Gets the resource SaveAs.
+ /// </summary>
+ public string SaveAs => _resources.GetString("SaveAs");
+
+ /// <summary>
+ /// Gets the resource Cancel.
+ /// </summary>
+ public string Cancel => _resources.GetString("Cancel");
+
+ /// <summary>
+ /// Gets the resource DeuteranopiaSimulation.
+ /// </summary>
+ public string DeuteranopiaSimulation => _resources.GetString("DeuteranopiaSimulation");
+
+ /// <summary>
+ /// Gets the resource OriginalPicture.
+ /// </summary>
+ public string OriginalPicture => _resources.GetString("OriginalPicture");
+
+ /// <summary>
+ /// Gets the resource ProtanopiaSimulation.
+ /// </summary>
+ public string ProtanopiaSimulation => _resources.GetString("ProtanopiaSimulation");
+
+ /// <summary>
+ /// Gets the resource TritanopiaSimulation.
+ /// </summary>
+ public string TritanopiaSimulation => _resources.GetString("TritanopiaSimulation");
+
+ /// <summary>
+ /// Gets the resource SelectFilesInstruction4.
+ /// </summary>
+ public string SelectFilesInstruction4 => _resources.GetString("SelectFilesInstruction4");
+ }
+
public class CommonStrings : ObservableObject
{
private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("Common");
diff --git a/src/dev/impl/DevToys/Strings/cs-CZ/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/cs-CZ/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..26b764f85
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/cs-CZ/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Color Blindness Simulator tool</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simulate color blindness on a picture or screenshot</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Only a .png, .jpg, .jpeg or .bmp file can be used.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Drag &amp; drop a PNG, JPEG or BMP file here</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>or</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Browse files</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Save as</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Cancel</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Deuteranopia simulation</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Original</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Protanopia simulation</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Tritanopia simulation</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Paste</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/en-US/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/en-US/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..26b764f85
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/en-US/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Color Blindness Simulator tool</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simulate color blindness on a picture or screenshot</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Only a .png, .jpg, .jpeg or .bmp file can be used.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Drag &amp; drop a PNG, JPEG or BMP file here</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>or</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Browse files</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Save as</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Cancel</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Deuteranopia simulation</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Original</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Protanopia simulation</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Tritanopia simulation</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Paste</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/fr-FR/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/fr-FR/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..7b6936c2c
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/fr-FR/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Outil de simulation de Daltonisme</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Simulateur de Daltonisme</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simuler le daltonisme sur une photo ou une capture d'écran</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Simulateur de Daltonisme</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Seul un fichier .png, .jpg, .jpeg et bmp peut être utilisé.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Glissez &amp; déposez un fichier PNG, JPEG ou BMP ici</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>ou</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Selectionner un fichier</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Enregistrer-sous</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Annuler</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Simulation de deutéranopie</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Originale</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Simulation de protanopie</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Simulation de tritanopie</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Coller</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/pl-PL/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/pl-PL/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..26b764f85
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/pl-PL/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Color Blindness Simulator tool</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simulate color blindness on a picture or screenshot</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Only a .png, .jpg, .jpeg or .bmp file can be used.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Drag &amp; drop a PNG, JPEG or BMP file here</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>or</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Browse files</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Save as</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Cancel</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Deuteranopia simulation</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Original</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Protanopia simulation</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Tritanopia simulation</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Paste</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/pt-PT/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/pt-PT/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..26b764f85
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/pt-PT/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Color Blindness Simulator tool</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simulate color blindness on a picture or screenshot</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Only a .png, .jpg, .jpeg or .bmp file can be used.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Drag &amp; drop a PNG, JPEG or BMP file here</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>or</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Browse files</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Save as</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Cancel</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Deuteranopia simulation</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Original</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Protanopia simulation</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Tritanopia simulation</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Paste</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/ru-RU/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/ru-RU/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..26b764f85
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/ru-RU/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Color Blindness Simulator tool</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simulate color blindness on a picture or screenshot</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Only a .png, .jpg, .jpeg or .bmp file can be used.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Drag &amp; drop a PNG, JPEG or BMP file here</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>or</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Browse files</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Save as</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Cancel</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Deuteranopia simulation</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Original</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Protanopia simulation</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Tritanopia simulation</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Paste</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/zh-Hans/ColorBlindnessSimulator.resw b/src/dev/impl/DevToys/Strings/zh-Hans/ColorBlindnessSimulator.resw
new file mode 100644
index 000000000..26b764f85
--- /dev/null
+++ b/src/dev/impl/DevToys/Strings/zh-Hans/ColorBlindnessSimulator.resw
@@ -0,0 +1,165 @@
+<?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>Color Blindness Simulator tool</value>
+ </data>
+ <data name="MenuDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="Description" xml:space="preserve">
+ <value>Simulate color blindness on a picture or screenshot</value>
+ </data>
+ <data name="SearchDisplayName" xml:space="preserve">
+ <value>Color Blindness Simulator</value>
+ </data>
+ <data name="InvalidSelectedFiles" xml:space="preserve">
+ <value>Only a .png, .jpg, .jpeg or .bmp file can be used.</value>
+ </data>
+ <data name="SelectFilesInstruction1" xml:space="preserve">
+ <value>Drag &amp; drop a PNG, JPEG or BMP file here</value>
+ </data>
+ <data name="SelectFilesInstruction2" xml:space="preserve">
+ <value>or</value>
+ </data>
+ <data name="SelectFilesInstruction3" xml:space="preserve">
+ <value>Browse files</value>
+ </data>
+ <data name="SaveAs" xml:space="preserve">
+ <value>Save as</value>
+ </data>
+ <data name="Cancel" xml:space="preserve">
+ <value>Cancel</value>
+ </data>
+ <data name="DeuteranopiaSimulation" xml:space="preserve">
+ <value>Deuteranopia simulation</value>
+ </data>
+ <data name="OriginalPicture" xml:space="preserve">
+ <value>Original</value>
+ </data>
+ <data name="ProtanopiaSimulation" xml:space="preserve">
+ <value>Protanopia simulation</value>
+ </data>
+ <data name="TritanopiaSimulation" xml:space="preserve">
+ <value>Tritanopia simulation</value>
+ </data>
+ <data name="SelectFilesInstruction4" xml:space="preserve">
+ <value>Paste</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevToys/Strings/zh-CN/LoremIpsumGenerator.resw b/src/dev/impl/DevToys/Strings/zh-Hans/LoremIpsumGenerator.resw
similarity index 100%
rename from src/dev/impl/DevToys/Strings/zh-CN/LoremIpsumGenerator.resw
rename to src/dev/impl/DevToys/Strings/zh-Hans/LoremIpsumGenerator.resw
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolProvider.cs b/src/dev/impl/DevToys/ViewModels/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolProvider.cs
new file mode 100644
index 000000000..b28e9c5ec
--- /dev/null
+++ b/src/dev/impl/DevToys/ViewModels/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolProvider.cs
@@ -0,0 +1,47 @@
+#nullable enable
+
+using System.Composition;
+using DevToys.Api.Tools;
+using DevToys.Core.Threading;
+using DevToys.Shared.Api.Core;
+using Windows.UI.Xaml.Controls;
+
+namespace DevToys.ViewModels.Tools.ColorBlindnessSimulator
+{
+ [Export(typeof(IToolProvider))]
+ [Name("Color Blindness Simulator")]
+ [Parent(GraphicGroupToolProvider.InternalName)]
+ [ProtocolName("colorblind")]
+ [Order(0)]
+ [NotScrollable]
+ internal class ColorBlindnessSimulatorToolProvider : ToolProviderBase, IToolProvider
+ {
+ private readonly IMefProvider _mefProvider;
+
+ public string MenuDisplayName => LanguageManager.Instance.ColorBlindnessSimulator.MenuDisplayName;
+
+ public string? SearchDisplayName => LanguageManager.Instance.ColorBlindnessSimulator.SearchDisplayName;
+
+ public string? Description => LanguageManager.Instance.ColorBlindnessSimulator.Description;
+
+ public string AccessibleName => LanguageManager.Instance.ColorBlindnessSimulator.AccessibleName;
+
+ public TaskCompletionNotifier<IconElement> IconSource => CreateSvgIcon("ColorBlindnessSimulator.svg");
+
+ [ImportingConstructor]
+ public ColorBlindnessSimulatorToolProvider(IMefProvider mefProvider)
+ {
+ _mefProvider = mefProvider;
+ }
+
+ public bool CanBeTreatedByTool(string data)
+ {
+ return false;
+ }
+
+ public IToolViewModel CreateTool()
+ {
+ return _mefProvider.Import<ColorBlindnessSimulatorToolViewModel>();
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/ViewModels/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolViewModel.cs b/src/dev/impl/DevToys/ViewModels/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolViewModel.cs
new file mode 100644
index 000000000..6373cb620
--- /dev/null
+++ b/src/dev/impl/DevToys/ViewModels/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolViewModel.cs
@@ -0,0 +1,469 @@
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.Composition;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using DevToys.Api.Tools;
+using DevToys.Core;
+using DevToys.Core.Threading;
+using DevToys.Helpers;
+using DevToys.Shared.Core;
+using DevToys.Shared.Core.Threading;
+using DevToys.Views.Tools.ColorBlindnessSimulator;
+using Microsoft.Toolkit.Mvvm.ComponentModel;
+using Microsoft.Toolkit.Mvvm.Input;
+using Windows.ApplicationModel.DataTransfer;
+using Windows.Graphics.Imaging;
+using Windows.Storage;
+using Windows.Storage.Pickers;
+using Windows.Storage.Streams;
+using Windows.UI.Xaml;
+
+namespace DevToys.ViewModels.Tools.ColorBlindnessSimulator
+{
+ [Export(typeof(ColorBlindnessSimulatorToolViewModel))]
+ public sealed class ColorBlindnessSimulatorToolViewModel : ObservableRecipient, IToolViewModel, IDisposable
+ {
+ private static readonly string[] SupportedFileExtensions = new[] { ".png", ".jpg", ".jpeg", ".bmp" };
+
+ private readonly object _lockObject = new();
+ private readonly List<string> _tempFileNames = new();
+
+ private CancellationTokenSource? _cancellationTokenSource;
+ private DateTime _timeSinceLastprogressUpdate;
+ private bool _isSelectFilesAreaHighlithed;
+ private bool _hasInvalidFilesSelected;
+ private bool _isResultGridVisible;
+ private bool _isProgressGridVisible;
+ private int _progress;
+ private int _protanopiaProgress;
+ private int _tritanopiaProgress;
+ private int _deuteranopiaProgress;
+ private Uri? _originalOutput;
+ private Uri? _protanopiaOutput;
+ private Uri? _tritanopiaOutput;
+ private Uri? _deuteranopiaOutput;
+
+ public Type View { get; } = typeof(ColorBlindnessSimulatorToolPage);
+
+ internal ColorBlindnessSimulatorStrings Strings => LanguageManager.Instance.ColorBlindnessSimulator;
+
+ internal bool IsSelectFilesAreaHighlithed
+ {
+ get => _isSelectFilesAreaHighlithed;
+ set => SetProperty(ref _isSelectFilesAreaHighlithed, value);
+ }
+
+ internal bool HasInvalidFilesSelected
+ {
+ get => _hasInvalidFilesSelected;
+ set => SetProperty(ref _hasInvalidFilesSelected, value);
+ }
+
+ internal bool IsResultGridVisible
+ {
+ get => _isResultGridVisible;
+ set => SetProperty(ref _isResultGridVisible, value);
+ }
+
+ internal bool IsProgressGridVisible
+ {
+ get => _isProgressGridVisible;
+ set => SetProperty(ref _isProgressGridVisible, value);
+ }
+
+ internal int Progress
+ {
+ get => _progress;
+ set => SetProperty(ref _progress, value);
+ }
+
+ internal Uri? OriginalOutput
+ {
+ get => _originalOutput;
+ set => SetProperty(ref _originalOutput, value);
+ }
+
+ internal Uri? ProtanopiaOutput
+ {
+ get => _protanopiaOutput;
+ set => SetProperty(ref _protanopiaOutput, value);
+ }
+
+ internal Uri? TritanopiaOutput
+ {
+ get => _tritanopiaOutput;
+ set => SetProperty(ref _tritanopiaOutput, value);
+ }
+
+ internal Uri? DeuteranopiaOutput
+ {
+ get => _deuteranopiaOutput;
+ set => SetProperty(ref _deuteranopiaOutput, value);
+ }
+
+ [ImportingConstructor]
+ public ColorBlindnessSimulatorToolViewModel()
+ {
+ SelectFilesAreaDragOverCommand = new RelayCommand<DragEventArgs>(ExecuteSelectFilesAreaDragOverCommand);
+ SelectFilesAreaDragLeaveCommand = new RelayCommand<DragEventArgs>(ExecuteSelectFilesAreaDragLeaveCommand);
+ SelectFilesAreaDragDropCommand = new AsyncRelayCommand<DragEventArgs>(ExecuteSelectFilesAreaDragDropCommandAsync);
+ SelectFilesBrowseCommand = new AsyncRelayCommand(ExecuteSelectFilesBrowseCommandAsync);
+ SelectFilesPasteCommand = new AsyncRelayCommand(ExecuteSelectFilesPasteCommandAsync);
+ CancelCommand = new RelayCommand(ExecuteCancelCommand);
+ }
+
+ public void Dispose()
+ {
+ _cancellationTokenSource?.Cancel();
+ _cancellationTokenSource?.Dispose();
+ ClearTempFiles();
+ }
+
+ public void UpdateProgress(bool force = false)
+ {
+ if (force || DateTime.Now - _timeSinceLastprogressUpdate > TimeSpan.FromMilliseconds(1))
+ {
+ ThreadHelper.RunOnUIThreadAsync(() =>
+ {
+ Progress = (_protanopiaProgress + _tritanopiaProgress + _deuteranopiaProgress) / 3;
+ _timeSinceLastprogressUpdate = DateTime.Now;
+ }).Forget();
+ }
+ }
+
+ #region SelectFilesAreaDragOverCommand
+
+ public IRelayCommand<DragEventArgs> SelectFilesAreaDragOverCommand { get; }
+
+ private void ExecuteSelectFilesAreaDragOverCommand(DragEventArgs? parameters)
+ {
+ Arguments.NotNull(parameters, nameof(parameters));
+ if (parameters!.DataView.Contains(StandardDataFormats.StorageItems))
+ {
+ parameters.AcceptedOperation = DataPackageOperation.Copy;
+ parameters.Handled = false;
+ }
+
+ IsSelectFilesAreaHighlithed = true;
+ HasInvalidFilesSelected = false;
+ }
+
+ #endregion
+
+ #region SelectFilesAreaDragLeaveCommand
+
+ public IRelayCommand<DragEventArgs> SelectFilesAreaDragLeaveCommand { get; }
+
+ private void ExecuteSelectFilesAreaDragLeaveCommand(DragEventArgs? parameters)
+ {
+ IsSelectFilesAreaHighlithed = false;
+ HasInvalidFilesSelected = false;
+ }
+
+ #endregion
+
+ #region SelectFilesAreaDragDropCommand
+
+ public IAsyncRelayCommand<DragEventArgs> SelectFilesAreaDragDropCommand { get; }
+
+ private async Task ExecuteSelectFilesAreaDragDropCommandAsync(DragEventArgs? parameters)
+ {
+ Arguments.NotNull(parameters, nameof(parameters));
+
+ await ThreadHelper.RunOnUIThreadAsync(async () =>
+ {
+ IsSelectFilesAreaHighlithed = false;
+ if (!parameters!.DataView.Contains(StandardDataFormats.StorageItems))
+ {
+ return;
+ }
+
+ IReadOnlyList<IStorageItem>? storageItems = await parameters.DataView.GetStorageItemsAsync();
+ if (storageItems is null || storageItems.Count != 1)
+ {
+ return;
+ }
+
+ IStorageItem storageItem = storageItems[0];
+ if (storageItem is StorageFile file)
+ {
+ string fileExtension = Path.GetExtension(file.Name);
+
+ if (SupportedFileExtensions.Any(ext => string.Equals(ext, fileExtension, StringComparison.OrdinalIgnoreCase)))
+ {
+ QueueNewSimulation(file, addFileToListOfTempFilesToDelete: false);
+ }
+ else
+ {
+ HasInvalidFilesSelected = true;
+ }
+ }
+ else
+ {
+ HasInvalidFilesSelected = true;
+ }
+ }).ConfigureAwait(false);
+ }
+
+ #endregion
+
+ #region SelectFilesBrowseCommand
+
+ public IAsyncRelayCommand SelectFilesBrowseCommand { get; }
+
+ private async Task ExecuteSelectFilesBrowseCommandAsync()
+ {
+ await ThreadHelper.RunOnUIThreadAsync(async () =>
+ {
+ HasInvalidFilesSelected = false;
+
+ var filePicker = new FileOpenPicker
+ {
+ ViewMode = PickerViewMode.List,
+ SuggestedStartLocation = PickerLocationId.ComputerFolder
+ };
+
+ for (int i = 0; i < SupportedFileExtensions.Length; i++)
+ {
+ filePicker.FileTypeFilter.Add(SupportedFileExtensions[i]);
+ }
+
+ StorageFile file = await filePicker.PickSingleFileAsync();
+ if (file != null)
+ {
+ QueueNewSimulation(file, addFileToListOfTempFilesToDelete: false);
+ }
+ });
+ }
+
+ #endregion
+
+ #region SelectFilesPasteCommand
+
+ public IAsyncRelayCommand SelectFilesPasteCommand { get; }
+
+ private async Task ExecuteSelectFilesPasteCommandAsync()
+ {
+ await ThreadHelper.RunOnUIThreadAsync(async () =>
+ {
+ HasInvalidFilesSelected = false;
+
+ DataPackageView? dataPackageView = Windows.ApplicationModel.DataTransfer.Clipboard.GetContent();
+ if (dataPackageView is not null && dataPackageView.Contains(StandardDataFormats.Bitmap))
+ {
+ IRandomAccessStreamReference? imageReceived = await dataPackageView.GetBitmapAsync();
+ if (imageReceived is not null)
+ {
+ using (IRandomAccessStreamWithContentType imageStream = await imageReceived.OpenReadAsync())
+ {
+ StorageFolder localCacheFolder = ApplicationData.Current.LocalCacheFolder;
+ StorageFile storageFile = await localCacheFolder.CreateFileAsync($"{Guid.NewGuid()}.jpeg", CreationCollisionOption.ReplaceExisting);
+
+ using (IRandomAccessStream? stream = await storageFile.OpenAsync(FileAccessMode.ReadWrite))
+ {
+ await imageStream.AsStreamForRead().CopyToAsync(stream.AsStreamForWrite());
+ }
+
+ QueueNewSimulation(storageFile, addFileToListOfTempFilesToDelete: true);
+ }
+ }
+ }
+ });
+ }
+
+ #endregion
+
+ #region CancelCommand
+
+ public IRelayCommand CancelCommand { get; }
+
+ private void ExecuteCancelCommand()
+ {
+ lock (_lockObject)
+ {
+ _cancellationTokenSource?.Cancel();
+ _cancellationTokenSource?.Dispose();
+
+ _cancellationTokenSource = new CancellationTokenSource();
+
+ IsResultGridVisible = false;
+ IsProgressGridVisible = false;
+ _protanopiaProgress = 0;
+ _tritanopiaProgress = 0;
+ _deuteranopiaProgress = 0;
+ UpdateProgress(force: true);
+ ClearTempFiles();
+ }
+ }
+
+ #endregion
+
+ private void QueueNewSimulation(StorageFile file, bool addFileToListOfTempFilesToDelete)
+ {
+ lock (_lockObject)
+ {
+ Arguments.NotNull(file, nameof(file));
+
+ ExecuteCancelCommand();
+ IsProgressGridVisible = true;
+
+ if (addFileToListOfTempFilesToDelete)
+ {
+ _tempFileNames.Add(file.Path);
+ }
+
+ Assumes.NotNull(_cancellationTokenSource, nameof(_cancellationTokenSource));
+ SimulateColorBlindnessAsync(file, _cancellationTokenSource!.Token).Forget();
+ }
+ }
+
+ private async Task SimulateColorBlindnessAsync(StorageFile file, CancellationToken cancellationToken)
+ {
+ await TaskScheduler.Default;
+
+ (byte[] bgra8SourcePixels, uint width, uint height) = await GetBgra8PixelsFromFileAsync(file);
+
+ cancellationToken.ThrowIfCancellationRequested();
+
+ string randomFileName = Guid.NewGuid().ToString();
+
+ var workTasks
+ = new List<Task<Uri>>
+ {
+ Task.Run(async () =>
+ {
+ return await SaveImageToFileAsync(bgra8SourcePixels, width, height, Path.GetFileNameWithoutExtension(randomFileName), "Original");
+ }),
+ Task.Run(async () =>
+ {
+ byte[] protanopiaBgraPixels
+ = ColorBlindnessSimulatorHelper.SimulateProtanopia(
+ bgra8SourcePixels,
+ (p) => { _protanopiaProgress = p; UpdateProgress(); },
+ cancellationToken);
+ UpdateProgress(force: true);
+ return await SaveImageToFileAsync(protanopiaBgraPixels, width, height, Path.GetFileNameWithoutExtension(randomFileName), "Protanopia");
+ }),
+ Task.Run(async () =>
+ {
+ byte[] tritanopiaBgraPixels
+ = ColorBlindnessSimulatorHelper.SimulateTritanopia(
+ bgra8SourcePixels,
+ (p) => { _tritanopiaProgress = p; UpdateProgress(); },
+ cancellationToken);
+ UpdateProgress(force: true);
+ return await SaveImageToFileAsync(tritanopiaBgraPixels, width, height, Path.GetFileNameWithoutExtension(randomFileName), "Tritanopia");
+ }),
+ Task.Run(async () =>
+ {
+ byte[] deuteranopiaBgraPixels
+ = ColorBlindnessSimulatorHelper.SimulateDeuteranopia(
+ bgra8SourcePixels,
+ (p) => { _deuteranopiaProgress = p; UpdateProgress(); },
+ cancellationToken);
+ UpdateProgress(force: true);
+ return await SaveImageToFileAsync(deuteranopiaBgraPixels, width, height, Path.GetFileNameWithoutExtension(randomFileName), "Deuteranopia");
+ })
+ };
+
+ await Task.WhenAll(workTasks);
+
+ cancellationToken.ThrowIfCancellationRequested();
+
+ await ThreadHelper.RunOnUIThreadAsync(() =>
+ {
+ UpdateProgress(force: true);
+
+ OriginalOutput = workTasks[0].Result;
+ ProtanopiaOutput = workTasks[1].Result;
+ TritanopiaOutput = workTasks[2].Result;
+ DeuteranopiaOutput = workTasks[3].Result;
+ OnPropertyChanged(nameof(OriginalOutput)); // Do this in case if the new file path is the same than before but with a different image.
+ OnPropertyChanged(nameof(ProtanopiaOutput));
+ OnPropertyChanged(nameof(TritanopiaOutput));
+ OnPropertyChanged(nameof(DeuteranopiaOutput));
+
+ IsProgressGridVisible = false;
+ IsResultGridVisible = true;
+ });
+ }
+
+ private async Task<(byte[] bgra8SourcePixels, uint width, uint height)> GetBgra8PixelsFromFileAsync(StorageFile file)
+ {
+ await TaskScheduler.Default;
+ using (IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read))
+ {
+ BitmapDecoder decoder = await BitmapDecoder.CreateAsync(fileStream);
+
+ var transform = new BitmapTransform()
+ {
+ ScaledWidth = Convert.ToUInt32(decoder.PixelWidth),
+ ScaledHeight = Convert.ToUInt32(decoder.PixelHeight)
+ };
+
+ PixelDataProvider pixelData
+ = await decoder.GetPixelDataAsync(
+ BitmapPixelFormat.Bgra8, // WriteableBitmap uses BGRA format
+ BitmapAlphaMode.Ignore,
+ transform,
+ ExifOrientationMode.IgnoreExifOrientation, // This sample ignores Exif orientation
+ ColorManagementMode.DoNotColorManage
+ );
+
+ // An array containing the decoded image data, which could be modified before being displayed
+ return (pixelData.DetachPixelData(), decoder.PixelWidth, decoder.PixelHeight);
+ }
+ }
+
+ private async Task<Uri> SaveImageToFileAsync(byte[] bgraPixels, uint width, uint height, string imageName, string disabilityName)
+ {
+ await TaskScheduler.Default;
+ StorageFolder localCacheFolder = ApplicationData.Current.LocalCacheFolder;
+ StorageFile storageFile = await localCacheFolder.CreateFileAsync($"{imageName}-{disabilityName}.png", CreationCollisionOption.ReplaceExisting);
+
+ _tempFileNames.Add(storageFile.Path);
+
+ using (IRandomAccessStream stream = await storageFile.OpenAsync(FileAccessMode.ReadWrite))
+ {
+ BitmapEncoder encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, stream);
+
+ encoder.SetPixelData(
+ BitmapPixelFormat.Bgra8,
+ BitmapAlphaMode.Premultiplied,
+ width,
+ height,
+ 96.0,
+ 96.0,
+ bgraPixels);
+
+ await encoder.FlushAsync();
+ }
+
+ return new Uri(storageFile.Path);
+ }
+
+ private void ClearTempFiles()
+ {
+ for (int i = 0; i < _tempFileNames.Count; i++)
+ {
+ string tempFile = _tempFileNames[i];
+ try
+ {
+ if (File.Exists(tempFile))
+ {
+ File.Delete(tempFile);
+ }
+ }
+ catch (Exception ex)
+ {
+ Logger.LogFault(nameof(ColorBlindnessSimulatorToolViewModel), ex, "Unable to delete a temporary file.");
+ }
+ }
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolPage.xaml b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolPage.xaml
new file mode 100644
index 000000000..b0b083519
--- /dev/null
+++ b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolPage.xaml
@@ -0,0 +1,169 @@
+<Page
+ x:Class="DevToys.Views.Tools.ColorBlindnessSimulator.ColorBlindnessSimulatorToolPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:DevToys.Views.Tools.ColorBlindnessSimulator"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:converters="using:DevToys.UI.Converters"
+ xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
+ xmlns:core="using:Microsoft.Xaml.Interactions.Core"
+ xmlns:i="using:Microsoft.Xaml.Interactivity"
+ mc:Ignorable="d"
+ NavigationCacheMode="Required">
+ <Page.Resources>
+ <converters:BooleanToVisibilityConverter x:Name="BooleanToVisibilityConverter"/>
+ </Page.Resources>
+
+ <Grid Margin="0,0,0,16" RowSpacing="12">
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup>
+ <VisualState x:Name="SelectFilesPointerHover">
+ <VisualState.StateTriggers>
+ <StateTrigger IsActive="{x:Bind ViewModel.IsSelectFilesAreaHighlithed, Mode=OneWay}"/>
+ </VisualState.StateTriggers>
+ <VisualState.Setters>
+ <Setter Target="SelectFilesRectangle.Stroke" Value="{ThemeResource TextControlHeaderForeground}" />
+ <Setter Target="SelectFilesRectangle.Fill" Value="{ThemeResource ButtonBackgroundPointerOver}" />
+ </VisualState.Setters>
+ </VisualState>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <Grid.ChildrenTransitions>
+ <TransitionCollection>
+ <EntranceThemeTransition IsStaggeringEnabled="True" FromVerticalOffset="50"/>
+ </TransitionCollection>
+ </Grid.ChildrenTransitions>
+
+ <Grid
+ Grid.Row="0"
+ Margin="0,12,0,0"
+ AllowDrop="True"
+ Background="Transparent"
+ CornerRadius="4">
+ <i:Interaction.Behaviors>
+ <core:EventTriggerBehavior EventName="DragOver">
+ <core:InvokeCommandAction
+ Command="{x:Bind ViewModel.SelectFilesAreaDragOverCommand}"/>
+ </core:EventTriggerBehavior>
+ <core:EventTriggerBehavior EventName="DragLeave">
+ <core:InvokeCommandAction
+ Command="{x:Bind ViewModel.SelectFilesAreaDragLeaveCommand}"/>
+ </core:EventTriggerBehavior>
+ <core:EventTriggerBehavior EventName="Drop">
+ <core:InvokeCommandAction
+ Command="{x:Bind ViewModel.SelectFilesAreaDragDropCommand}"/>
+ </core:EventTriggerBehavior>
+ </i:Interaction.Behaviors>
+ <Rectangle
+ x:Name="SelectFilesRectangle"
+ Stroke="{ThemeResource TextControlHeaderForegroundDisabled}"
+ StrokeDashArray="4 4"
+ StrokeThickness="2"
+ Fill="Transparent">
+ </Rectangle>
+ <StackPanel
+ Spacing="8"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ Margin="24">
+ <TextBlock
+ Text="{x:Bind ViewModel.Strings.SelectFilesInstruction1}"
+ TextTrimming="CharacterEllipsis"
+ TextWrapping="WrapWholeWords"
+ HorizontalAlignment="Center"/>
+ <TextBlock
+ Text="{x:Bind ViewModel.Strings.SelectFilesInstruction2}"
+ HorizontalAlignment="Center"/>
+ <StackPanel
+ Orientation="Horizontal"
+ HorizontalAlignment="Center"
+ Spacing="6">
+ <Button
+ x:Name="BrowseFileButton"
+ Style="{StaticResource AccentButtonStyle}"
+ VerticalAlignment="Center"
+ MinWidth="100"
+ Content="{x:Bind ViewModel.Strings.SelectFilesInstruction3}"
+ Command="{x:Bind ViewModel.SelectFilesBrowseCommand}"/>
+ <TextBlock
+ Text="/"
+ VerticalAlignment="Center"/>
+ <Button
+ Style="{StaticResource AccentButtonStyle}"
+ VerticalAlignment="Center"
+ MinWidth="100"
+ Content="{x:Bind ViewModel.Strings.SelectFilesInstruction4}"
+ Command="{x:Bind ViewModel.SelectFilesPasteCommand}"/>
+ </StackPanel>
+ <TextBlock
+ Text="{x:Bind ViewModel.Strings.InvalidSelectedFiles}"
+ HorizontalAlignment="Center"
+ FontSize="11"
+ Foreground="Red"
+ Visibility="{x:Bind ViewModel.HasInvalidFilesSelected, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"/>
+ </StackPanel>
+ </Grid>
+
+ <Grid
+ Grid.Row="1"
+ RowSpacing="12"
+ ColumnSpacing="12"
+ Visibility="{x:Bind ViewModel.IsResultGridVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+
+ <local:ImagePreview
+ Grid.Row="0"
+ Grid.Column="0"
+ Header="{x:Bind ViewModel.Strings.OriginalPicture}"
+ Source="{x:Bind ViewModel.OriginalOutput, Mode=OneWay}"/>
+
+ <local:ImagePreview
+ Grid.Row="0"
+ Grid.Column="1"
+ Header="{x:Bind ViewModel.Strings.ProtanopiaSimulation}"
+ Source="{x:Bind ViewModel.ProtanopiaOutput, Mode=OneWay}"/>
+
+ <local:ImagePreview
+ Grid.Row="1"
+ Grid.Column="0"
+ Header="{x:Bind ViewModel.Strings.TritanopiaSimulation}"
+ Source="{x:Bind ViewModel.TritanopiaOutput, Mode=OneWay}"/>
+
+ <local:ImagePreview
+ Grid.Row="1"
+ Grid.Column="1"
+ Header="{x:Bind ViewModel.Strings.DeuteranopiaSimulation}"
+ Source="{x:Bind ViewModel.DeuteranopiaOutput, Mode=OneWay}"/>
+ </Grid>
+
+ <Grid Grid.Row="1" Visibility="{x:Bind ViewModel.IsProgressGridVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
+ <muxc:ProgressRing
+ Height="64"
+ Width="64"
+ IsIndeterminate="False"
+ Value="{x:Bind ViewModel.Progress, Mode=OneWay}"/>
+ <Button
+ Style="{StaticResource CommandBarFlyoutEllipsisButtonStyle}"
+ Margin="3,-1,0,0"
+ Command="{x:Bind ViewModel.CancelCommand}"
+ ToolTipService.ToolTip="{x:Bind ViewModel.Strings.Cancel}"
+ AutomationProperties.Name="{x:Bind ViewModel.Strings.Cancel}">
+ <FontIcon Glyph="&#xF75A;"/>
+ </Button>
+ </Grid>
+
+ </Grid>
+</Page>
diff --git a/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolPage.xaml.cs b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolPage.xaml.cs
new file mode 100644
index 000000000..ca904ce4c
--- /dev/null
+++ b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ColorBlindnessSimulatorToolPage.xaml.cs
@@ -0,0 +1,50 @@
+#nullable enable
+
+using DevToys.Api.Core.Navigation;
+using DevToys.Shared.Core;
+using DevToys.ViewModels.Tools.ColorBlindnessSimulator;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Navigation;
+
+namespace DevToys.Views.Tools.ColorBlindnessSimulator
+{
+ public sealed partial class ColorBlindnessSimulatorToolPage : Page
+ {
+ public static readonly DependencyProperty ViewModelProperty
+ = DependencyProperty.Register(
+ nameof(ViewModel),
+ typeof(ColorBlindnessSimulatorToolViewModel),
+ typeof(ColorBlindnessSimulatorToolPage),
+ new PropertyMetadata(null));
+
+ /// <summary>
+ /// Gets the page's view model.
+ /// </summary>
+ public ColorBlindnessSimulatorToolViewModel ViewModel
+ {
+ get => (ColorBlindnessSimulatorToolViewModel)GetValue(ViewModelProperty);
+ set => SetValue(ViewModelProperty, value);
+ }
+
+ public ColorBlindnessSimulatorToolPage()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ var parameters = (NavigationParameter)e.Parameter;
+
+ if (ViewModel is null)
+ {
+ // Set the view model
+ Assumes.NotNull(parameters.ViewModel, nameof(parameters.ViewModel));
+ ViewModel = (ColorBlindnessSimulatorToolViewModel)parameters.ViewModel!;
+ DataContext = ViewModel;
+ }
+
+ base.OnNavigatedTo(e);
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ImagePreview.xaml b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ImagePreview.xaml
new file mode 100644
index 000000000..5cabd05f0
--- /dev/null
+++ b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ImagePreview.xaml
@@ -0,0 +1,86 @@
+<UserControl
+ x:Class="DevToys.Views.Tools.ColorBlindnessSimulator.ImagePreview"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ d:DesignHeight="300"
+ d:DesignWidth="400"
+ SizeChanged="UserControl_SizeChanged">
+ <UserControl.Resources>
+ <Style x:Key="CardStyle" TargetType="Grid">
+ <Setter Property="BorderBrush" Value="{ThemeResource ExpanderHeaderBorderBrush}" />
+ <Setter Property="BorderThickness" Value="{ThemeResource ExpanderHeaderBorderThickness}" />
+ <Setter Property="HorizontalAlignment" Value="Stretch" />
+ <Setter Property="MinHeight" Value="{StaticResource ExpanderMinHeight}" />
+ <Setter Property="Padding" Value="{StaticResource ExpanderContentPadding}" />
+ <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}"/>
+ <Setter Property="Background" Value="{ThemeResource ExpanderHeaderBackground}"/>
+ </Style>
+ </UserControl.Resources>
+
+ <Grid Style="{StaticResource CardStyle}" RowSpacing="6">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Grid Grid.Row="0" ColumnSpacing="12">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <TextBlock
+ Text="{x:Bind Header, Mode=OneWay}"
+ Margin="{ThemeResource TextBoxTopHeaderMargin}"
+ Style="{StaticResource SubTitleTextBlock}"
+ TextWrapping="Wrap"
+ VerticalAlignment="Center">
+ </TextBlock>
+ <StackPanel
+ x:Name="CommandsToolBar"
+ Grid.Column="1"
+ Orientation="Horizontal"
+ HorizontalAlignment="Right"
+ Spacing="8"
+ Margin="0,0,0,8"
+ AutomationProperties.LabeledBy="{Binding ElementName=HeaderTextBlock}">
+ <Button
+ AutomationProperties.Name="View"
+ Click="ViewButton_Click">
+ <StackPanel Orientation="Horizontal" Spacing="4">
+ <FontIcon Glyph="&#xF3FB;"/>
+ <TextBlock VerticalAlignment="Center" Text="View"/>
+ </StackPanel>
+ </Button>
+ <Button
+ ToolTipService.ToolTip="{Binding Instance.Common.Copy, Mode=OneTime, Source={StaticResource LanguageManager}}"
+ AutomationProperties.Name="{Binding Instance.Common.Copy, Mode=OneTime, Source={StaticResource LanguageManager}}"
+ Click="CopyButton_Click">
+ <FontIcon Glyph="&#xF32B;"/>
+ </Button>
+ <Button
+ ToolTipService.ToolTip="{x:Bind Strings.SaveAs}"
+ AutomationProperties.Name="{x:Bind Strings.SaveAs}"
+ Click="SaveAsButton_Click">
+ <FontIcon Glyph="&#xF67F;"/>
+ </Button>
+ </StackPanel>
+ </Grid>
+
+ <Border
+ x:Name="OutputFitSize"
+ Grid.Row="1"
+ MinHeight="150"
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Stretch"
+ SizeChanged="OutputFitSize_SizeChanged"/>
+ <Canvas
+ Grid.Row="1">
+ <Image
+ x:Name="OutputRenderer"
+ Source="{x:Bind ImageSource, Mode=OneWay}"/>
+ </Canvas>
+ </Grid>
+</UserControl>
diff --git a/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ImagePreview.xaml.cs b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ImagePreview.xaml.cs
new file mode 100644
index 000000000..2557674fb
--- /dev/null
+++ b/src/dev/impl/DevToys/Views/Tools/Graphic/ColorBlindnessSimulator/ImagePreview.xaml.cs
@@ -0,0 +1,133 @@
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using Windows.ApplicationModel.DataTransfer;
+using Windows.Storage;
+using Windows.Storage.Pickers;
+using Windows.Storage.Streams;
+using Windows.System;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Media.Imaging;
+
+namespace DevToys.Views.Tools.ColorBlindnessSimulator
+{
+ public sealed partial class ImagePreview : UserControl
+ {
+ public static readonly DependencyProperty StringsProperty
+ = DependencyProperty.Register(
+ nameof(Strings),
+ typeof(ColorBlindnessSimulatorStrings),
+ typeof(ImagePreview),
+ new PropertyMetadata(LanguageManager.Instance.ColorBlindnessSimulator));
+
+ public ColorBlindnessSimulatorStrings Strings
+ {
+ get => (ColorBlindnessSimulatorStrings)GetValue(StringsProperty);
+ private set => SetValue(StringsProperty, value);
+ }
+
+ public static readonly DependencyProperty HeaderProperty
+ = DependencyProperty.Register(
+ nameof(Header),
+ typeof(string),
+ typeof(ImagePreview),
+ new PropertyMetadata(null));
+
+ public string? Header
+ {
+ get => (string?)GetValue(HeaderProperty);
+ set => SetValue(HeaderProperty, value);
+ }
+
+ public static readonly DependencyProperty SourceProperty
+ = DependencyProperty.Register(
+ nameof(Source),
+ typeof(Uri),
+ typeof(ImagePreview),
+ new PropertyMetadata(null, OnSourcePropertyChangedCalled));
+
+ public Uri? Source
+ {
+ get => (Uri?)GetValue(SourceProperty);
+ set => SetValue(SourceProperty, value);
+ }
+
+ public static readonly DependencyProperty ImageSourceProperty
+ = DependencyProperty.Register(
+ nameof(ImageSource),
+ typeof(BitmapSource),
+ typeof(ImagePreview),
+ new PropertyMetadata(null));
+
+ public BitmapSource? ImageSource
+ {
+ get => (BitmapSource?)GetValue(ImageSourceProperty);
+ private set => SetValue(ImageSourceProperty, value);
+ }
+
+ public ImagePreview()
+ {
+ InitializeComponent();
+ }
+
+ private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ if (e.NewSize.Width < CommandsToolBar.ActualWidth + 100)
+ {
+ CommandsToolBar.Visibility = Visibility.Collapsed;
+ }
+ else
+ {
+ CommandsToolBar.Visibility = Visibility.Visible;
+ }
+ }
+
+ private void OutputFitSize_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ OutputRenderer.Height = OutputFitSize.ActualHeight;
+ OutputRenderer.Width = OutputFitSize.ActualWidth;
+ }
+
+ private async void ViewButton_Click(object sender, RoutedEventArgs e)
+ {
+ await Launcher.LaunchFileAsync(await StorageFile.GetFileFromPathAsync(Source!.OriginalString));
+ }
+
+ private async void CopyButton_Click(object sender, RoutedEventArgs e)
+ {
+ var dataPackage = new DataPackage { RequestedOperation = DataPackageOperation.Copy };
+ dataPackage.SetBitmap(RandomAccessStreamReference.CreateFromFile(await StorageFile.GetFileFromPathAsync(Source!.OriginalString)));
+ Clipboard.SetContentWithOptions(dataPackage, new ClipboardContentOptions() { IsAllowedInHistory = true, IsRoamable = true });
+ Clipboard.Flush(); // This method allows the content to remain available after the application shuts down.
+ }
+
+ private async void SaveAsButton_Click(object sender, RoutedEventArgs e)
+ {
+ string? fileExtension = Path.GetExtension(Source!.OriginalString);
+
+ var savePicker = new FileSavePicker
+ {
+ SuggestedStartLocation = PickerLocationId.ComputerFolder
+ };
+ savePicker.FileTypeChoices.Add(
+ fileExtension.Replace(".", string.Empty).ToUpperInvariant(),
+ new List<string>() { fileExtension!.ToLowerInvariant() });
+
+ StorageFile? newFile = await savePicker.PickSaveFileAsync();
+ if (newFile is not null)
+ {
+ StorageFile tempCompressedFile = await StorageFile.GetFileFromPathAsync(Source!.OriginalString);
+ await tempCompressedFile.CopyAndReplaceAsync(newFile);
+ }
+ }
+
+ private static void OnSourcePropertyChangedCalled(DependencyObject sender, DependencyPropertyChangedEventArgs eventArgs)
+ {
+ var imagePreview = ((ImagePreview)sender);
+ imagePreview.ImageSource = new BitmapImage(imagePreview.Source);
+ }
+ }
+}
diff --git a/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml b/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml
index 33e8608fd..47f10dfc6 100644
--- a/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml
+++ b/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml
@@ -90,6 +90,7 @@
Style="{StaticResource AccentButtonStyle}"
Content="{x:Bind ViewModel.Strings.SelectFilesInstruction3}"
HorizontalAlignment="Center"
+ MinWidth="100"
Command="{x:Bind ViewModel.SelectFilesBrowseCommand}"/>
<TextBlock
Text="{x:Bind ViewModel.Strings.InvalidSelectedFiles}"
diff --git a/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml.cs b/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml.cs
index dcb0bb05a..41db5f08c 100644
--- a/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml.cs
+++ b/src/dev/impl/DevToys/Views/Tools/Graphic/PngJpgCompressor/PngJpgCompressorToolPage.xaml.cs
@@ -15,11 +15,11 @@ namespace DevToys.Views.Tools.PngJpgCompressor
public sealed partial class PngJpgCompressorToolPage : Page
{
public static readonly DependencyProperty ViewModelProperty
- = DependencyProperty.Register(
- nameof(ViewModel),
- typeof(PngJpgCompressorToolViewModel),
- typeof(PngJpgCompressorToolPage),
- new PropertyMetadata(null));
+ = DependencyProperty.Register(
+ nameof(ViewModel),
+ typeof(PngJpgCompressorToolViewModel),
+ typeof(PngJpgCompressorToolPage),
+ new PropertyMetadata(null));
/// <summary>
/// Gets the page's view model.