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); }
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); }
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); }