Добавлены логи уровня Warning

This commit is contained in:
Никита Потапов 2023-11-20 20:28:59 +04:00
parent 1b8f4113de
commit 6d3098d62b

View File

@ -65,6 +65,7 @@ namespace ProjectStormtrooper
if (string.IsNullOrEmpty(textBoxStorageName.Text))
{
MessageBox.Show("Не все данные заполнены", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
_logger.LogWarning("Неудачная попытка добавить хранилище: не все данные заполнены");
return;
}
_storage.AddSet(textBoxStorageName.Text);
@ -158,6 +159,7 @@ namespace ProjectStormtrooper
}
if (MessageBox.Show("Удалить объект?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
_logger.LogWarning("Отмена удаления объекта");
return;
}
int pos = Convert.ToInt32(maskedTextBoxNumber.Text);