├── .gitignore
├── Language.csv
├── README.md
├── TinyGUI.sln
├── TinyGUI.sln.DotSettings.user
├── TinyGUI
├── App.config
├── App.xaml
├── App.xaml.cs
├── Commands
│ └── Command.cs
├── Converters
│ └── IsVisibleConverter.cs
├── Fonts
│ ├── Font Awesome 6 Pro-Solid-900.otf
│ ├── JetBrainsMono
│ │ ├── JetBrainsMono-Bold-Italic.ttf
│ │ ├── JetBrainsMono-Bold.ttf
│ │ ├── JetBrainsMono-BoldItalic.ttf
│ │ ├── JetBrainsMono-ExtraBold.ttf
│ │ ├── JetBrainsMono-ExtraBoldItalic.ttf
│ │ ├── JetBrainsMono-ExtraLight.ttf
│ │ ├── JetBrainsMono-ExtraLightItalic.ttf
│ │ ├── JetBrainsMono-Italic.ttf
│ │ ├── JetBrainsMono-Light.ttf
│ │ ├── JetBrainsMono-LightItalic.ttf
│ │ ├── JetBrainsMono-Medium.ttf
│ │ ├── JetBrainsMono-MediumItalic.ttf
│ │ ├── JetBrainsMono-Regular.ttf
│ │ ├── JetBrainsMono-Thin.ttf
│ │ └── JetBrainsMono-ThinItalic.ttf
│ └── segoe.ttf
├── Images
│ ├── TinyGUI.png
│ ├── panda.ico
│ └── scale
│ │ ├── cover.png
│ │ ├── fit.png
│ │ ├── scale.png
│ │ └── thumb.png
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.de-de.resx
│ ├── Resources.resx
│ ├── Resources.zh-hant.resx
│ ├── Resources.zh.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Styles
│ ├── Button.xaml
│ ├── ComboBoxStyle.xaml
│ ├── Fonts.xaml
│ ├── ScrollViewer.xaml
│ └── TextBox.xaml
├── TinyGUI.csproj
├── ViewModels
│ ├── MainModel.cs
│ └── ViewModelBase.cs
├── Views
│ ├── MainWindow.xaml
│ └── MainWindow.xaml.cs
└── panda.ico
├── donate.jpg
├── icons8-paypal-48.png
├── licence.md
├── microsoft.svg
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | .idea/
3 | .vs/
4 | obj/
5 | /packages/
6 | riderModule.iml
7 | /_ReSharper.Caches/
8 | AppPackages/
9 | BundleArtifacts/
10 | /Installer/
--------------------------------------------------------------------------------
/Language.csv:
--------------------------------------------------------------------------------
1 | KEY,English,中文(简体),Deutsch
2 | Back,Back,返回,Zurück
3 | Chinese,Chinese,中文,Chinesisch
4 | ChooseImageFiles,Choose Image Files,选择图像,Bilddatei auswählen
5 | DropImageHere,Drop Image Here,把图像拖到此处,Bild hier ablegen
6 | English,English,英文,Englisch
7 | File,File,文件,Datei
8 | KeyUrl,https://tinypng.com/developers,https://tinify.cn/developers,https://tinify.cn/developers
9 | Lang,Language,语言,Sprache
10 | ReplaceOriginalImage,Replace Original Image,压缩后替换原文件,Originales Bild ersetzen
11 | ResetKey,Reset API Key,重置API密钥,API Key zurücksetzen
12 | Save,Save,保存,Speichern
13 | SetAPIKey,Set Your API Key,设置你的API密钥,API Key einfügen
14 | Settings,Settings,设置,Einstellungen
15 | SupportMe,Support Me,给个星星,支持一下,Unterstützen Sie mich
16 | Version,Version,版本,Version
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TinyGUI
2 |
3 | 
4 |
5 |
6 |
7 | TinyGUI是TinyPNG的可视化实现,帮助你快速压缩图片。如果你想使用TinyGUI压缩WebP、PNG 或 JPEG图片,请先去 https://tinypng.com/developers 免费获取一个API Key。
8 |
9 | TinyGUI is a visual implementation of TinyPNG that helps you compress images quickly. If you want to use TinyGUI to compress WebP, PNG or JPEG images, please go to https://tinypng.com/developers to get an API Key for free.
10 |
11 |
12 |
13 | ## 捐助
14 |
15 | 感谢您的捐助,将有助于 TinyGUI 的后续开发,善款将用于硬件、软件、服务器托管等费用。
16 |
17 | 再次感谢您的支持!
18 |
19 | 
20 |
21 | ## Donate
22 |
23 | Thank you for your donation, it will help the subsequent development of TinyGUI, donations will be used for hardware, software, server hosting and other expenses.
24 |
25 | Thanks again for your support!
26 |
27 | 
28 | [PayPal](https://paypal.me/chenjing9412)
--------------------------------------------------------------------------------
/TinyGUI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.1.32210.238
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyGUI", "TinyGUI\TinyGUI.csproj", "{439823D0-9D2D-4FBB-9805-BE38433AFE5D}"
7 | EndProject
8 | Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Installer", "Installer\Installer.wapproj", "{FD9FE64A-E702-45E0-8D2E-967157F3DA3C}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|ARM = Debug|ARM
14 | Debug|ARM64 = Debug|ARM64
15 | Debug|x64 = Debug|x64
16 | Debug|x86 = Debug|x86
17 | Release|Any CPU = Release|Any CPU
18 | Release|ARM = Release|ARM
19 | Release|ARM64 = Release|ARM64
20 | Release|x64 = Release|x64
21 | Release|x86 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|ARM.ActiveCfg = Debug|Any CPU
27 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|ARM.Build.0 = Debug|Any CPU
28 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
29 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|ARM64.Build.0 = Debug|Any CPU
30 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|x64.ActiveCfg = Debug|Any CPU
31 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|x64.Build.0 = Debug|Any CPU
32 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|x86.ActiveCfg = Debug|Any CPU
33 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Debug|x86.Build.0 = Debug|Any CPU
34 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|ARM.ActiveCfg = Release|Any CPU
37 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|ARM.Build.0 = Release|Any CPU
38 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|ARM64.ActiveCfg = Release|Any CPU
39 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|ARM64.Build.0 = Release|Any CPU
40 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|x64.ActiveCfg = Release|Any CPU
41 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|x64.Build.0 = Release|Any CPU
42 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|x86.ActiveCfg = Release|Any CPU
43 | {439823D0-9D2D-4FBB-9805-BE38433AFE5D}.Release|x86.Build.0 = Release|Any CPU
44 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
46 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
47 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|ARM.ActiveCfg = Debug|ARM
48 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|ARM.Build.0 = Debug|ARM
49 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|ARM.Deploy.0 = Debug|ARM
50 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|ARM64.ActiveCfg = Debug|ARM64
51 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|ARM64.Build.0 = Debug|ARM64
52 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|ARM64.Deploy.0 = Debug|ARM64
53 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|x64.ActiveCfg = Debug|x64
54 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|x64.Build.0 = Debug|x64
55 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|x64.Deploy.0 = Debug|x64
56 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|x86.ActiveCfg = Debug|x86
57 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|x86.Build.0 = Debug|x86
58 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Debug|x86.Deploy.0 = Debug|x86
59 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
60 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|Any CPU.Build.0 = Release|Any CPU
61 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|Any CPU.Deploy.0 = Release|Any CPU
62 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|ARM.ActiveCfg = Release|ARM
63 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|ARM.Build.0 = Release|ARM
64 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|ARM.Deploy.0 = Release|ARM
65 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|ARM64.ActiveCfg = Release|ARM64
66 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|ARM64.Build.0 = Release|ARM64
67 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|ARM64.Deploy.0 = Release|ARM64
68 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|x64.ActiveCfg = Release|x64
69 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|x64.Build.0 = Release|x64
70 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|x64.Deploy.0 = Release|x64
71 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|x86.ActiveCfg = Release|x86
72 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|x86.Build.0 = Release|x86
73 | {FD9FE64A-E702-45E0-8D2E-967157F3DA3C}.Release|x86.Deploy.0 = Release|x86
74 | EndGlobalSection
75 | GlobalSection(SolutionProperties) = preSolution
76 | HideSolutionNode = FALSE
77 | EndGlobalSection
78 | GlobalSection(ExtensibilityGlobals) = postSolution
79 | SolutionGuid = {09DB440A-562A-4BE7-9F20-8D62F5A2DBE2}
80 | EndGlobalSection
81 | EndGlobal
82 |
--------------------------------------------------------------------------------
/TinyGUI.sln.DotSettings.user:
--------------------------------------------------------------------------------
1 |
2 | True
3 |
4 | True
5 | True
6 | False
7 | True
8 |
--------------------------------------------------------------------------------
/TinyGUI/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | False
18 |
19 |
20 | -1
21 |
22 |
23 | False
24 |
25 |
26 | False
27 |
28 |
29 | False
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/TinyGUI/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/TinyGUI/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 | using System.Windows;
6 |
7 | namespace TinyGUI
8 | {
9 | public partial class App
10 | {
11 | public static readonly string Version = "1.0.9.0";
12 | private static readonly string[] AvailableLocales = {"zh", "zh-hant", "en", "de-de"};
13 |
14 | protected override void OnStartup(StartupEventArgs e)
15 | {
16 | InitLanguage();
17 | #if !DEBUG
18 | RegisterEvents();
19 | #endif
20 | base.OnStartup(e);
21 | }
22 |
23 | private void RegisterEvents()
24 | {
25 | //Task线程内未捕获异常处理事件
26 | TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
27 |
28 | //UI线程未捕获异常处理事件(UI主线程)
29 | this.DispatcherUnhandledException += App_DispatcherUnhandledException;
30 |
31 | //非UI线程未捕获异常处理事件
32 | AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
33 | }
34 |
35 | private void InitLanguage()
36 | {
37 | switch (TinyGUI.Properties.Settings.Default.LanguageIndex)
38 | {
39 | case -1:
40 | String lang = System.Globalization.CultureInfo.CurrentCulture.Name;
41 | if (!string.IsNullOrEmpty(lang) && lang.ToLower().Contains("zh"))
42 | {
43 | Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(AvailableLocales[0]);
44 | TinyGUI.Properties.Settings.Default.LanguageIndex = 0;
45 | }
46 | else
47 | {
48 | Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(AvailableLocales[2]);
49 | TinyGUI.Properties.Settings.Default.LanguageIndex = 2;
50 | }
51 |
52 | break;
53 | case 0:
54 | Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(AvailableLocales[0]);
55 | break;
56 | case 1:
57 | Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(AvailableLocales[1]);
58 | break;
59 | case 2:
60 | Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(AvailableLocales[2]);
61 | break;
62 | case 3:
63 | Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(AvailableLocales[3]);
64 | break;
65 | }
66 | }
67 |
68 | private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
69 | {
70 | try
71 | {
72 | if (e.Exception is Exception exception)
73 | {
74 | HandleException(exception);
75 | }
76 | }
77 | catch (Exception ex)
78 | {
79 | HandleException(ex);
80 | }
81 | finally
82 | {
83 | e.SetObserved();
84 | }
85 | }
86 |
87 | //非UI线程未捕获异常处理事件
88 | private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
89 | {
90 | try
91 | {
92 | if (e.ExceptionObject is Exception exception)
93 | {
94 | HandleException(exception);
95 | }
96 | }
97 | catch (Exception ex)
98 | {
99 | HandleException(ex);
100 | }
101 | }
102 |
103 | //UI线程未捕获异常处理事件
104 | private static void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
105 | {
106 | try
107 | {
108 | HandleException(e.Exception);
109 | }
110 | catch (Exception ex)
111 | {
112 | HandleException(ex);
113 | }
114 | finally
115 | {
116 | e.Handled = true;
117 | }
118 | }
119 |
120 | private static void HandleException(Exception e)
121 | {
122 | MessageBox.Show(e.InnerException != null ? e.InnerException.Message : e.Message, "ERROR");
123 | }
124 | }
125 | }
--------------------------------------------------------------------------------
/TinyGUI/Commands/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 |
4 | namespace TinyGUI.Commands
5 | {
6 | public class Command : ICommand
7 | {
8 | private readonly Action