public String IGTAsStr(IGTDisplayType igt_display_type) { long __IGT = IGT(); String res = String.Empty; res = String.Format("{0:00}:{1:00}:{2:00}", __IGT / (60 * 60 * 1000), (__IGT / (60 * 1000)) % 60, (__IGT / 1000) % 60); if (igt_display_type == IGTDisplayType.WithMS) { res += String.Format(".{0:000}", __IGT % 1000); } return(res); }
internal static void LoadConfig() { int i; String game_config_filename = String.Empty; dynamic config = JObject.Parse(File.ReadAllText(Path.Combine(Directory.GetCurrentDirectory(), "config.json"))); try { refresh_config_key = KeysUtils.ConvertFromString((String)config.refresh_config_key); igt_display_type = (IGTDisplayType)Enum.Parse(typeof(IGTDisplayType), (String)config.igt_display_type); if (MetroidPrime != null) { if (MetroidPrime.GetType().BaseType == typeof(Prime.Prime)) { game_config_filename = "prime.json"; } if (MetroidPrime.GetType().BaseType == typeof(Echoes.Echoes)) { game_config_filename = "echoes.json"; } if (MetroidPrime.GetType().BaseType == typeof(Corruption.Corruption)) { game_config_filename = "corruption.json"; } if (game_config_filename != String.Empty) { dynamic game_config = JObject.Parse(File.ReadAllText(Path.Combine(Directory.GetCurrentDirectory(), game_config_filename))); try { pickups_to_show = new String[game_config.pickups.Count]; for (i = 0; i < game_config.pickups.Count; i++) { pickups_to_show[i] = game_config.pickups[i]; } } catch { pickups_to_show = null; } } } } catch { refresh_config_key = Key.F5; igt_display_type = IGTDisplayType.WithoutMS; pickups_to_show = null; } }