Exemplo n.º 1
0
 public void DeleteLoadOnMask(int mask)
 {
     for (int i = 0; i < ListLoadLab.Count(); i++)
     {
         if ((((1 << i) & mask) != 0) && ListLoadLab[i].Bit)
         {
             ListLoadLab[i].Bit = false;
         }
     }
     ListLoadLab.RemoveAll(x => !x.Bit);
 }
Exemplo n.º 2
0
        public List <LoadLab> GetLoadOnMask(int mask)
        {
            var load = new List <LoadLab>();

            for (int i = 0; i < ListLoadLab.Count(); i++)
            {
                if ((((1 << i) & mask) != 0) && ListLoadLab[i].Bit)
                {
                    load.Add(ListLoadLab[i]);
                }
            }
            return(load);
        }
Exemplo n.º 3
0
        public decimal GetSumOnMask(int mask)
        {
            decimal sum = 0;

            for (int i = 0; i < ListLoadLab.Count(); i++)
            {
                if ((((1 << i) & mask) != 0) && ListLoadLab[i].Bit)
                {
                    sum += ListLoadLab[i].CountHourse;
                }
            }
            return(sum);
        }