Перемещение основного проекта в отдельную папку

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2025-03-28 20:16:38 +07:00
parent aa59e09e05
commit 116e4cb28f
24 changed files with 126 additions and 111 deletions

38
SaveWizard/Utils.cs Normal file
View File

@@ -0,0 +1,38 @@
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;
namespace SaveWizard
{
static class Utils
{
public static string GenerateMD5(string filename)
{
if (!File.Exists(filename))
return null;
using (var md5 = MD5.Create())
{
using (FileStream stream = File.OpenRead(filename))
md5.ComputeHash(stream);
StringBuilder sb = new StringBuilder();
byte[] hash = md5.Hash;
for (int i = 0; i < hash.Length; i++)
sb.Append(hash[i].ToString("x2"));
return sb.ToString();
}
}
public static void ShowError(string message)
{
MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static void ShowInfo(string message)
{
MessageBox.Show(message, "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}