using System.ComponentModel;
namespace Revit.SDK.Samples.ProjectInfo.CS
{
///
/// Converter used to convert TimeZone
///
public class TimeZoneConverter : TypeConverter
{
#region Methods
///
/// Returns whether this object supports a standard set of values that can be
/// picked from a list, using the specified context.
///
/// true
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
///
/// Returns whether the collection of standard values returned from System.ComponentModel.TypeConverter.GetStandardValues()
/// is an exclusive list.
///
/// true
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return true;
}
///
/// Returns a collection of standard values from the default context for the
/// data type this type converter is designed for.
///
/// Element collection retrieved through filtering current Revit document elements
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
return new StandardValuesCollection(RevitStartInfo.TimeZones);
}
#endregion
};
}