hytos / DTI_PID / APIDConverter / Utils / GUIUtils.cs @ b29f7bd5
이력 | 보기 | 이력해설 | 다운로드 (951 Bytes)
1 | c4c1e3b5 | gaqhf | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | |||
7 | aabc2b2d | gaqhf | namespace AVEVA.PID.CustomizationUtility |
8 | c4c1e3b5 | gaqhf | { |
9 | public class GUIUtils |
||
10 | { |
||
11 | public static object FindItem(Autodesk.Windows.RibbonItemCollection items, string automationName) |
||
12 | { |
||
13 | foreach (var item in items) |
||
14 | { |
||
15 | if (item.AutomationName == automationName) |
||
16 | return item; |
||
17 | else if (item.GetType() == typeof(Autodesk.Windows.RibbonRowPanel)) |
||
18 | { |
||
19 | Autodesk.Windows.RibbonRowPanel rowPanel = item as Autodesk.Windows.RibbonRowPanel; |
||
20 | foreach (var item2 in rowPanel.Items) |
||
21 | { |
||
22 | if (item2.AutomationName == automationName) |
||
23 | return item2; |
||
24 | } |
||
25 | } |
||
26 | } |
||
27 | |||
28 | return null; |
||
29 | } |
||
30 | } |
||
31 | } |