From 0c626b2cb3671f67792c6fa0cfc5f6c73853076d Mon Sep 17 00:00:00 2001 From: Sem730 Date: Fri, 11 Nov 2022 21:06:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20DrawninObject=20=D0=B8=20IDrawningObject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectLocomotive/ProjectLocomotive/DrawningObject.cs | 3 +++ ProjectLocomotive/ProjectLocomotive/IDrawningObject.cs | 2 ++ 2 files changed, 5 insertions(+) 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(); } }