ПИбд-23 Салин Олег Алексеевич Лабораторная работа №7 #17
@ -15,6 +15,8 @@ namespace Monorail.DrawningObjects
|
|||||||
|
|
||||||
public int GetPosX => _startPosX;
|
public int GetPosX => _startPosX;
|
||||||
|
|
||||||
|
char separator = '|';
|
||||||
|
|
||||||
public int GetPosY => _startPosY;
|
public int GetPosY => _startPosY;
|
||||||
|
|
||||||
public int GetWidth => _monoRailWidth;
|
public int GetWidth => _monoRailWidth;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using Monorail.Entities;
|
using Microsoft.VisualBasic.Logging;
|
||||||
|
using Monorail.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -77,6 +77,7 @@ namespace Monorail
|
|||||||
}
|
}
|
||||||
catch (StorageOverflowException ex)
|
catch (StorageOverflowException ex)
|
||||||
{
|
{
|
||||||
|
Log.Warning($"Коллекция {listBoxStorages.SelectedItem.ToString() ?? string.Empty} переполнена");
|
||||||
MessageBox.Show(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -111,10 +112,12 @@ namespace Monorail
|
|||||||
}
|
}
|
||||||
catch (MonorailNotFoundException ex)
|
catch (MonorailNotFoundException ex)
|
||||||
{
|
{
|
||||||
|
Log.Warning($"Не получилось удалить объект из коллекции {listBoxStorages.SelectedItem.ToString() ?? string.Empty}");
|
||||||
MessageBox.Show(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
catch(FormatException ex)
|
catch(FormatException ex)
|
||||||
{
|
{
|
||||||
|
Log.Warning($"Было введено не число");
|
||||||
MessageBox.Show("Введите число");
|
MessageBox.Show("Введите число");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,6 +188,7 @@ MessageBoxIcon.Question) == DialogResult.Yes)
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Log.Warning("Не удалось сохранить");
|
||||||
MessageBox.Show($"Не сохранилось: {ex.Message}",
|
MessageBox.Show($"Не сохранилось: {ex.Message}",
|
||||||
"Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
"Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
|
||||||
@ -210,6 +214,7 @@ MessageBoxIcon.Question) == DialogResult.Yes)
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Log.Warning("Не удалось загрузить");
|
||||||
MessageBox.Show($"Не загрузилось: {ex.Message}",
|
MessageBox.Show($"Не загрузилось: {ex.Message}",
|
||||||
"Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
"Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user