tangxu
2024-03-09 ebe1b29ddb5ad27698487cd830b42a042ff28c3a
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.Model 
{
    public  class ReservoirParas
    {
        public ReservoirParas() { }
        public ReservoirParas(double level, double area,double volume)
        {
            Level = level;
            Area = area;
            Volume = volume;
        }
 
        //为以后不同水位不同面积做设置
        public double Level { get; set; }
        public double Area { get; set; }
        public double Volume { get; set; }
 
 
        public static  bool IsSample(List<ReservoirParas> list1,List<ReservoirParas> list2)
        {
            if(list1 == null || list2 == null) return false;
 
            if(list1.Count !=  list2.Count) return false;
 
            for(int i = 0;i<list1.Count;i++)
            {
                if (list1[i].Level != list2[i].Level)
                    return false;
                if (list1[i].Area != list2[i].Area)
                    return false;
                if (list1[i].Volume != list2[i].Volume)
                    return false;
            }
 
            return true;
        }
    }
 
 
}