Исправлено закрытие редактора конфигов без открытого файла

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2025-06-23 21:42:48 +07:00
parent 8ac9d34d09
commit b4e011e377

View File

@@ -64,6 +64,8 @@ namespace ConfigEditor
}
private bool CheckChanges()
{
if (opened_file != null)
{
if (richTextBox1.Text != File.ReadAllText(opened_file))
{
@@ -77,6 +79,7 @@ namespace ConfigEditor
else if (result == DialogResult.Cancel)
return false;
}
}
return true;
}