Add project files.
@@ -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
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Application
|
||||||
|
x:Class="DeGarbler.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:DeGarbler">
|
||||||
|
<Application.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||||
|
<!-- Other merged dictionaries here -->
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
<!-- Other app resources here -->
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
||||||
@@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides application-specific behavior to supplement the default Application class.
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 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().
|
||||||
|
/// </summary>
|
||||||
|
public App()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invoked when the application is launched.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">Details about the launch request and process.</param>
|
||||||
|
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
|
||||||
|
{
|
||||||
|
|
||||||
|
m_window = new MainWindow();
|
||||||
|
m_window.Activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Window m_window;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 45 KiB |
@@ -0,0 +1,55 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||||
|
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||||
|
<RootNamespace>DeGarbler</RootNamespace>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<Platforms>x86;x64;ARM64</Platforms>
|
||||||
|
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||||
|
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
|
||||||
|
<UseWinUI>true</UseWinUI>
|
||||||
|
<EnableMsixTooling>true</EnableMsixTooling>
|
||||||
|
<StartupObject>DeGarbler.Program</StartupObject>
|
||||||
|
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||||
|
<Content Include="Assets\LockScreenLogo.scale-200.png" />
|
||||||
|
<Content Include="Assets\Square150x150Logo.scale-200.png" />
|
||||||
|
<Content Include="Assets\Square44x44Logo.scale-200.png" />
|
||||||
|
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||||
|
<Content Include="Assets\StoreLogo.png" />
|
||||||
|
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||||
|
<Content Include="icon.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.230913002" />
|
||||||
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
|
||||||
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||||
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
|
||||||
|
Tools extension to be activated for this project even if the Windows App SDK Nuget
|
||||||
|
package has not yet been restored.
|
||||||
|
-->
|
||||||
|
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
|
||||||
|
<ProjectCapability Include="Msix" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
|
||||||
|
Explorer "Package and Publish" context menu entry to be enabled for this project even if
|
||||||
|
the Windows App SDK Nuget package has not yet been restored.
|
||||||
|
-->
|
||||||
|
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
|
||||||
|
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LayoutDir />
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Window
|
||||||
|
x:Class="DeGarbler.MainWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:DeGarbler"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Window.SystemBackdrop>
|
||||||
|
<MicaBackdrop Kind="Base"/>
|
||||||
|
</Window.SystemBackdrop>
|
||||||
|
<Grid x:Name="Root">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="30"/>
|
||||||
|
<RowDefinition Height="70"/>
|
||||||
|
<RowDefinition Height="70"/>
|
||||||
|
<RowDefinition Height="80"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="50"/>
|
||||||
|
<RowDefinition Height="70"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Border x:Name="AppTitleBar" Grid.Row="0" Grid.ColumnSpan="4" VerticalAlignment="Top">
|
||||||
|
<StackPanel Orientation="Horizontal" Height="30" Background="{StaticResource ControlFillColorDefault}">
|
||||||
|
<Image Source="ms-appx:///Assets/StoreLogo.png" VerticalAlignment="Center" Width="20" Height="20" Margin="8,0,0,0"/>
|
||||||
|
<TextBlock x:Name="AppTitle" Text="DeGarbler" VerticalAlignment="Top" Margin="10,6,0,0" Style="{StaticResource CaptionTextBlockStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!--<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="15,0,0,0" Text="DeGarbler" Style="{StaticResource TitleTextBlockStyle}"/>
|
||||||
|
-->
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Text="Try" Margin="10,19,0,0" Style="{StaticResource TitleTextBlockStyle}"/>
|
||||||
|
<ComboBox SelectionChanged="OnSelectionChangedEncoder" x:Name="Encoding" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Stretch" Margin="15,5,0,0" Header="Encode" PlaceholderText="Select a codec">
|
||||||
|
<x:String>CP437</x:String>
|
||||||
|
<x:String>UTF-8</x:String>
|
||||||
|
<x:String>UTF-16</x:String>
|
||||||
|
<x:String>ASCII</x:String>
|
||||||
|
</ComboBox>
|
||||||
|
<FontIcon Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Margin="0,24,0,0" Glyph="" />
|
||||||
|
<ComboBox SelectionChanged="OnSelectionChangedDencoder" x:Name="Decoding" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Stretch" Margin="0,5,15,0" Header="Decode" PlaceholderText="Select a codec">
|
||||||
|
<x:String>UTF-8</x:String>
|
||||||
|
<x:String>UTF-16</x:String>
|
||||||
|
<x:String>Unicode</x:String>
|
||||||
|
<x:String>ASCII</x:String>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Text="Or" Margin="10,19,0,0" Style="{StaticResource TitleTextBlockStyle}"/>
|
||||||
|
<ComboBox SelectionChanged="OnSelectionChangedVariants" x:Name="Variants" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="15,5,15,0" Header="Select from these" PlaceholderText="Maybe one of these correct">
|
||||||
|
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<TextBlock x:Name="Example" Grid.Row="3" Grid.ColumnSpan="4" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" Text="Testing the recoded text" Style="{StaticResource TitleTextBlockStyle}"/>
|
||||||
|
|
||||||
|
<Grid Grid.Row="5" Grid.ColumnSpan="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="FileIndexDown" Click="OnClickIndexDown" IsEnabled="False" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
|
<FontIcon Glyph=""/>
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="FileIndexUp" Click="OnClickIndexUp" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
|
<FontIcon Glyph=""/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<StackPanel Background="{StaticResource ControlFillColorDefault}" Grid.Row="6" Grid.ColumnSpan="4" Orientation="Horizontal">
|
||||||
|
<Button Click="OnClickAccept" x:Name="ConfirmButton" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="15,0,0,0" Style="{StaticResource AccentButtonStyle}" Content="Degarble"/>
|
||||||
|
<Button Click="OnClickCancel" x:Name="CancelButton" RelativePanel.RightOf="ConfirmButton" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="15,0,0,0" Content="Cancel"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
@@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An empty window that can be used on its own or navigated to within a Frame.
|
||||||
|
/// </summary>
|
||||||
|
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<string, System.Text.Encoding> Codecs = new Dictionary<string, Encoding>()
|
||||||
|
{
|
||||||
|
{"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<string, Encoding> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<Package
|
||||||
|
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||||
|
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||||
|
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||||
|
xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2"
|
||||||
|
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
|
||||||
|
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||||
|
IgnorableNamespaces="uap rescap">
|
||||||
|
|
||||||
|
<Identity
|
||||||
|
Name="91cd5ba7-0ca2-440e-8df1-fc2899791237"
|
||||||
|
Publisher="CN=retrd"
|
||||||
|
Version="1.0.0.0" />
|
||||||
|
|
||||||
|
<mp:PhoneIdentity PhoneProductId="91cd5ba7-0ca2-440e-8df1-fc2899791237" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||||
|
|
||||||
|
<Properties>
|
||||||
|
<DisplayName>DeGarbler</DisplayName>
|
||||||
|
<PublisherDisplayName>retrd</PublisherDisplayName>
|
||||||
|
<Logo>Assets\StoreLogo.png</Logo>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Dependencies>
|
||||||
|
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
</Dependencies>
|
||||||
|
|
||||||
|
<Resources>
|
||||||
|
<Resource Language="x-generate"/>
|
||||||
|
</Resources>
|
||||||
|
|
||||||
|
<Applications>
|
||||||
|
<Application Id="App"
|
||||||
|
Executable="$targetnametoken$.exe"
|
||||||
|
EntryPoint="$targetentrypoint$">
|
||||||
|
<uap:VisualElements
|
||||||
|
DisplayName="DeGarbler"
|
||||||
|
Description="DeGarbler"
|
||||||
|
BackgroundColor="transparent"
|
||||||
|
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||||
|
Square44x44Logo="Assets\Square44x44Logo.png">
|
||||||
|
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
|
||||||
|
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||||
|
</uap:VisualElements>
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
|
||||||
|
<Capabilities>
|
||||||
|
<rescap:Capability Name="runFullTrust" />
|
||||||
|
</Capabilities>
|
||||||
|
</Package>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"DeGarbler (Package)": {
|
||||||
|
"commandName": "MsixPackage",
|
||||||
|
"commandLineArgs": "\"E:\\Uni\\ЭВМ\\09.03.01 ЭВМ и ПУ\\09.03.01 ╨¡╨Æ╨£ ╨╕ ╨ƒ╨ú\\06_последоват_схемы\""
|
||||||
|
},
|
||||||
|
"DeGarbler (Unpackaged)": {
|
||||||
|
"commandName": "Project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="DeGarbler.app"/>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- The ID below informs the system that this application is compatible with OS features first introduced in Windows 10.
|
||||||
|
It is necessary to support features in unpackaged applications, for example the custom titlebar implementation.
|
||||||
|
For more info see https://docs.microsoft.com/windows/apps/windows-app-sdk/use-windows-app-sdk-run-time#declare-os-compatibility-in-your-application-manifest -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |