C# 클래스 Revit.SDK.Samples.NewRoof.RoofForms.CS.LevelConverter

The LevelConverter class is inherited from the TypeConverter class which is used to show the property which returns Level type as like a combo box in the PropertyGrid control.
상속: System.ComponentModel.TypeConverter
파일 보기 프로젝트 열기: AMEE/revit 1 사용 예제들

공개 메소드들

메소드 설명
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Override the CanConvertFrom method.

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Override the CanConvertTo method.

ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object

Override the ConvertFrom method, convert a string type value to a level type value.

ConvertTo ( ITypeDescriptorContext context, System culture, object value, Type destinationType ) : object

Override the ConvertTo method, convert a level type value to a string type value for displaying in the PropertyGrid.

GetLevelByID ( int id ) : Level

Get a level by a level id.

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection

Override the StandardValuesCollection method for supplying a level list in the PropertyGrid.

GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool

Override the GetStandardValuesSupported method for displaying a level list in the PropertyGrid.

SetStandardValues ( ReadOnlyCollection levels ) : void

Initialize the levels data.

메소드 상세

CanConvertFrom() 공개 메소드

Override the CanConvertFrom method.
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
리턴 bool

CanConvertTo() 공개 메소드

Override the CanConvertTo method.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext
destinationType System.Type
리턴 bool

ConvertFrom() 공개 메소드

Override the ConvertFrom method, convert a string type value to a level type value.
public ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object
context ITypeDescriptorContext
culture System
value object
리턴 object

ConvertTo() 공개 메소드

Override the ConvertTo method, convert a level type value to a string type value for displaying in the PropertyGrid.
public ConvertTo ( ITypeDescriptorContext context, System culture, object value, Type destinationType ) : object
context ITypeDescriptorContext
culture System
value object
destinationType System.Type
리턴 object

GetLevelByID() 공개 정적인 메소드

Get a level by a level id.
public static GetLevelByID ( int id ) : Level
id int The id of the level
리턴 Level

GetStandardValues() 공개 메소드

Override the StandardValuesCollection method for supplying a level list in the PropertyGrid.
public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
리턴 StandardValuesCollection

GetStandardValuesSupported() 공개 메소드

Override the GetStandardValuesSupported method for displaying a level list in the PropertyGrid.
public GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
리턴 bool

SetStandardValues() 공개 정적인 메소드

Initialize the levels data.
public static SetStandardValues ( ReadOnlyCollection levels ) : void
levels ReadOnlyCollection
리턴 void