diff --git a/DeGarbler.sln b/DeGarbler.sln
new file mode 100644
index 0000000..93f2125
--- /dev/null
+++ b/DeGarbler.sln
@@ -0,0 +1,43 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34723.18
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeGarbler", "DeGarbler\DeGarbler.csproj", "{364B70A8-F1CF-4939-A0D5-07670B3AAE80}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|ARM64.Build.0 = Debug|ARM64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|x64.ActiveCfg = Debug|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|x64.Build.0 = Debug|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|x64.Deploy.0 = Debug|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|x86.ActiveCfg = Debug|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|x86.Build.0 = Debug|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Debug|x86.Deploy.0 = Debug|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|ARM64.ActiveCfg = Release|ARM64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|ARM64.Build.0 = Release|ARM64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|ARM64.Deploy.0 = Release|ARM64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|x64.ActiveCfg = Release|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|x64.Build.0 = Release|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|x64.Deploy.0 = Release|x64
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|x86.ActiveCfg = Release|x86
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|x86.Build.0 = Release|x86
+ {364B70A8-F1CF-4939-A0D5-07670B3AAE80}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {CE24FF16-76B7-496C-820A-16C2EEECC2CC}
+ EndGlobalSection
+EndGlobal
diff --git a/DeGarbler/App.xaml b/DeGarbler/App.xaml
new file mode 100644
index 0000000..6067d3c
--- /dev/null
+++ b/DeGarbler/App.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DeGarbler/App.xaml.cs b/DeGarbler/App.xaml.cs
new file mode 100644
index 0000000..ab636d7
--- /dev/null
+++ b/DeGarbler/App.xaml.cs
@@ -0,0 +1,51 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using Microsoft.UI.Xaml.Shapes;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace DeGarbler
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ public partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ ///
+ /// Invoked when the application is launched.
+ ///
+ /// Details about the launch request and process.
+ protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
+ {
+
+ m_window = new MainWindow();
+ m_window.Activate();
+ }
+
+ private Window m_window;
+ }
+}
diff --git a/DeGarbler/Assets/LockScreenLogo.scale-200.png b/DeGarbler/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..c88d70b
Binary files /dev/null and b/DeGarbler/Assets/LockScreenLogo.scale-200.png differ
diff --git a/DeGarbler/Assets/SplashScreen.scale-200.png b/DeGarbler/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..07861de
Binary files /dev/null and b/DeGarbler/Assets/SplashScreen.scale-200.png differ
diff --git a/DeGarbler/Assets/Square150x150Logo.scale-200.png b/DeGarbler/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..924803b
Binary files /dev/null and b/DeGarbler/Assets/Square150x150Logo.scale-200.png differ
diff --git a/DeGarbler/Assets/Square44x44Logo.scale-200.png b/DeGarbler/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..bdaaf24
Binary files /dev/null and b/DeGarbler/Assets/Square44x44Logo.scale-200.png differ
diff --git a/DeGarbler/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/DeGarbler/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..c3d1427
Binary files /dev/null and b/DeGarbler/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/DeGarbler/Assets/StoreLogo.png b/DeGarbler/Assets/StoreLogo.png
new file mode 100644
index 0000000..a4f0901
Binary files /dev/null and b/DeGarbler/Assets/StoreLogo.png differ
diff --git a/DeGarbler/Assets/Wide310x150Logo.scale-200.png b/DeGarbler/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..6dbcb3f
Binary files /dev/null and b/DeGarbler/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/DeGarbler/DeGarbler.csproj b/DeGarbler/DeGarbler.csproj
new file mode 100644
index 0000000..4144ac7
--- /dev/null
+++ b/DeGarbler/DeGarbler.csproj
@@ -0,0 +1,55 @@
+
+
+ WinExe
+ net6.0-windows10.0.19041.0
+ 10.0.17763.0
+ DeGarbler
+ app.manifest
+ x86;x64;ARM64
+ win10-x86;win10-x64;win10-arm64
+ win10-$(Platform).pubxml
+ true
+ true
+ DeGarbler.Program
+ icon.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
diff --git a/DeGarbler/MainWindow.xaml b/DeGarbler/MainWindow.xaml
new file mode 100644
index 0000000..1bf5d47
--- /dev/null
+++ b/DeGarbler/MainWindow.xaml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CP437
+ UTF-8
+ UTF-16
+ ASCII
+
+
+
+ UTF-8
+ UTF-16
+ Unicode
+ ASCII
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DeGarbler/MainWindow.xaml.cs b/DeGarbler/MainWindow.xaml.cs
new file mode 100644
index 0000000..0ac9e82
--- /dev/null
+++ b/DeGarbler/MainWindow.xaml.cs
@@ -0,0 +1,174 @@
+using Microsoft.UI;
+using Microsoft.UI.Windowing;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using System.Text;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace DeGarbler
+{
+ ///
+ /// An empty window that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class MainWindow : Window
+ {
+ private int LastUsed = 0;
+ private int index = 0;
+ private bool IsReady = false;
+ string[] args = null;
+ string[] folders = null;
+ string[] files = null;
+
+ Dictionary Codecs = new Dictionary()
+ {
+ {"Default", System.Text.Encoding.Default },
+ {"Unicode", System.Text.Encoding.Unicode },
+ {"UTF-7", System.Text.Encoding.UTF7 },
+ {"UTF-8", System.Text.Encoding.UTF8 },
+ {"UTF-32", System.Text.Encoding.UTF32 },
+ {"ASCII", System.Text.Encoding.ASCII },
+ {"Latin1", System.Text.Encoding.Latin1 },
+ {"BigEndianUnicode", System.Text.Encoding.BigEndianUnicode }
+ };
+
+ public MainWindow()
+ {
+ System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
+ this.InitializeComponent();
+
+ ExtendsContentIntoTitleBar = true;
+ SetTitleBar(AppTitleBar);
+
+ IntPtr hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this); // m_window in App.cs
+ WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);
+ AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
+ OverlappedPresenter presenter = appWindow.Presenter as OverlappedPresenter;
+
+ Windows.Graphics.SizeInt32 size = new Windows.Graphics.SizeInt32();
+ size.Width = 600;
+ size.Height = 400;
+
+ appWindow.Resize(size);
+ presenter.IsResizable = false;
+
+ Codecs.Add("CP437", System.Text.Encoding.GetEncoding(437));
+ Codecs.Add("Windows-1251", System.Text.Encoding.GetEncoding(1251));
+ Codecs.Add("Windows-1252", System.Text.Encoding.GetEncoding(1252));
+
+ Encoding.SelectedIndex = 0;
+ Decoding.SelectedIndex = 0;
+
+ Encoding.Items.Clear();
+ Decoding.Items.Clear();
+
+ foreach (KeyValuePair item in Codecs)
+ {
+ Encoding.Items.Add(item.Key);
+ Decoding.Items.Add(item.Key);
+ }
+
+ Encoding.SelectedIndex = 0;
+ Decoding.SelectedIndex = 0;
+
+ IsReady = true;
+
+ args = Environment.GetCommandLineArgs();
+ try
+ {
+ folders = Directory.GetDirectories(args[1]);
+ files = Directory.GetFiles(args[1]);
+ Example.Text = Path.GetFileName(files[0]);
+ }
+ catch
+ {
+ FileIndexDown.IsEnabled = false;
+ FileIndexUp.IsEnabled = false;
+ ConfirmButton.IsEnabled = false;
+ AppTitle.Foreground = (SolidColorBrush)Application.Current.Resources["AccentTextFillColorPrimaryBrush"];
+ }
+ }
+
+ private void OnSelectionChangedEncoder(object sender, SelectionChangedEventArgs e)
+ {
+ if (IsReady)
+ {
+ LastUsed = 1;
+ Example.Text = Recode(Path.GetFileName(files[index]), Codecs[(string)Encoding.SelectedItem], Codecs[(string)Decoding.SelectedItem]);
+ }
+ }
+
+ private void OnSelectionChangedDencoder(object sender, SelectionChangedEventArgs e)
+ {
+ if (IsReady)
+ {
+ LastUsed = 1;
+ Example.Text = Recode(Path.GetFileName(files[index]), Codecs[(string)Encoding.SelectedItem], Codecs[(string)Decoding.SelectedItem]);
+ }
+ }
+
+ private void OnSelectionChangedVariants(object sender, SelectionChangedEventArgs e)
+ {
+ LastUsed = 2;
+ }
+
+ private void OnClickAccept(object sender, RoutedEventArgs e)
+ {
+ if (LastUsed == 1)
+ {
+ for (int i = 0; i < files.Length; i++)
+ File.Move(files[i], Path.GetDirectoryName(files[i]) + "\\" + Recode(Path.GetFileName(files[i]), Codecs[(string)Encoding.SelectedItem], Codecs[(string)Decoding.SelectedItem]));
+ for (int i = 0; i < folders.Length; i++)
+ Directory.Move(folders[i], Path.GetDirectoryName(files[i]) + "\\" + Recode(Path.GetFileName(folders[i]), Codecs[(string)Encoding.SelectedItem], Codecs[(string)Decoding.SelectedItem]));
+ }
+ else
+ {
+
+ }
+ this.Close();
+ }
+
+ private void OnClickCancel(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private void OnClickIndexDown(object sender, RoutedEventArgs e)
+ {
+ FileIndexUp.IsEnabled = true;
+ if (index == 0)
+ FileIndexDown.IsEnabled = false;
+ Example.Text = Recode(Path.GetFileName(files[--index]), Codecs[(string)Encoding.SelectedItem], Codecs[(string)Decoding.SelectedItem]);
+ }
+
+ private void OnClickIndexUp(object sender, RoutedEventArgs e)
+ {
+ FileIndexDown.IsEnabled = true;
+ if (index == files.Length - 1)
+ FileIndexUp.IsEnabled= false;
+ Example.Text = Recode(Path.GetFileName(files[++index]), Codecs[(string)Encoding.SelectedItem], Codecs[(string)Decoding.SelectedItem]);
+ }
+
+ private string Recode(string text, Encoding encoding, Encoding decoding)
+ {
+ byte[] encoded = encoding.GetBytes(text);
+ string result = decoding.GetString(encoded);
+ return result;
+ }
+ }
+}
diff --git a/DeGarbler/Package.appxmanifest b/DeGarbler/Package.appxmanifest
new file mode 100644
index 0000000..b9c6231
--- /dev/null
+++ b/DeGarbler/Package.appxmanifest
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+ DeGarbler
+ retrd
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DeGarbler/Properties/launchSettings.json b/DeGarbler/Properties/launchSettings.json
new file mode 100644
index 0000000..d0a45d8
--- /dev/null
+++ b/DeGarbler/Properties/launchSettings.json
@@ -0,0 +1,11 @@
+{
+ "profiles": {
+ "DeGarbler (Package)": {
+ "commandName": "MsixPackage",
+ "commandLineArgs": "\"E:\\Uni\\ЭВМ\\09.03.01 ЭВМ и ПУ\\09.03.01 ╨¡╨Æ╨£ ╨╕ ╨ƒ╨ú\\06_последоват_схемы\""
+ },
+ "DeGarbler (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/DeGarbler/app.manifest b/DeGarbler/app.manifest
new file mode 100644
index 0000000..6e148ff
--- /dev/null
+++ b/DeGarbler/app.manifest
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
\ No newline at end of file
diff --git a/DeGarbler/icon.ico b/DeGarbler/icon.ico
new file mode 100644
index 0000000..99d243b
Binary files /dev/null and b/DeGarbler/icon.ico differ