private void GetStatus() { if (timerWork) { } else { Dictionary <string, DataBase> sendedList = new Dictionary <string, DataBase>(); timerWork = true; foreach (DataBase nodeBase in AllDataBase) { MyXmlNode node = nodeBase.node; bool started = node.started; bool finished = node.finished; bool downloaded = node.downloaded; string number = node.number; if (started && !finished && !downloaded) { sendedList.Add(ClassCalcConnect.GetChangeNumbStr(number), nodeBase); } } if (sendedList.Count > 0) { int[] status = CppClass.GetStatusFiles(sendedList.Keys.ToArray()); for (int i = 0; i < sendedList.Count; i++) { var item = sendedList.ElementAt(i); item.Value.node.curStatus = status[i]; updateRowByStatus(item.Value); } } timerWork = false; } }