private List<Page> CreateSimplePages() { List<Page> pages = new List<Page>(); Page page; //page = new Page { IsGrid = false, Images = RandomImages("BFZ") }; page = new Page { IsGrid = false, Images = ImagesFromFile("booster.txt") }; pages.Add(page); /*page = new Page { IsGrid = false, Images = SameImage("White.Full.jpg") }; pages.Add(page);*/ page = new Page { IsGrid = true, Texts = CreateTexts("3") }; pages.Add(page); return pages; }
private List<Page> CreatePages(Settings settings) { List<List<string>> boosters; if (settings.Lands) { boosters = GetLandBoosters(settings); } else { boosters = GetBoosters(settings); } PagePointer p = new PagePointer(); List<Page> imagePages = new List<Page>(); List<Page> textPages = new List<Page>(); Page imagePage = new Page(); Page textPage = new Page(); for (int i = 0; i < boosters.Count; i++) { var booster = boosters[i]; foreach (var card in booster) { if (p.Inc()) { imagePage = new Page { IsGrid = false }; imagePages.Add(imagePage); textPage = new Page { IsGrid = true }; textPages.Add(textPage); } imagePage.Images[p.I, p.J] = card; textPage.Texts[p.I, 2 - p.J] = settings.Lands ? "L" : GetText(i + 1); } if (!settings.MergePages) { p.SetEnd(); } } List<Page> pages = new List<Page>(); if (settings.NormalOrder) { for (int i = 0; i < imagePages.Count; i++) { pages.Add(imagePages[i]); pages.Add(textPages[i]); } } else { pages.AddRange(imagePages); pages.AddRange(textPages); } return pages; }