336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
일전에 DexExpress 에서는 Collapse Project라는 항목으로 처리 했는데,
DevExpress가 없는곳에서는 이렇게 메크로를 사용해서 처리 하면 될듯 합니다.
도구 - 메크로 -메크로 탐색기(ALT+F8)
메크로 추가 - 빌드
도구 - 옵션 - 키보드 - 다음문자열 포함하는 명령 - 매크로 명 으로 검색 - 키 assign.( ALT + C )
1 Imports System 2 Imports EnvDTE 3 Imports EnvDTE80 4 Imports EnvDTE90 5 Imports System.Diagnostics 6 7 Public Module CollapseAll 8 Sub CollapseAll() 9 ' Get the the Solution Explorer tree 10 Dim UIHSolutionExplorer As UIHierarchy 11 UIHSolutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object() 12 ' Check if there is any open solution 13 If (UIHSolutionExplorer.UIHierarchyItems.Count = 0) Then 14 ' MsgBox("Nothing to collapse. You must have an open solution.") 15 Return 16 End If 17 ' Get the top node (the name of the solution) 18 Dim UIHSolutionRootNode As UIHierarchyItem 19 UIHSolutionRootNode = UIHSolutionExplorer.UIHierarchyItems.Item(1) 20 UIHSolutionExplorer = Nothing 21 UIHSolutionRootNode.DTE.SuppressUI = True 22 ' Collapse each project node 23 Dim UIHItem As UIHierarchyItem 24 For Each UIHItem In UIHSolutionRootNode.UIHierarchyItems 25 'UIHItem.UIHierarchyItems.Expanded = False 26 If UIHItem.UIHierarchyItems.Expanded Then 27 Collapse(UIHItem) 28 End If 29 Next 30 ' Select the solution node, or else when you click 31 ' on the solution window 32 ' scrollbar, it will synchronize the open document 33 ' with the tree and pop 34 ' out the corresponding node which is probably not what you want. 35 UIHSolutionRootNode.Select(vsUISelectionType.vsUISelectionTypeSelect) 36 UIHSolutionRootNode.DTE.SuppressUI = False 37 UIHSolutionRootNode = Nothing 38 End Sub 39 40 Private Sub Collapse(ByVal item As UIHierarchyItem) 41 For Each eitem As UIHierarchyItem In item.UIHierarchyItems 42 If eitem.UIHierarchyItems.Expanded AndAlso eitem.UIHierarchyItems.Count > 0 Then 43 Collapse(eitem) 44 End If 45 Next 46 item.UIHierarchyItems.Expanded = False 47 End Sub 48 End Module 49
'참고 소스코드' 카테고리의 다른 글
Table Parsing 함수 입니다. (0) | 2012.04.22 |
---|---|
ICollection 을 상속받은 Contains의 호출 (0) | 2012.04.09 |
닷넷에서 Console.Write의 구조. (0) | 2012.01.06 |
C#에서 Process 결과값 덤프. (0) | 2011.09.02 |
Asp.Net Ajax (0) | 2011.09.01 |