diff --git a/ProjectLocomotive/ProjectLocomotive/DrawningObject.cs b/ProjectLocomotive/ProjectLocomotive/DrawningObject.cs index e4b3d99..087b5fc 100644 --- a/ProjectLocomotive/ProjectLocomotive/DrawningObject.cs +++ b/ProjectLocomotive/ProjectLocomotive/DrawningObject.cs @@ -31,5 +31,8 @@ namespace ProjectLocomotive // TODO _loc.DrawTransport(g); } + public string getInfo() => _loc?.getDataForSave(); + + public static IDrawningObject Create(string data) => new DrawningObject(data.createDrawningLocomotive()); } } diff --git a/ProjectLocomotive/ProjectLocomotive/IDrawningObject.cs b/ProjectLocomotive/ProjectLocomotive/IDrawningObject.cs index 26a219f..50c50b6 100644 --- a/ProjectLocomotive/ProjectLocomotive/IDrawningObject.cs +++ b/ProjectLocomotive/ProjectLocomotive/IDrawningObject.cs @@ -39,6 +39,8 @@ namespace ProjectLocomotive /// /// (float Left, float Right, float Top, float Bottom) GetCurrentPosition(); + // Получение информации по объекту + string getInfo(); } }