프로젝트

일반

사용자정보

개정판 14540282

ID14540282046aa95b2e491b229dfbc541171cea9a
상위 a999464f
하위 0d6d3734, 1c5bd296

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

dev issue #1230 : command, utill, custom fix

Change-Id: I73b680168848166eeeb682782840a39e118f0d0b

차이점 보기:

DTI_PID/APIDConverter/Utils/GUIUtils.cs
27 27

  
28 28
            return null;
29 29
        }
30

  
31
        public static void InitGUI()
32
        {
33
            //Autodesk.Windows.RibbonItemCollection items = GUI.RibbonHelper.GetPanelItems("ID_PIPE_PANEL");
34
            //object objPipeStyle = GUIUtils.FindItem(items, "PIPESTYLE");
35
            //if (objPipeStyle != null)
36
            //    pipeStyleCombo = objPipeStyle as Autodesk.Windows.RibbonCombo;
37
            //object objAutoLabel = GUIUtils.FindItem(items, "Auto Label");
38
            //if (objAutoLabel != null)
39
            //    autoLabelCheckListButton = objAutoLabel as Autodesk.Windows.RibbonChecklistButton;
40

  
41
            //items = GUI.RibbonHelper.GetPanelItems("ID_SIGNAL_PANEL");
42
            //object objSignalStyle = GUIUtils.FindItem(items, "SIGNALSTYLE");
43
            //if (objSignalStyle != null)
44
            //    signalStyleCombo = objSignalStyle as Autodesk.Windows.RibbonCombo;
45
        }
46
        private void SetAutoLabelUnCehck()
47
        {
48
            //if (autoLabelCheckListButton != null)
49
            //{
50
            //    foreach (var item in autoLabelCheckListButton.Items)
51
            //    {
52
            //        if (item.GetType() == typeof(Autodesk.Windows.RibbonButton))
53
            //        {
54
            //            Autodesk.Windows.RibbonButton ribbonButton = item as Autodesk.Windows.RibbonButton;
55
            //            if (ribbonButton.IsChecked)
56
            //                ribbonButton.IsChecked = false;
57
            //        }
58
            //    }
59
            //}
60
        }
61

  
62
        public static void SetPipeStyle(string style)
63
        {
64
            Autodesk.Windows.RibbonCombo pipeStyleCombo = null;
65
            Autodesk.Windows.RibbonItemCollection items = GUI.RibbonHelper.GetPanelItems("ID_PIPE_PANEL");
66
            object objPipeStyle = GUIUtils.FindItem(items, "PIPESTYLE");
67
            if (objPipeStyle != null)
68
                pipeStyleCombo = objPipeStyle as Autodesk.Windows.RibbonCombo;
69

  
70
            if (pipeStyleCombo.Current != null)
71
            {
72
                Autodesk.Windows.RibbonButton button = pipeStyleCombo.Current as Autodesk.Windows.RibbonButton;
73
                if (button.AutomationName != style)
74
                {
75
                    foreach (var item in pipeStyleCombo.Items)
76
                    {
77
                        Autodesk.Windows.RibbonButton loop = item as Autodesk.Windows.RibbonButton;
78
                        if (loop.AutomationName == style)
79
                        {
80
                            pipeStyleCombo.Current = loop;
81
                            break;
82
                        }
83
                    }
84
                }
85
            }
86
        }
87

  
88
        public static void SetSignalStyle(string style)
89
        {
90
            Autodesk.Windows.RibbonCombo signalStyleCombo = null;
91
            Autodesk.Windows.RibbonItemCollection items = GUI.RibbonHelper.GetPanelItems("ID_SIGNAL_PANEL");
92
            object objSignalStyle = GUIUtils.FindItem(items, "SIGNALSTYLE");
93
            if (objSignalStyle != null)
94
                signalStyleCombo = objSignalStyle as Autodesk.Windows.RibbonCombo;
95
            if (signalStyleCombo.Current != null)
96
            {
97
                Autodesk.Windows.RibbonButton button = signalStyleCombo.Current as Autodesk.Windows.RibbonButton;
98
                if (button.AutomationName != style)
99
                {
100
                    foreach (var item in signalStyleCombo.Items)
101
                    {
102
                        Autodesk.Windows.RibbonButton loop = item as Autodesk.Windows.RibbonButton;
103
                        if (loop.AutomationName == style)
104
                        {
105
                            signalStyleCombo.Current = loop;
106
                            break;
107
                        }
108
                    }
109
                }
110
            }
111
        }
112

  
113
        
30 114
    }
31 115
}

내보내기 Unified diff

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