public NesController() { _doc.Load(Config.NesDirectory + "games.xml"); PodController c; c = new AlphabetController(GameSystem.Nes, _games, "description"); Items.Add(new SimpleItem("All Games", null, c)); Items.Add(new RandomLeafItem(_games)); }
public override void Refresh() { Hashtable hash = new Hashtable(); foreach (XmlNode game in _master) { string val = XmlBinder.Eval(game, _field); if (val.Length == 0) { val = "(n/a)"; } ArrayList group = (ArrayList)hash[val]; if (group == null) { group = new ArrayList(); hash[val] = group; } group.Add(game); } Items.Clear(); foreach (string key in hash.Keys) { ArrayList group = (ArrayList)hash[key]; if (group.Count > 20) { PodController c = new AlphabetController(_system, group, "description"); Items.Add(new SimpleItem(key, null, c)); } else { PodController c = new GameLeafController(_system, group, "description"); Items.Add(new SimpleItem(key, null, c)); } } Items.Sort(new PodItemComparer()); }
public MameController() { _doc.Load(Config.MameDirectory + "games.xml"); PodController c; c = new AlphabetController(GameSystem.Mame, _games, "description"); Items.Add(new SimpleItem("All Games", null, c)); c = new FilterController(GameSystem.Mame, _games, "year"); Items.Add(new SimpleItem("By Year", null, c)); c = new FilterController(GameSystem.Mame, _games, "manufacturer"); Items.Add(new SimpleItem("By Manufacturer", null, c)); c = new FilterController(GameSystem.Mame, _games, "input/@players"); Items.Add(new SimpleItem("By Players", null, c)); Items.Add(new RandomLeafItem(_games)); }