namespace Yw.WinFrmUI.Phart
|
{
|
/// <summary>
|
/// 验证辅助类
|
/// </summary>
|
public class PhartVerifyHelper
|
{
|
/// <summary>
|
/// 拟合数量是否有效
|
/// </summary>
|
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;
|
|
}
|
|
|
}
|
}
|