private void updateDownloadRows() { if (timerWorkDownload) { } else { Dictionary <string, DataBase> sendedList = new Dictionary <string, DataBase>(); timerWorkDownload = 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(number, nodeBase); } } if (sendedList.Count > 0) { for (int i = 0; i < sendedList.Count; i++) { var item = sendedList.ElementAt(i); point_c progress = CppClass.GetProgressFile_(item.Key); item.Value.node.curStatus = (int)progress.X_B; if (progress.Y_L == 1) { string stringForParse = CppClass.GetFile_(item.Key); updateRowByStatus(item.Value); //TODO парсим файл item.Value.node.finished = true; item.Value.node.curStatus = -1; item.Value.node.downloaded = false; } updateRowByStatus(item.Value); } } else { downloadedStarted = false; aTimerDownload.Stop(); aTimerDownload = null; } timerWorkDownload = false; } }