Just killed a man, put a gun against his head, pull the trigger now he is dead...
This commit is contained in:
parent
4479e26b20
commit
b60f29db2b
@ -96,12 +96,11 @@ public partial class FormLocomotiveCollection : Form
|
|||||||
_logger.LogInformation("Добавлен объект: " + locomotive.GetDataForSave());
|
_logger.LogInformation("Добавлен объект: " + locomotive.GetDataForSave());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ObjectNotFoundException) { }
|
catch (Exception ex)
|
||||||
catch (CollectionOverflowException ex)
|
|
||||||
{
|
{
|
||||||
//MessageBox.Show("Не удалось добавить объект");
|
MessageBox.Show($"Объект не добавлен: {ex.Message}", "Результат", MessageBoxButtons.OK,
|
||||||
MessageBox.Show(ex.Message);
|
MessageBoxIcon.Error);
|
||||||
_logger.LogError("Ошибка: {Message}", ex.Message);
|
_logger.LogError($"Ошибка: {ex.Message}", ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +221,7 @@ public partial class FormLocomotiveCollection : Form
|
|||||||
ICollectionGenericObjects<DrawningLocomotive>? collection =
|
ICollectionGenericObjects<DrawningLocomotive>? collection =
|
||||||
_storageCollection[
|
_storageCollection[
|
||||||
CollectionInfo.GetCollectionInfo(listBoxCollection.SelectedItem.ToString()!) ??
|
CollectionInfo.GetCollectionInfo(listBoxCollection.SelectedItem.ToString()!) ??
|
||||||
new CollectionInfo("", CollectionType.None, "")];
|
new CollectionInfo("", CollectionType.None, "Description")];
|
||||||
if (collection == null)
|
if (collection == null)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Коллекция не проинициализирована");
|
MessageBox.Show("Коллекция не проинициализирована");
|
||||||
@ -231,7 +230,7 @@ public partial class FormLocomotiveCollection : Form
|
|||||||
|
|
||||||
switch (comboBoxSelectorCompany.Text)
|
switch (comboBoxSelectorCompany.Text)
|
||||||
{
|
{
|
||||||
case "Хранилище":
|
case "Депо":
|
||||||
_company = new LocomotiveDepo(pictureBox.Width, pictureBox.Height, collection);
|
_company = new LocomotiveDepo(pictureBox.Width, pictureBox.Height, collection);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -291,7 +290,7 @@ public partial class FormLocomotiveCollection : Form
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_storageCollection.AddCollection(new CollectionInfo(textBoxCollectionName.Text, collectionType, "ХЗ"));
|
_storageCollection.AddCollection(new CollectionInfo(textBoxCollectionName.Text, collectionType, ""));
|
||||||
_logger.LogInformation("Добавление коллекции");
|
_logger.LogInformation("Добавление коллекции");
|
||||||
RerfreshListBoxItems();
|
RerfreshListBoxItems();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user