public static void Reset() { StopTimer(); DataLoaded = false; Information = null; Store = null; Games = null; GroupedGames = null; }
private static void ProcessString(string content) { XmlSerializer deser = new XmlSerializer(content.Contains("<XKEY>") ? typeof(XKEY) : typeof(PS3KEY), new[] { typeof(Game), typeof(Directory) }); using (TextReader r = new StringReader(content)) { K3Y info = (K3Y) deser.Deserialize(r); if (Information != null) { Information.TrayState = info.TrayState; Information.GuiState = info.GuiState; Information.Emergency = info.Emergency; Information.Active = info.Active; return; } Information = info; // Set the game information to the source of the coverflow Games = new List<Game>(); if (Information.Games.Hdds != null) { foreach (Hdd hdd in Information.Games.Hdds) { if (hdd.DirectoryItems != null) { foreach (Directory directory in hdd.DirectoryItems.OfType<Directory>()) { AddGames(directory); } } if (hdd.Games != null) Games.AddRange(hdd.Games); } } GroupedGames = Games.ToGroupedOC(g => g.Key); DataLoaded = true; } }