private void RunAutoCats(Profile p, List <AutoCat> autocats) { foreach (AutoCat ac in autocats) { Write("Running autocat '" + ac.Name + "'..."); ac.PreProcess(p.GameData, Database); if (ac.AutoCatType == AutoCatType.Group) { AutoCatGroup acg = (AutoCatGroup)ac; RunAutoCats(p, p.CloneAutoCatList(acg.Autocats, p.GameData.GetFilter(acg.Filter))); } else { foreach (GameInfo g in p.GameData.Games.Values) { if (g.Id > 0) { ac.CategorizeGame(g, p.GameData.GetFilter(ac.Filter)); } } } ac.DeProcess(); WriteLine(ac.Name + " complete."); } }
private void RunAutoCats(Profile profile, IEnumerable <AutoCat> autoCats) { if (profile == null || autoCats == null) { return; } foreach (AutoCat autoCat in autoCats) { Write("Running AutoCat '" + autoCat.Name + "'..."); autoCat.PreProcess(profile.GameData); if (autoCat.AutoCatType == AutoCatType.Group) { AutoCatGroup autoCatGroup = (AutoCatGroup)autoCat; RunAutoCats(profile, profile.CloneAutoCatList(autoCatGroup.Autocats, profile.GameData.GetFilter(autoCatGroup.Filter))); } else { foreach (GameInfo g in profile.GameData.Games.Values) { if (g.Id > 0) { autoCat.CategorizeGame(g, profile.GameData.GetFilter(autoCat.Filter)); } } } autoCat.DeProcess(); WriteLine(autoCat.Name + " complete."); } }
private void RunAutoCats(Profile p, List<AutoCat> autocats) { foreach (AutoCat ac in autocats) { Write("Running autocat '" + ac.Name + "'..."); ac.PreProcess(p.GameData, Program.GameDB); if (ac.AutoCatType == AutoCatType.Group) { AutoCatGroup acg = (AutoCatGroup)ac; RunAutoCats(p, p.CloneAutoCatList(acg.Autocats, p.GameData.GetFilter(acg.Filter))); } else { foreach (GameInfo g in p.GameData.Games.Values) { if (g.Id > 0) { ac.CategorizeGame(g, p.GameData.GetFilter(ac.Filter)); } } } ac.DeProcess(); WriteLine(ac.Name + " complete."); } }