Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Base64 Image Encoder / Decoder #519

Merged
merged 4 commits into from
May 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/dev/impl/DevToys/Assets/Icons/Base64Image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions src/dev/impl/DevToys/DevToys.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
<Compile Include="ViewModels\Tools\Converters\NumberBaseConverter\NumberBaseFormatBuilder.cs" />
<Compile Include="ViewModels\Tools\Converters\Timestamp\TimestampToolProvider.cs" />
<Compile Include="ViewModels\Tools\Converters\Timestamp\TimestampToolViewModel.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\Base64ImageEncoderDecoder\Base64ImageEncoderDecoderToolProvider.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\Base64ImageEncoderDecoder\Base64ImageEncoderDecoderToolViewModel.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\GZipEncoderDecoder\GZipEncoderDecoderToolProvider.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\GZipEncoderDecoder\GZipEncoderDecoderToolViewModel.cs" />
<Compile Include="Helpers\JsonYaml\Core\DecimalJsonConverter.cs" />
Expand Down Expand Up @@ -141,6 +143,9 @@
<Compile Include="Views\Tools\Converters\Timestamp\TimestampToolPage.xaml.cs">
<DependentUpon>TimestampToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\EncodersDecoders\Base64ImageEncoderDecoder\Base64ImageEncoderDecoderToolPage.xaml.cs">
<DependentUpon>Base64ImageEncoderDecoderToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\EncodersDecoders\GZipEncoderDecoder\GZipEncoderDecoderToolPage.xaml.cs">
<DependentUpon>GZipEncoderDecoderToolPage.xaml</DependentUpon>
</Compile>
Expand All @@ -156,7 +161,7 @@
<Compile Include="Views\Tools\Graphic\ColorBlindnessSimulator\ColorBlindnessSimulatorToolPage.xaml.cs">
<DependentUpon>ColorBlindnessSimulatorToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\Graphic\ColorBlindnessSimulator\ImagePreview.xaml.cs">
<Compile Include="UI\Controls\ImagePreview.xaml.cs">
<DependentUpon>ImagePreview.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\GroupToolPage.xaml.cs">
Expand Down Expand Up @@ -305,6 +310,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\Base64Image.svg" />
<Content Include="Assets\Icons\ColorBlindnessSimulator.svg" />
<Content Include="Assets\Icons\EncodersDecoders.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down Expand Up @@ -473,8 +479,8 @@
<Compile Include="ViewModels\MainPageViewModel.cs" />
<Compile Include="ViewModels\Tools\Settings\SettingsToolProvider.cs" />
<Compile Include="ViewModels\Tools\Settings\SettingsToolViewModel.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\Base64EncoderDecoder\Base64EncoderDecoderToolProvider.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\Base64EncoderDecoder\Base64EncoderDecoderToolViewModel.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\Base64TextEncoderDecoder\Base64EncoderDecoderToolProvider.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\Base64TextEncoderDecoder\Base64EncoderDecoderToolViewModel.cs" />
<Compile Include="ViewModels\Tools\Generators\HashGenerator\HashGeneratorToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\HashGenerator\HashGeneratorToolViewModel.cs" />
<Compile Include="ViewModels\Tools\Formatters\JsonFormatter\JsonFormatterToolProvider.cs" />
Expand All @@ -488,7 +494,7 @@
<Compile Include="Views\MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\EncodersDecoders\Base64EncoderDecoder\Base64EncoderDecoderToolPage.xaml.cs">
<Compile Include="Views\Tools\EncodersDecoders\Base64TextEncoderDecoder\Base64EncoderDecoderToolPage.xaml.cs">
<DependentUpon>Base64EncoderDecoderToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\Converters\NumberBaseConverter\NumberBaseConverterToolPage.xaml.cs">
Expand Down Expand Up @@ -611,11 +617,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Tools\EncodersDecoders\Base64ImageEncoderDecoder\Base64ImageEncoderDecoderToolPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Tools\EncodersDecoders\GZipEncoderDecoder\GZipEncoderDecoderToolPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Tools\EncodersDecoders\Base64EncoderDecoder\Base64EncoderDecoderToolPage.xaml">
<Page Include="Views\Tools\EncodersDecoders\Base64TextEncoderDecoder\Base64EncoderDecoderToolPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
Expand All @@ -635,7 +645,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Tools\Graphic\ColorBlindnessSimulator\ImagePreview.xaml">
<Page Include="UI\Controls\ImagePreview.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
Expand Down
111 changes: 106 additions & 5 deletions src/dev/impl/DevToys/LanguageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public partial class LanguageManager : ObservableObject

private readonly AllToolsStrings _alltools = new AllToolsStrings();
private readonly Base64EncoderDecoderStrings _base64encoderdecoder = new Base64EncoderDecoderStrings();
private readonly Base64ImageEncoderDecoderStrings _base64imageencoderdecoder = new Base64ImageEncoderDecoderStrings();
private readonly CheckSumGeneratorStrings _checksumgenerator = new CheckSumGeneratorStrings();
private readonly ColorBlindnessSimulatorStrings _colorblindnesssimulator = new ColorBlindnessSimulatorStrings();
private readonly CommonStrings _common = new CommonStrings();
Expand Down Expand Up @@ -74,6 +75,11 @@ public partial class LanguageManager : ObservableObject
/// </summary>
public Base64EncoderDecoderStrings Base64EncoderDecoder => _base64encoderdecoder;

/// <summary>
/// Gets the <see cref="Base64ImageEncoderDecoderStrings"/>.
/// </summary>
public Base64ImageEncoderDecoderStrings Base64ImageEncoderDecoder => _base64imageencoderdecoder;

/// <summary>
/// Gets the <see cref="CheckSumGeneratorStrings"/>.
/// </summary>
Expand Down Expand Up @@ -356,6 +362,91 @@ public class Base64EncoderDecoderStrings : ObservableObject
public string SearchKeywords => _resources.GetString("SearchKeywords");
}

public class Base64ImageEncoderDecoderStrings : ObservableObject
{
private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("Base64ImageEncoderDecoder");

/// <summary>
/// Gets the resource AccessibleName.
/// </summary>
public string AccessibleName => _resources.GetString("AccessibleName");

/// <summary>
/// Gets the resource Ascii.
/// </summary>
public string Ascii => _resources.GetString("Ascii");

/// <summary>
/// Gets the resource ConfigurationTitle.
/// </summary>
public string ConfigurationTitle => _resources.GetString("ConfigurationTitle");

/// <summary>
/// Gets the resource ConversionDecode.
/// </summary>
public string ConversionDecode => _resources.GetString("ConversionDecode");

/// <summary>
/// Gets the resource ConversionDescription.
/// </summary>
public string ConversionDescription => _resources.GetString("ConversionDescription");

/// <summary>
/// Gets the resource ConversionEncode.
/// </summary>
public string ConversionEncode => _resources.GetString("ConversionEncode");

/// <summary>
/// Gets the resource ConversionTitle.
/// </summary>
public string ConversionTitle => _resources.GetString("ConversionTitle");

/// <summary>
/// Gets the resource MenuDisplayName.
/// </summary>
public string MenuDisplayName => _resources.GetString("MenuDisplayName");

/// <summary>
/// Gets the resource EncodingDescription.
/// </summary>
public string EncodingDescription => _resources.GetString("EncodingDescription");

/// <summary>
/// Gets the resource EncodingTitle.
/// </summary>
public string EncodingTitle => _resources.GetString("EncodingTitle");

/// <summary>
/// Gets the resource Base64InputTitle.
/// </summary>
public string Base64InputTitle => _resources.GetString("Base64InputTitle");

/// <summary>
/// Gets the resource ImageInputTitle.
/// </summary>
public string ImageInputTitle => _resources.GetString("ImageInputTitle");

/// <summary>
/// Gets the resource Utf8.
/// </summary>
public string Utf8 => _resources.GetString("Utf8");

/// <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 SearchKeywords.
/// </summary>
public string SearchKeywords => _resources.GetString("SearchKeywords");
}

public class CheckSumGeneratorStrings : ObservableObject
{
private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("CheckSumGenerator");
Expand Down Expand Up @@ -460,11 +551,6 @@ public class ColorBlindnessSimulatorStrings : ObservableObject
/// </summary>
public string SearchDisplayName => _resources.GetString("SearchDisplayName");

/// <summary>
/// Gets the resource SaveAs.
/// </summary>
public string SaveAs => _resources.GetString("SaveAs");

/// <summary>
/// Gets the resource Cancel.
/// </summary>
Expand Down Expand Up @@ -494,6 +580,11 @@ public class ColorBlindnessSimulatorStrings : ObservableObject
/// Gets the resource SearchKeywords.
/// </summary>
public string SearchKeywords => _resources.GetString("SearchKeywords");

/// <summary>
/// Gets the resource View.
/// </summary>
public string View => _resources.GetString("View");
}

public class CommonStrings : ObservableObject
Expand Down Expand Up @@ -634,6 +725,11 @@ public string GetFormattedFileSelectorInvalidSelectedFiles(string? param0)
/// </summary>
public string Refresh => _resources.GetString("Refresh");

/// <summary>
/// Gets the resource SaveAs.
/// </summary>
public string SaveAs => _resources.GetString("SaveAs");

/// <summary>
/// Gets the resource SelectAll.
/// </summary>
Expand Down Expand Up @@ -676,6 +772,11 @@ public string GetFormattedUnableOpenFileDescription(string? param0)
/// Gets the resource Undo.
/// </summary>
public string Undo => _resources.GetString("Undo");

/// <summary>
/// Gets the resource ViewImage.
/// </summary>
public string ViewImage => _resources.GetString("ViewImage");
}

public class GuidGeneratorStrings : ObservableObject
Expand Down
8 changes: 4 additions & 4 deletions src/dev/impl/DevToys/Strings/cs-CZ/Base64EncoderDecoder.resw
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<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>Nástroj ke kódování a dekódování Base 64</value>
<value>Base64 Text Encoder and Decoder tool</value>
</data>
<data name="Ascii" xml:space="preserve">
<value>ASCII</value>
Expand All @@ -139,7 +139,7 @@
<value>Převod</value>
</data>
<data name="MenuDisplayName" xml:space="preserve">
<value>Base 64</value>
<value>Base64 Text</value>
</data>
<data name="EncodingDescription" xml:space="preserve">
<value>Zvolte, které kódování chcete použít</value>
Expand All @@ -157,10 +157,10 @@
<value>UTF-8</value>
</data>
<data name="Description" xml:space="preserve">
<value>Kódování a dekódování dat Base64</value>
<value>Encode and decode Base64 text data</value>
</data>
<data name="SearchDisplayName" xml:space="preserve">
<value>Kodér / Dekodér Base 64</value>
<value>Base64 Text Encoder / Decoder</value>
</data>
<data name="SearchKeywords" xml:space="preserve">
<value>RFC 4648</value>
Expand Down
Loading