namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 水力流向转换器
|
/// </summary>
|
public class HydroFlowDirectionConverter : StringConverter
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
|
{
|
return true;
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
{
|
var list = new List<string>
|
{
|
HydroFlowDirectionHelper.GetName(Yw.Hydro.FlowDirection.None),
|
HydroFlowDirectionHelper.GetName(Yw.Hydro.FlowDirection.Positive),
|
HydroFlowDirectionHelper.GetName(Yw.Hydro.FlowDirection.Negative)
|
};
|
return new StandardValuesCollection(list);
|
}
|
|
/// <summary>
|
/// 不允许手动输入
|
/// </summary>
|
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
{
|
return true;
|
}
|
|
}
|
}
|