C# Class Eto.Drawing.ImageConverter

Converter to convert a string to an Image
Inheritance: System.ComponentModel.TypeConverter
Mostrar archivo Open project: picoe/Eto Class Usage Examples

Public Methods

Method Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Gets a value indicating that this converter can convert from the source type to an image

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Gets a value indicating that this converter can convert to the specified type.

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

Performs the conversion from the given value to an Image object

Protected Methods

Method Description
IsIcon ( string fileName ) : bool

Determines whether the specified fileName is an icon (ends with .ico)

Private Methods

Method Description
LoadImage ( NamespaceInfo ns ) : Image
LoadImage ( Stream stream ) : Image
LoadImage ( string resourceName ) : Image

Method Details

CanConvertFrom() public method

Gets a value indicating that this converter can convert from the source type to an image
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext Conversion context
sourceType System.Type Type to convert from
return bool

CanConvertTo() public method

Gets a value indicating that this converter can convert to the specified type.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext Conversion context
destinationType System.Type Type to convert to
return bool

ConvertFrom() public method

Performs the conversion from the given value to an Image object
public ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object
context ITypeDescriptorContext Conversion context
culture System Culture to perform the conversion
value object Value to convert to an image
return object

IsIcon() protected method

Determines whether the specified fileName is an icon (ends with .ico)
protected IsIcon ( string fileName ) : bool
fileName string File name.
return bool