private void addToLTL(string line, string check) { if (line.ToLower().Contains(".esm") || FuncParser.checkESM(pathDataFolder + line)) { listToListESM.Add(check + line); } else { listToListESP.Add(check + line); } }
private void checkItem(ListViewItem item, bool check) { int lastIndex = -1; bool goodSort = false; bool hasMasters = false; foreach (string line in FuncParser.parserESPESM(pathDataFolder + item.Text)) { hasMasters = true; ListViewItem findItem = listView1.FindItemWithText(line); if (findItem != null && findItem.Index > lastIndex && item.Index > findItem.Index) { if (!findItem.Checked && check) { checkItem(findItem, true); } lastIndex = findItem.Index; goodSort = true; } else { goodSort = false; goodAllMasters = false; break; } } if (!hasMasters) { goodSort = true; } if (!goodSort) { item.ForeColor = System.Drawing.Color.Red; } else if (item.Text.ToLower().Contains(".esm") || FuncParser.checkESM(pathDataFolder + item.Text)) { item.ForeColor = System.Drawing.Color.Blue; } else { item.ForeColor = System.Drawing.Color.Black; } if (check) { item.Checked = goodAllMasters; } }