Skip to content

Commit 4ba5df1

Browse files
committed
2 parents fedbfb8 + 8b1b5d7 commit 4ba5df1

17 files changed

Lines changed: 827 additions & 43 deletions

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,70 @@ All notable changes to this project will be documented in this file.
44

55
---
66

7+
## [2.2.0] - 2026-04-23
8+
9+
### Added
10+
- **QR/Barcode Decode** - Decode QR codes and barcodes from images
11+
- Image upload via file picker
12+
- Drag-and-drop image support
13+
- Ctrl+V paste from clipboard
14+
- Scrollable image preview for large images
15+
- Copy decoded content button
16+
- Click placeholder to upload images
17+
- **Random String Generator** - Generate random strings with configurable options
18+
- Configurable count (default: 1) and length (default: 8)
19+
- Character set options: lowercase, uppercase, numbers, special characters
20+
- Secure random number generation using RandomNumberGenerator
21+
- Copy and clear result buttons
22+
- **Home Page Layout** - Updated to 4 cards per row
23+
24+
### Changed
25+
- **Home Page Icons** - Updated icons for better visual clarity
26+
- Random String: List icon (fa-list)
27+
- String Escape: Exchange icon (fa-exchange)
28+
29+
---
30+
31+
## [2.1.0] - 2026-04-17
32+
33+
### Added
34+
- **JSON Compress Feature** - Compress JSON to single-line format
35+
- Remove all whitespace and line breaks
36+
- Preserve JSON structure and data
37+
- Success/error message feedback
38+
- Integrated with existing JSON formatter page
39+
- **Copy Input Content Button** - Copy original JSON input
40+
- Up arrow + copy icon combination
41+
- Copy content from input textbox
42+
- Separate from formatted JSON copy button
43+
- **Enhanced Copy Buttons** - Distinguish copy sources with icons
44+
- Copy Input: Up arrow + Copy icon (⬆️📋)
45+
- Copy Formatted: Copy icon + Down arrow (📋⬇️)
46+
- Clear visual distinction between two copy actions
47+
- **Full Internationalization (i18n)** - Complete i18n support for all user-facing text
48+
- All MessageBox prompts now use resource strings
49+
- All button tooltips internationalized
50+
- All loading indicators internationalized
51+
- Support for Chinese (zh-CN) and English (en-US)
52+
- New resource strings: JSONCompress, JSONCompressed, DragToSort, ProcessJSONError, CompressJSONError, Processing, CopyInputContent, InputContentCopied, CopyFailed, PleaseEnterContent
53+
54+
### Changed
55+
- **Button Layout** - Reorganized JSON formatter toolbar
56+
- Moved copy buttons together for better UX
57+
- Button order: Format | Compress | ExpandAll | CollapseAll | CopyInput | CopyFormatted
58+
- More intuitive button grouping
59+
- **Icon Design** - Enhanced copy button icons
60+
- Copy Input: Up arrow indicates source is above
61+
- Copy Formatted: Down arrow indicates source is below
62+
- Visual cues match button functionality
63+
64+
### Technical Details
65+
- All hardcoded Chinese strings replaced with resource references
66+
- Complete i18n coverage for all user interface elements
67+
- Resource files updated: Strings.zh-CN.resx, Strings.en-US.resx, Strings.cs
68+
69+
---
70+
771
## [2.1.0] - 2026-04-17
872

973
### Added

DevTools.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
2424
<PackageReference Include="System.Drawing.Common" Version="10.0.3" />
2525
<PackageReference Include="ZXing.Net" Version="0.16.11" />
26+
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.14" />
2627
</ItemGroup>
2728

2829
<ItemGroup>

Pages/BarcodePage.xaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,32 @@
1616
</Grid.RowDefinitions>
1717

1818
<StackPanel Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left">
19-
<Button Click="Back_Click" HorizontalAlignment="Left" Width="40" Height="40" Margin="0,0,0,8" ToolTip="{x:Static resources:Strings.Back}">
20-
<Button.Template>
21-
<ControlTemplate TargetType="Button">
22-
<Border Background="#4A4A4A" CornerRadius="20" Width="40" Height="40" SnapsToDevicePixels="True">
23-
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf060;" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFF" />
24-
</Border>
25-
</ControlTemplate>
26-
</Button.Template>
27-
</Button>
19+
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="0,0,0,8">
20+
<Button Click="Back_Click" HorizontalAlignment="Left" Width="40" Height="40" Margin="0,0,8,0" ToolTip="{x:Static resources:Strings.Back}">
21+
<Button.Template>
22+
<ControlTemplate TargetType="Button">
23+
<Border Background="#4A4A4A" CornerRadius="20" Width="40" Height="40" SnapsToDevicePixels="True">
24+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf060;" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFF" />
25+
</Border>
26+
</ControlTemplate>
27+
</Button.Template>
28+
</Button>
29+
<Button Click="ClearAll_Click" Width="40" Height="40" ToolTip="{x:Static resources:Strings.ClearAll}">
30+
<Button.Template>
31+
<ControlTemplate TargetType="Button">
32+
<Border Background="#4A4A4A" CornerRadius="20" Width="40" Height="40" SnapsToDevicePixels="True">
33+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf2ed;" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFF" />
34+
</Border>
35+
</ControlTemplate>
36+
</Button.Template>
37+
</Button>
38+
</StackPanel>
2839
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
2940
<TextBlock Text="{x:Static resources:Strings.PageBarcode}" FontSize="18" Margin="10,0" VerticalAlignment="Center" />
3041
<TextBox x:Name="InputText" Height="30" Width="300" Margin="10,0" VerticalAlignment="Center" VerticalContentAlignment="Center" />
3142
<Button Click="Generate_Click" Width="100" Height="32" Margin="8,0" VerticalAlignment="Center" ToolTip="{x:Static resources:Strings.Generate}">
3243
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf02a;" FontSize="16" FontWeight="Bold" Foreground="#FFFFFF" />
3344
</Button>
34-
<Button Click="ClearAll_Click" Width="100" Height="32" Margin="8,0" VerticalAlignment="Center" ToolTip="{x:Static resources:Strings.ClearAll}">
35-
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf2ed;" FontSize="16" FontWeight="Bold" Foreground="#FFFFFF" />
36-
</Button>
3745
</StackPanel>
3846
</StackPanel>
3947

Pages/BarcodePage.xaml.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,12 @@ private void DeleteLog_Click(object sender, RoutedEventArgs e)
260260

261261
private void ClearAll_Click(object sender, RoutedEventArgs e)
262262
{
263-
foreach (var l in _logs) { try { l.Bitmap?.Dispose(); } catch { } }
264-
_logs.Clear();
263+
var result = MessageBox.Show(Strings.ConfirmClearMessage, Strings.ConfirmClear, MessageBoxButton.YesNo, MessageBoxImage.Question);
264+
if (result == MessageBoxResult.Yes)
265+
{
266+
foreach (var l in _logs) { try { l.Bitmap?.Dispose(); } catch { } }
267+
_logs.Clear();
268+
}
265269
}
266270

267271
private BitmapSource BitmapToImageSource(Bitmap bitmap)

Pages/HomePage.xaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</Button.Template>
2323
</Button>
2424

25-
<UniformGrid Rows="3" Columns="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0">
25+
<UniformGrid Columns="4" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0">
2626
<Button x:Name="BtnMd5" Click="BtnMd5_Click" Style="{StaticResource CardButtonStyle}" Margin="8">
2727
<StackPanel Width="140" HorizontalAlignment="Center" VerticalAlignment="Center">
2828
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf023;" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" TextAlignment="Center" Foreground="#FFFFFF" />
@@ -73,10 +73,22 @@
7373
</Button>
7474
<Button x:Name="BtnEscape" Click="BtnEscape_Click" Style="{StaticResource CardButtonStyle}" Margin="8">
7575
<StackPanel Width="140" HorizontalAlignment="Center" VerticalAlignment="Center">
76-
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf071;" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" TextAlignment="Center" Foreground="#FFFFFF" />
76+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf121;" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" TextAlignment="Center" Foreground="#FFFFFF" />
7777
<TextBlock Text="{x:Static resources:Strings.PageEscape}" FontSize="14" HorizontalAlignment="Center" TextAlignment="Center" Margin="0,8,0,0" TextWrapping="Wrap" Foreground="#FFFFFF" />
7878
</StackPanel>
7979
</Button>
80+
<Button x:Name="BtnQrBarcodeDecode" Click="BtnQrBarcodeDecode_Click" Style="{StaticResource CardButtonStyle}" Margin="8">
81+
<StackPanel Width="140" HorizontalAlignment="Center" VerticalAlignment="Center">
82+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf083;" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" TextAlignment="Center" Foreground="#FFFFFF" />
83+
<TextBlock Text="{x:Static resources:Strings.PageQrBarcodeDecode}" FontSize="14" HorizontalAlignment="Center" TextAlignment="Center" Margin="0,8,0,0" TextWrapping="Wrap" Foreground="#FFFFFF" />
84+
</StackPanel>
85+
</Button>
86+
<Button x:Name="BtnRandomString" Click="BtnRandomString_Click" Style="{StaticResource CardButtonStyle}" Margin="8">
87+
<StackPanel Width="140" HorizontalAlignment="Center" VerticalAlignment="Center">
88+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf074;" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" TextAlignment="Center" Foreground="#FFFFFF" />
89+
<TextBlock Text="{x:Static resources:Strings.PageRandomString}" FontSize="14" HorizontalAlignment="Center" TextAlignment="Center" Margin="0,8,0,0" TextWrapping="Wrap" Foreground="#FFFFFF" />
90+
</StackPanel>
91+
</Button>
8092
</UniformGrid>
8193
</Grid>
8294
</Page>

Pages/HomePage.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ private void BtnEscape_Click(object sender, RoutedEventArgs e)
5555
NavigationService?.Navigate(new EscapePage());
5656
}
5757

58+
private void BtnQrBarcodeDecode_Click(object sender, RoutedEventArgs e)
59+
{
60+
NavigationService?.Navigate(new QrBarcodeDecodePage());
61+
}
62+
63+
private void BtnRandomString_Click(object sender, RoutedEventArgs e)
64+
{
65+
NavigationService?.Navigate(new RandomStringPage());
66+
}
67+
5868
private void BtnSettings_Click(object sender, RoutedEventArgs e)
5969
{
6070
NavigationService?.Navigate(new SettingsPage());

Pages/QrBarcodeDecodePage.xaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<Page x:Class="DevTools.Pages.QrBarcodeDecodePage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:resources="clr-namespace:DevTools.Resources"
5+
xmlns:local="clr-namespace:DevTools.Pages"
6+
Title="QrBarcodeDecodePage"
7+
KeyDown="Page_KeyDown">
8+
<Page.Resources>
9+
<BooleanToVisibilityConverter x:Key="BoolToVis" />
10+
</Page.Resources>
11+
<Grid Margin="20">
12+
<StackPanel>
13+
<Button Click="Back_Click" HorizontalAlignment="Left" Margin="0,0,0,8" Width="40" Height="40" ToolTip="{x:Static resources:Strings.Back}">
14+
<Button.Template>
15+
<ControlTemplate TargetType="Button">
16+
<Border Background="#4A4A4A" CornerRadius="20" Width="40" Height="40" SnapsToDevicePixels="True">
17+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf060;" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFF" />
18+
</Border>
19+
</ControlTemplate>
20+
</Button.Template>
21+
</Button>
22+
<TextBlock Text="{x:Static resources:Strings.PageQrBarcodeDecode}" FontSize="18" Margin="0,10" />
23+
24+
<Border x:Name="ImageBorder" CornerRadius="8" BorderBrush="#4A4A4A" BorderThickness="2" Margin="0,10" Height="300" AllowDrop="True" Drop="ImageBorder_Drop" PreviewDragOver="ImageBorder_PreviewDragOver" PreviewDragLeave="ImageBorder_PreviewDragLeave" PreviewMouseLeftButtonDown="ImageBorder_PreviewMouseLeftButtonDown" Cursor="Hand">
25+
<Grid>
26+
<ScrollViewer x:Name="ImageScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Visibility="Collapsed">
27+
<Image x:Name="PreviewImage" Stretch="None" />
28+
</ScrollViewer>
29+
<StackPanel x:Name="PlaceholderPanel" HorizontalAlignment="Center" VerticalAlignment="Center">
30+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf093;" FontSize="48" FontWeight="Bold" HorizontalAlignment="Center" Foreground="#888888" />
31+
<TextBlock Text="{x:Static resources:Strings.ClickOrDropImage}" FontSize="14" HorizontalAlignment="Center" Margin="0,10,0,0" Foreground="#888888" />
32+
</StackPanel>
33+
</Grid>
34+
</Border>
35+
36+
<TextBlock Text="{x:Static resources:Strings.DecodeResult}" FontSize="16" FontWeight="Bold" Margin="0,10,0,5" />
37+
<TextBox x:Name="ResultText" Height="100" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Margin="0,0,0,10" />
38+
39+
<StackPanel Orientation="Horizontal">
40+
<Button Click="CopyResult_Click" Width="100" Height="32" Margin="0,0,10,0" ToolTip="{x:Static resources:Strings.Copy}">
41+
<StackPanel Orientation="Horizontal">
42+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf0c5;" FontSize="14" FontWeight="Bold" Foreground="#FFFFFF" Margin="0,0,6,0" />
43+
<TextBlock Text="{x:Static resources:Strings.Copy}" FontSize="14" Foreground="#FFFFFF" />
44+
</StackPanel>
45+
</Button>
46+
<Button Click="Clear_Click" Width="100" Height="32" ToolTip="{x:Static resources:Strings.Clear}">
47+
<StackPanel Orientation="Horizontal">
48+
<TextBlock FontFamily="{StaticResource FontAwesomeSolid}" Text="&#xf2ed;" FontSize="14" FontWeight="Bold" Foreground="#FFFFFF" Margin="0,0,6,0" />
49+
<TextBlock Text="{x:Static resources:Strings.Clear}" FontSize="14" Foreground="#FFFFFF" />
50+
</StackPanel>
51+
</Button>
52+
</StackPanel>
53+
</StackPanel>
54+
</Grid>
55+
</Page>

0 commit comments

Comments
 (0)