2023-05-19 21:46:44 +04:00
|
|
|
|
namespace AppView
|
|
|
|
|
{
|
|
|
|
|
public partial class FormMain : Form
|
|
|
|
|
{
|
|
|
|
|
public static int keySize = 50;
|
|
|
|
|
public FormMain()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
private void buttonFilePath_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-20 00:18:29 +04:00
|
|
|
|
using var dialog = new OpenFileDialog { };
|
|
|
|
|
if (dialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
textBoxFilePath.Text = dialog.FileName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void buttonSavepath_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
using var dialog = new OpenFileDialog { };
|
|
|
|
|
if (dialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
textBoxSavePath.Text = dialog.FileName;
|
|
|
|
|
}
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
|
|
|
|
private void buttonKeyPath_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-20 00:18:29 +04:00
|
|
|
|
using var dialog = new OpenFileDialog { };
|
2023-05-19 21:46:44 +04:00
|
|
|
|
if (dialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
textBoxKeyPath.Text = dialog.FileName;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-20 00:18:29 +04:00
|
|
|
|
private void buttonFile2_Click(object sender, EventArgs e)
|
2023-05-19 21:46:44 +04:00
|
|
|
|
{
|
2023-05-20 00:18:29 +04:00
|
|
|
|
using var dialog = new OpenFileDialog { };
|
|
|
|
|
if (dialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
textBoxFile2.Text = dialog.FileName;
|
|
|
|
|
}
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
2023-05-20 00:18:29 +04:00
|
|
|
|
private void buttonCert2_Click(object sender, EventArgs e)
|
2023-05-19 21:46:44 +04:00
|
|
|
|
{
|
2023-05-20 00:18:29 +04:00
|
|
|
|
using var dialog = new OpenFileDialog { };
|
|
|
|
|
if (dialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
textBoxKey2.Text = dialog.FileName;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-20 00:18:29 +04:00
|
|
|
|
private void buttonWriteKey_Click(object sender, EventArgs e)
|
2023-05-19 21:46:44 +04:00
|
|
|
|
{
|
2023-05-25 00:09:20 +04:00
|
|
|
|
|
|
|
|
|
if (Engine.WriteKeyOnFile(textBoxFilePath.Text, textBoxSavePath.Text, textBoxKeyPath.Text))
|
2023-05-20 00:18:29 +04:00
|
|
|
|
{
|
2023-05-25 00:09:20 +04:00
|
|
|
|
MessageBox.Show("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
2023-05-20 00:18:29 +04:00
|
|
|
|
}
|
2023-05-25 00:09:20 +04:00
|
|
|
|
else MessageBox.Show("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
2023-05-20 00:18:29 +04:00
|
|
|
|
private void buttonCheckKey_Click(object sender, EventArgs e)
|
2023-05-19 21:46:44 +04:00
|
|
|
|
{
|
2023-05-25 00:09:20 +04:00
|
|
|
|
if (Engine.CheckKeyinFIle(textBoxFile2.Text, textBoxKeyPath.Text, textBoxKey2.Text, textBoxPass.Text))
|
2023-05-19 21:46:44 +04:00
|
|
|
|
{
|
2023-05-25 00:09:20 +04:00
|
|
|
|
MessageBox.Show("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
2023-05-25 00:09:20 +04:00
|
|
|
|
else MessageBox.Show("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
2023-05-20 00:18:29 +04:00
|
|
|
|
|
2023-05-19 21:46:44 +04:00
|
|
|
|
}
|
|
|
|
|
}
|