C# 클래스 RevitLookup.Snoop.Utils

Utility functions to use in the Snoop dialog mechanism.
파일 보기 프로젝트 열기: jeremytammik/RevitLookup

공개 메소드들

메소드 설명
AppendThePropertyObject ( ArrayList data, String propertyName, Object value ) : void
BrowseReflection ( Object obj ) : void

Given an Object, allow the user to browse its properties based on Reflection only.

CopyToClipboard ( ListView lv ) : void

CopyToClipboard ( System.Windows.Forms.ListViewItem lvItem, System.Boolean multipleItems ) : void

DataItemSelected ( ListView lvCur ) : void

A Snoop.Data item was selected in the ListView. Call its DrillDown() function to get more detailed info about it.

Display ( ListView lvCur, Snoop snoopCollector ) : void

Given a ListView to display the data in, clear it out and add all the data that has been collected. For things that have a DrillDown, change the font to Bold so the user knows they can select it. For things that are a Separator, change the background color.

GetMaximumColumnWidths ( ListView lv ) : System.Int32[]

GetPrintDocumentName ( TreeNode node ) : String

GetRootNode ( TreeNode node ) : TreeNode

HorizontalAlignmentToStringAligment ( HorizontalAlignment ha ) : StringAlignment

IsKeyValuePair ( object o ) : bool

Check if the object type is KeyValuePair.

IsSupportedType ( Object value ) : bool

Check if the given instance is the basic types we supported.

ObjToLabelStr ( System obj ) : string

Same as above, but this is used when we are already grouping the objects by Type in a TreeCtrl. Including the Type name would be redundant.

ObjToTypeStr ( System obj ) : string

Format a type string to represent a given object. If it is an Element, we try to get some extra information that may be useful, such as the Name and the ElementId. If it isn't an Element then just print out

Print ( String title, ListView lv, System e, Int32 maxFieldWidth, Int32 maxValueWidth, Int32 currentItem ) : Int32

PrintMenuItemClick ( System.Windows.Forms.PrintDialog dlg ) : void

PrintMenuItemClick ( System.Windows.Forms.PrintDialog dlg, TreeView tv ) : void

PrintPreviewMenuItemClick ( System.Windows.Forms.PrintPreviewDialog dlg, ListView lv ) : void

PrintPreviewMenuItemClick ( System.Windows.Forms.PrintPreviewDialog dlg, TreeView tv ) : void

StreamWithReflection ( ArrayList data, Type type, Object instance ) : void

Stream the property with reflection.

UpdatePrintSettings ( ListView lv, Int32 &widthArray ) : void

UpdatePrintSettings ( System.Drawing.Printing.PrintDocument doc, TreeView tv, ListView lv, Int32 &widthArray ) : void

Utils ( ) : System

메소드 상세

AppendThePropertyObject() 공개 정적인 메소드

public static AppendThePropertyObject ( ArrayList data, String propertyName, Object value ) : void
data System.Collections.ArrayList
propertyName String
value Object
리턴 void

BrowseReflection() 공개 정적인 메소드

Given an Object, allow the user to browse its properties based on Reflection only.
public static BrowseReflection ( Object obj ) : void
obj Object Object to browse
리턴 void

CopyToClipboard() 공개 정적인 메소드

public static CopyToClipboard ( ListView lv ) : void
lv System.Windows.Forms.ListView
리턴 void

CopyToClipboard() 공개 정적인 메소드

public static CopyToClipboard ( System.Windows.Forms.ListViewItem lvItem, System.Boolean multipleItems ) : void
lvItem System.Windows.Forms.ListViewItem
multipleItems System.Boolean
리턴 void

DataItemSelected() 공개 정적인 메소드

A Snoop.Data item was selected in the ListView. Call its DrillDown() function to get more detailed info about it.
public static DataItemSelected ( ListView lvCur ) : void
lvCur System.Windows.Forms.ListView The ListView control in question
리턴 void

Display() 공개 정적인 메소드

Given a ListView to display the data in, clear it out and add all the data that has been collected. For things that have a DrillDown, change the font to Bold so the user knows they can select it. For things that are a Separator, change the background color.
public static Display ( ListView lvCur, Snoop snoopCollector ) : void
lvCur System.Windows.Forms.ListView The ListView UI control to draw into
snoopCollector Snoop The collected data about an object
리턴 void

GetMaximumColumnWidths() 공개 정적인 메소드

public static GetMaximumColumnWidths ( ListView lv ) : System.Int32[]
lv System.Windows.Forms.ListView
리턴 System.Int32[]

GetPrintDocumentName() 공개 정적인 메소드

public static GetPrintDocumentName ( TreeNode node ) : String
node System.Windows.Forms.TreeNode
리턴 String

GetRootNode() 공개 정적인 메소드

public static GetRootNode ( TreeNode node ) : TreeNode
node System.Windows.Forms.TreeNode
리턴 System.Windows.Forms.TreeNode

HorizontalAlignmentToStringAligment() 공개 정적인 메소드

public static HorizontalAlignmentToStringAligment ( HorizontalAlignment ha ) : StringAlignment
ha HorizontalAlignment
리턴 StringAlignment

IsKeyValuePair() 공개 정적인 메소드

Check if the object type is KeyValuePair.
public static IsKeyValuePair ( object o ) : bool
o object
리턴 bool

IsSupportedType() 공개 정적인 메소드

Check if the given instance is the basic types we supported.
public static IsSupportedType ( Object value ) : bool
value Object
리턴 bool

ObjToLabelStr() 공개 정적인 메소드

Same as above, but this is used when we are already grouping the objects by Type in a TreeCtrl. Including the Type name would be redundant.
public static ObjToLabelStr ( System obj ) : string
obj System Object to label
리턴 string

ObjToTypeStr() 공개 정적인 메소드

Format a type string to represent a given object. If it is an Element, we try to get some extra information that may be useful, such as the Name and the ElementId. If it isn't an Element then just print out
public static ObjToTypeStr ( System obj ) : string
obj System Object to label
리턴 string

Print() 공개 정적인 메소드

public static Print ( String title, ListView lv, System e, Int32 maxFieldWidth, Int32 maxValueWidth, Int32 currentItem ) : Int32
title String
lv System.Windows.Forms.ListView
e System
maxFieldWidth System.Int32
maxValueWidth System.Int32
currentItem System.Int32
리턴 System.Int32

PrintMenuItemClick() 공개 정적인 메소드

public static PrintMenuItemClick ( System.Windows.Forms.PrintDialog dlg ) : void
dlg System.Windows.Forms.PrintDialog
리턴 void

PrintMenuItemClick() 공개 정적인 메소드

public static PrintMenuItemClick ( System.Windows.Forms.PrintDialog dlg, TreeView tv ) : void
dlg System.Windows.Forms.PrintDialog
tv System.Windows.Forms.TreeView
리턴 void

PrintPreviewMenuItemClick() 공개 정적인 메소드

public static PrintPreviewMenuItemClick ( System.Windows.Forms.PrintPreviewDialog dlg, ListView lv ) : void
dlg System.Windows.Forms.PrintPreviewDialog
lv System.Windows.Forms.ListView
리턴 void

PrintPreviewMenuItemClick() 공개 정적인 메소드

public static PrintPreviewMenuItemClick ( System.Windows.Forms.PrintPreviewDialog dlg, TreeView tv ) : void
dlg System.Windows.Forms.PrintPreviewDialog
tv System.Windows.Forms.TreeView
리턴 void

StreamWithReflection() 공개 정적인 메소드

Stream the property with reflection.
public static StreamWithReflection ( ArrayList data, Type type, Object instance ) : void
data System.Collections.ArrayList
type System.Type
instance Object
리턴 void

UpdatePrintSettings() 공개 정적인 메소드

public static UpdatePrintSettings ( ListView lv, Int32 &widthArray ) : void
lv System.Windows.Forms.ListView
widthArray System.Int32
리턴 void

UpdatePrintSettings() 공개 정적인 메소드

public static UpdatePrintSettings ( System.Drawing.Printing.PrintDocument doc, TreeView tv, ListView lv, Int32 &widthArray ) : void
doc System.Drawing.Printing.PrintDocument
tv System.Windows.Forms.TreeView
lv System.Windows.Forms.ListView
widthArray System.Int32
리턴 void

Utils() 공개 메소드

public Utils ( ) : System
리턴 System