Ejemplo n.º 1
0
 private static string ExtractSupportedDevicesFromInfo(HexArchiveInfo info)
 {
     try
     {
         return(info.Binaries.Select(b => b.Device).Distinct().Aggregate((l, r) => $"{l}, {r}"));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         return(String.Empty);
     }
 }
Ejemplo n.º 2
0
        private static void PopulateScreenshotBitmapsFromInfo(ZipArchive zipArchive, HexArchiveInfo hexArchiveInfo)
        {
            foreach (var screenshot in hexArchiveInfo.Screenshots)
            {
                var bitmapEntry = zipArchive.Entries.FirstOrDefault(n => n.Key == screenshot.Filename);
                if (bitmapEntry != null)
                {
                    var bitmap = ExtractNSImage(zipArchive, bitmapEntry.Key);

                    if (bitmap.HasValue)
                    {
                        screenshot.Bitmap = bitmap.Value;
                    }
                }
            }
        }