namespace Yw.WinFrmUI.Phart
{
///
/// 验证辅助类
///
public class PhartVerifyHelper
{
///
/// 拟合数量是否有效
///
public static bool VerifyCount(Yw.Ahart.eFeatType feat_type, int pt_count)
{
switch (feat_type)
{
case Ahart.eFeatType.Cubic:
{
if (pt_count < 4)
{
TipFormHelper.ShowInfo("点数少于4个点");
return false;
}
}
break;
case Ahart.eFeatType.Through:
{
if (pt_count < 1)
{
TipFormHelper.ShowInfo("点数少于1个点");
return false;
}
}
break;
case Ahart.eFeatType.Quadratic:
{
if (pt_count < 3)
{
TipFormHelper.ShowInfo("点数少于3个点");
return false;
}
}
break;
case Ahart.eFeatType.Quartic:
{
if (pt_count < 5)
{
TipFormHelper.ShowInfo("点数少于5个点");
return false;
}
}
break;
}
return true;
}
}
}