From a224a888e44a60b9d42cb29663b49b7dd0c50011 Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Fri, 5 Jul 2024 15:46:20 +0800 Subject: [PATCH] =?UTF-8?q?rstray=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=BB=E7=9B=98=E7=9A=84=E7=8A=B6=E6=80=81=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.Controls/RsTray.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Rs.Controls/RsTray.cs b/Rs.Controls/RsTray.cs index fe601b8..d3013ac 100644 --- a/Rs.Controls/RsTray.cs +++ b/Rs.Controls/RsTray.cs @@ -543,10 +543,23 @@ namespace Rs.Controls panel2_Paint(null, null); } } - + private List drawSlots = new List(); private void panel2_MouseUp(object sender, MouseEventArgs e) { drawRegion = false; + drawSlots.Clear(); + foreach (KeyValuePair kvSlot in traySlotsDic) + { + if (drawRect.IntersectsWith(kvSlot.Value.Bound)) + { + drawSlots.Add(kvSlot.Value); + } + } + } + + public List GetDrawSlots() + { + return drawSlots; } public TraySlot SelectSlot { get; set; }