Пример #1
0
 void CreateDummyPool()
 {
     poolManager         = new MapPoolManager();
     poolManager.version = 1f;
     poolManager.pools.Add(new MapPool
     {
         Stage  = "Qualifiers",
         nmPool = new List <Beatmap>()
         {
             new Beatmap(1, "wea", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 0, 1), new Beatmap(2, "aew", "El artista", "noew", "aaaaaa la weaa", 30f, 2.44f, 0, 2)
         },
         hdPool = new List <Beatmap>()
         {
             new Beatmap(3, "weaHD", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 1, 1)
         },
         hrPool = new List <Beatmap>()
         {
             new Beatmap(4, "weaHR", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 2, 1)
         },
         dtPool = new List <Beatmap>()
         {
             new Beatmap(5, "weaDT", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 3, 1)
         },
     });
     poolManager.pools.Add(new MapPool
     {
         Stage  = "Groups",
         nmPool = new List <Beatmap>()
         {
             new Beatmap(1, "wea", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 0, 1), new Beatmap(2, "aew", "El artista", "noew", "aaaaaa la weaa", 30f, 2.44f, 0, 2)
         },
         hdPool = new List <Beatmap>()
         {
             new Beatmap(3, "weaHD", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 1, 1)
         },
         hrPool = new List <Beatmap>()
         {
             new Beatmap(4, "weaHR", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 2, 1)
         },
         dtPool = new List <Beatmap>()
         {
             new Beatmap(5, "weaDT", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 3, 1)
         },
         fmPool = new List <Beatmap>()
         {
             new Beatmap(6, "weaFM", "El artista", "weon", "la wea loca", 123.33f, 5.21f, 4, 1)
         },
         tbPool = new List <Beatmap>()
         {
             new Beatmap(7, "rompehuevos", "El artista", "el extrim", "a romper", 302.21f, 6.21f, 5, 1)
         },
     });
 }
Пример #2
0
 void LoadPools()
 {
     if (File.Exists($"{appPath}/Data/Pools.json"))
     {
         try
         {
             poolManager = JsonConvert.DeserializeObject <MapPoolManager>(File.ReadAllText($"{appPath}/Data/Pools.json"));
         }
         catch (Exception e)
         {
             MessageBox.Show($"Hijuesu, algo se rompio intentando cargar el pool\r\nMandale esto al menso del Iojioji\r\n\r\n{e.Message}", "Error inesperado al cargar el pool O:", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show($"No se encontro el archivo de pools\r\nAsegurate que se encuentre en '{appPath}/Data' un archivo llamado Pools.json", "No pude cargar el pool :'c", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }