private void button6_Click(object sender, EventArgs e) { string bindPath = BindFileConfig.Instance.FolderPath; List <RawDataItem> rawDataList = BadgeRawData.Read(); List <RawBadgeItem> badges = new List <RawBadgeItem>(); foreach (RawDataItem rdi in rawDataList) { badges.AddRange(rdi.Badges); } int max = badges.Max(a => a.SetTitleID); //foreach (RawBadgeItem b in badges.OrderBy(a=> a.SetTitleID)) List <int> missingList = new List <int>(); StringBuilder sb = new StringBuilder(); int fileCpt = 0; for (int i = 1; i <= max; i++) { if (!badges.Exists(a => a.SetTitleID == i)) { missingList.Add(i); sb.AppendLine(i.ToString()); //-- string iterString = $"set_title {i}$$l {i}$$"; string currentFilePath = Path.Combine(bindPath, $"bind{fileCpt}.txt"); string newFilePath = Path.Combine(bindPath, $"bind{fileCpt + 1}.txt"); string content = $"ctrl+m \"{iterString}bind_Load_file {newFilePath}\""; File.WriteAllText(currentFilePath, content); fileCpt++; } } }
public void LoadUI() { BadgeManager.Load(_lfi); List <RawDataItem> rdiList = BadgeRawData.Read(); //Verif(rdiList); tabControlGrp.TabPages.Clear(); foreach (RawDataItem rdi in rdiList) { tabControlGrp.TabPages.Add(new MyTabPage(rdi, tabControlGrp)); } int count = BadgeManager.List.Count(a => a.Selected); lblTotalBadgeCount.Text = $"Total Badges:{count}"; }