public void result(List <int> list, int radius, int howMany, int speed) { foreach (int value in list) { MainList.Add(DataDot.dots[value].Id); } do { searcherAnimate(MainList, radius, speed); } while (MainList.Count != 0); countColor = -1; countGroup = 0; double getValue = 0; foreach (int value in lastMassCheck) { getValue += value; } lastMassCheck.Clear(); ResultForel resultForel1 = new ResultForel(0, getValue); ResultArray resultArray1 = new ResultArray(resultForel1, groupDots); DataDot.resultArrays.Add(resultArray1); groupDots.Clear(); for (int i = 1; i <= howMany; i++) { foreach (int value in list) { MainList.Add(DataDot.dots[value].Id); } do { searcher(MainList, radius); } while (MainList.Count != 0); countColor = -1; countGroup = 0; getValue = 0; foreach (int value in lastMassCheck) { getValue += value; } lastMassCheck.Clear(); ResultForel resultForel = new ResultForel(i, getValue); ResultArray resultArray = new ResultArray(resultForel, groupDots); DataDot.resultArrays.Add(resultArray); groupDots.Clear(); } }
public ResultArray(ResultForel resultForel, List <GroupDot> list) { this.resultForel = resultForel; foreach (GroupDot value in list) { groupDots.Add(value); } }