diff --git a/JsonCanonicalizer.UI/JsonCanonicalizer.UI.csproj b/JsonCanonicalizer.UI/JsonCanonicalizer.UI.csproj
new file mode 100644
index 0000000..1dac222
--- /dev/null
+++ b/JsonCanonicalizer.UI/JsonCanonicalizer.UI.csproj
@@ -0,0 +1,15 @@
+
+
+
+ WinExe
+ net8.0-windows
+ enable
+ true
+ enable
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/JsonCanonicalizer.UI/OneFileTaskForm.Designer.cs b/JsonCanonicalizer.UI/OneFileTaskForm.Designer.cs
new file mode 100644
index 0000000..78463b4
--- /dev/null
+++ b/JsonCanonicalizer.UI/OneFileTaskForm.Designer.cs
@@ -0,0 +1,145 @@
+namespace JsonCanonicalizer.UI
+{
+ partial class OneFileTaskForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ lblSrcFile = new Label();
+ txtSrcFile = new TextBox();
+ btnSrcFile = new Button();
+ txtDstFile = new TextBox();
+ lblDstFile = new Label();
+ btnDstFile = new Button();
+ btnDoIt = new Button();
+ dlgSrcFile = new OpenFileDialog();
+ dlgDstFile = new SaveFileDialog();
+ SuspendLayout();
+ //
+ // lblSrcFile
+ //
+ lblSrcFile.AutoSize = true;
+ lblSrcFile.Location = new Point(12, 15);
+ lblSrcFile.Name = "lblSrcFile";
+ lblSrcFile.Size = new Size(99, 15);
+ lblSrcFile.TabIndex = 0;
+ lblSrcFile.Text = "Исходный файл:";
+ //
+ // txtSrcFile
+ //
+ txtSrcFile.Location = new Point(117, 12);
+ txtSrcFile.Name = "txtSrcFile";
+ txtSrcFile.Size = new Size(377, 23);
+ txtSrcFile.TabIndex = 1;
+ //
+ // btnSrcFile
+ //
+ btnSrcFile.Location = new Point(500, 12);
+ btnSrcFile.Name = "btnSrcFile";
+ btnSrcFile.Size = new Size(79, 23);
+ btnSrcFile.TabIndex = 2;
+ btnSrcFile.Text = ". . .";
+ btnSrcFile.UseVisualStyleBackColor = true;
+ btnSrcFile.Click += btnSrcFile_Click;
+ //
+ // txtDstFile
+ //
+ txtDstFile.Location = new Point(117, 41);
+ txtDstFile.Name = "txtDstFile";
+ txtDstFile.Size = new Size(377, 23);
+ txtDstFile.TabIndex = 3;
+ //
+ // lblDstFile
+ //
+ lblDstFile.AutoSize = true;
+ lblDstFile.Location = new Point(12, 44);
+ lblDstFile.Name = "lblDstFile";
+ lblDstFile.Size = new Size(63, 15);
+ lblDstFile.TabIndex = 4;
+ lblDstFile.Text = "Результат:";
+ //
+ // btnDstFile
+ //
+ btnDstFile.Location = new Point(500, 41);
+ btnDstFile.Name = "btnDstFile";
+ btnDstFile.Size = new Size(79, 23);
+ btnDstFile.TabIndex = 5;
+ btnDstFile.Text = ". . .";
+ btnDstFile.UseVisualStyleBackColor = true;
+ btnDstFile.Click += btnDstFile_Click;
+ //
+ // btnDoIt
+ //
+ btnDoIt.Location = new Point(500, 77);
+ btnDoIt.Name = "btnDoIt";
+ btnDoIt.Size = new Size(79, 46);
+ btnDoIt.TabIndex = 6;
+ btnDoIt.Text = "DO IT";
+ btnDoIt.UseVisualStyleBackColor = true;
+ btnDoIt.Click += this.btnDoIt_Click;
+ //
+ // dlgSrcFile
+ //
+ dlgSrcFile.Filter = "Файлы JSON|*.json|Все файлы|*";
+ dlgSrcFile.Title = "Файл для каноникализации";
+ //
+ // dlgDstFile
+ //
+ dlgDstFile.Filter = "Файлы JSON|*.json|Все файлы|*";
+ dlgDstFile.Title = "Каноникализированный файл";
+ //
+ // OneFileTaskForm
+ //
+ AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(591, 135);
+ Controls.Add(btnDoIt);
+ Controls.Add(btnDstFile);
+ Controls.Add(lblDstFile);
+ Controls.Add(txtDstFile);
+ Controls.Add(btnSrcFile);
+ Controls.Add(txtSrcFile);
+ Controls.Add(lblSrcFile);
+ FormBorderStyle = FormBorderStyle.FixedDialog;
+ Name = "OneFileTaskForm";
+ Text = "Каноникализатор JSON";
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ #endregion
+
+ private Label lblSrcFile;
+ private TextBox txtSrcFile;
+ private Button btnSrcFile;
+ private TextBox txtDstFile;
+ private Label lblDstFile;
+ private Button btnDstFile;
+ private Button btnDoIt;
+ private OpenFileDialog dlgSrcFile;
+ private SaveFileDialog dlgDstFile;
+ }
+}
diff --git a/JsonCanonicalizer.UI/OneFileTaskForm.cs b/JsonCanonicalizer.UI/OneFileTaskForm.cs
new file mode 100644
index 0000000..2f8998c
--- /dev/null
+++ b/JsonCanonicalizer.UI/OneFileTaskForm.cs
@@ -0,0 +1,61 @@
+namespace JsonCanonicalizer.UI;
+
+public partial class OneFileTaskForm : Form
+{
+ public OneFileTaskForm()
+ {
+ InitializeComponent();
+ }
+
+ private void btnSrcFile_Click(object sender, EventArgs e)
+ {
+ dlgSrcFile.FileName = txtSrcFile.Text;
+ if (dlgSrcFile.ShowDialog() == DialogResult.OK)
+ {
+ txtSrcFile.Text = dlgSrcFile.FileName;
+ }
+ }
+
+ private void btnDstFile_Click(object sender, EventArgs e)
+ {
+ dlgDstFile.FileName = txtDstFile.Text;
+ if (dlgDstFile.ShowDialog() == DialogResult.OK)
+ {
+ txtDstFile.Text = dlgDstFile.FileName;
+ }
+ }
+
+ private void btnDoIt_Click(object sender, EventArgs e)
+ {
+ if (String.IsNullOrWhiteSpace(txtSrcFile.Text))
+ {
+ MessageBox.Show(" ", Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
+ if (String.IsNullOrWhiteSpace(txtDstFile.Text))
+ {
+ MessageBox.Show(" ", Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
+ if (!File.Exists(txtSrcFile.Text))
+ {
+ MessageBox.Show(" ", Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+
+ try
+ {
+ using Stream src = new FileStream(txtSrcFile.Text, FileMode.Open);
+ using Stream dst = new FileStream(txtDstFile.Text, FileMode.Create);
+ BL.Canonicalizer.Canonicalize(src, dst);
+
+ MessageBox.Show("", Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+}
diff --git a/JsonCanonicalizer.UI/OneFileTaskForm.resx b/JsonCanonicalizer.UI/OneFileTaskForm.resx
new file mode 100644
index 0000000..067fc94
--- /dev/null
+++ b/JsonCanonicalizer.UI/OneFileTaskForm.resx
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+ 156, 17
+
+
\ No newline at end of file
diff --git a/JsonCanonicalizer.UI/Program.cs b/JsonCanonicalizer.UI/Program.cs
new file mode 100644
index 0000000..f308cdb
--- /dev/null
+++ b/JsonCanonicalizer.UI/Program.cs
@@ -0,0 +1,17 @@
+namespace JsonCanonicalizer.UI
+{
+ internal static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
+ Application.Run(new OneFileTaskForm());
+ }
+ }
+}
\ No newline at end of file
diff --git a/JsonCanonicalizer.sln b/JsonCanonicalizer.sln
index 0f9e7b4..6b5ce38 100644
--- a/JsonCanonicalizer.sln
+++ b/JsonCanonicalizer.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonCanonicalizer.BL", "Jso
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonCanonicalizer.Test", "JsonCanicalizer.Test\JsonCanonicalizer.Test.csproj", "{E43C66DF-FE35-4752-8201-A08E807122DB}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonCanonicalizer.UI", "JsonCanonicalizer.UI\JsonCanonicalizer.UI.csproj", "{4F6E83B8-D21F-412A-83C9-71BB82A82C92}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@ Global
{E43C66DF-FE35-4752-8201-A08E807122DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E43C66DF-FE35-4752-8201-A08E807122DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E43C66DF-FE35-4752-8201-A08E807122DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F6E83B8-D21F-412A-83C9-71BB82A82C92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F6E83B8-D21F-412A-83C9-71BB82A82C92}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F6E83B8-D21F-412A-83C9-71BB82A82C92}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F6E83B8-D21F-412A-83C9-71BB82A82C92}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE