Shuxia Ning
2025-01-17 a0bce3b366451b3ca94e676eb98dd7b415375c14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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;
 
        }
         
 
    }
}