Исправлено закрытие редактора конфигов без открытого файла
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
@@ -64,6 +64,8 @@ namespace ConfigEditor
|
|||||||
}
|
}
|
||||||
|
|
||||||
private bool CheckChanges()
|
private bool CheckChanges()
|
||||||
|
{
|
||||||
|
if (opened_file != null)
|
||||||
{
|
{
|
||||||
if (richTextBox1.Text != File.ReadAllText(opened_file))
|
if (richTextBox1.Text != File.ReadAllText(opened_file))
|
||||||
{
|
{
|
||||||
@@ -77,6 +79,7 @@ namespace ConfigEditor
|
|||||||
else if (result == DialogResult.Cancel)
|
else if (result == DialogResult.Cancel)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user