프로젝트

일반

사용자정보

개정판 c4c1e3b5

IDc4c1e3b540c913c3a8e28041887f0717b863d639
상위 6348c496
하위 6538207e, aabc2b2d

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #000 : add gui util

Change-Id: I21fd274a52418c30dcca6117b10ee3111d6060e6

차이점 보기:

DTI_PID/APIDConverter/AVEVA.PID.CustomizationUtility_ACAD2018_x64.csproj
46 46
    <Reference Include="acmgd">
47 47
      <HintPath>C:\Program Files\Autodesk\AutoCAD 2018\acmgd.dll</HintPath>
48 48
    </Reference>
49
    <Reference Include="AdWindows">
50
      <HintPath>C:\Program Files\Autodesk\AutoCAD 2018\AdWindows.dll</HintPath>
51
    </Reference>
49 52
    <Reference Include="Autodesk.AutoCAD.Interop">
50 53
      <HintPath>C:\Program Files\Autodesk\AutoCAD 2018\Autodesk.AutoCAD.Interop.dll</HintPath>
51 54
      <EmbedInteropTypes>True</EmbedInteropTypes>
......
68 71
    <Compile Include="PIDCustomization.cs" />
69 72
    <Compile Include="Properties\AssemblyInfo.cs" />
70 73
    <Compile Include="Utilities.cs" />
74
    <Compile Include="Utils\GUIUtils.cs" />
71 75
  </ItemGroup>
72 76
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
73 77
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
DTI_PID/APIDConverter/Utils/GUIUtils.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Converter.AVEVA.Util
8
{
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
}

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)