From dad9e55ad1a9598ff9de0fd4c483af5e55958319 Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Sat, 16 Dec 2023 15:59:07 +0900 Subject: [PATCH] =?UTF-8?q?=E6=96=99=E7=9B=98=E5=A2=9E=E5=8A=A0=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E7=A9=B4=E4=BD=8D=E7=9A=84=E7=B4=A2=E5=BC=95=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=A9=B4=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.Controls/RsTray.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Rs.Controls/RsTray.cs b/Rs.Controls/RsTray.cs index a9233bb..c8d9510 100644 --- a/Rs.Controls/RsTray.cs +++ b/Rs.Controls/RsTray.cs @@ -108,6 +108,21 @@ namespace Rs.Controls return null; } + /// + /// 通过穴位的索引获取穴位 + /// + /// + /// + public TraySlot GetSlot(int slotIndex) + { + foreach (KeyValuePair kv in traySlotsDic) + { + if (kv.Key == slotIndex) + return kv.Value; + } + return null; + } + public bool CanDraw { get; set; } = true; private Dictionary traySlotsDic = new Dictionary();