From b430508482fbd0271a0d635c2cf61add38ce0a2c Mon Sep 17 00:00:00 2001 From: gg12 darfren Date: Fri, 10 Nov 2023 08:57:13 +0400 Subject: [PATCH] jaga jaga 3.0 --- Monorail/Monorail/FormMonorailCollection.cs | 2 +- Monorail/Monorail/FormMonorailConfig.cs | 9 ++------- Monorail/Monorail/MonorailDelegate.cs | 12 ------------ 3 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 Monorail/Monorail/MonorailDelegate.cs diff --git a/Monorail/Monorail/FormMonorailCollection.cs b/Monorail/Monorail/FormMonorailCollection.cs index 5f84667..d0a214f 100644 --- a/Monorail/Monorail/FormMonorailCollection.cs +++ b/Monorail/Monorail/FormMonorailCollection.cs @@ -61,7 +61,7 @@ namespace Monorail } FormMonorailConfig form = new(); form.Show(); - MonorailDelegate? monorailDelegate = new((m) => { + Action? monorailDelegate = new((m) => { bool q = (obj + m); if (q) { diff --git a/Monorail/Monorail/FormMonorailConfig.cs b/Monorail/Monorail/FormMonorailConfig.cs index 545e9de..54892b8 100644 --- a/Monorail/Monorail/FormMonorailConfig.cs +++ b/Monorail/Monorail/FormMonorailConfig.cs @@ -15,14 +15,9 @@ namespace Monorail { DrawningMonorail? _monorail = null; - private event MonorailDelegate? EventAddMonorail; + private event Action? EventAddMonorail; - DrawningMonorail SelectedMonorail(DrawningMonorail monorail) - { - return _monorail; - } - - public void AddEvent(MonorailDelegate ev) + public void AddEvent(Action ev) { if (EventAddMonorail == null) { diff --git a/Monorail/Monorail/MonorailDelegate.cs b/Monorail/Monorail/MonorailDelegate.cs deleted file mode 100644 index 99fee30..0000000 --- a/Monorail/Monorail/MonorailDelegate.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Monorail.DrawningObjects; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Monorail -{ - public delegate void MonorailDelegate(DrawningMonorail monorail); - -}