private void FFUDownloadedAndCheckSupported(string[] Files, object State) { App.Config.AddFfuToRepository(Files[0]); if (App.Config.FFURepository.Where(e => App.PatchEngine.PatchDefinitions.Where(p => p.Name == "SecureBootHack-V2-EFIESP").First().TargetVersions.Any(v => v.Description == e.OSVersion)).Count() == 0) { string ProductType2 = "RM-1085"; string URL = LumiaDownloadModel.SearchFFU(ProductType2, null, null); Download(URL, ProductType2, FFUDownloaded, null); } }
private void Search() { if (IsSearching) { return; } IsSearching = true; SynchronizationContext UIContext = SynchronizationContext.Current; SearchResultList.Clear(); new Thread(() => { string FFUURL = null; string[] EmergencyURLs = null; try { string TempProductType = ProductType.ToUpper(); if ((TempProductType != null) && TempProductType.StartsWith("RM") && !TempProductType.StartsWith("RM-")) { TempProductType = "RM-" + TempProductType.Substring(2); } ProductType = TempProductType; FFUURL = LumiaDownloadModel.SearchFFU(ProductType, ProductCode, OperatorCode, out TempProductType); if (TempProductType != null) { ProductType = TempProductType; } if (ProductType != null) { EmergencyURLs = LumiaDownloadModel.SearchEmergencyFiles(ProductType); } } catch { } UIContext.Post(s => { if (FFUURL != null) { SearchResultList.Add(new SearchResult(FFUURL, ProductType, FFUDownloaded, null)); } if (EmergencyURLs != null) { SearchResultList.Add(new SearchResult(ProductType + " emergency-files", EmergencyURLs, ProductType, EmergencyDownloaded, ProductType)); } }, null); IsSearching = false; }).Start(); }
private void DownloadAll() { SynchronizationContext UIContext = SynchronizationContext.Current; new Thread(() => { string FFUURL = null; string[] EmergencyURLs = null; try { string TempProductType = ProductType.ToUpper(); if ((TempProductType != null) && TempProductType.StartsWith("RM") && !TempProductType.StartsWith("RM-")) { TempProductType = "RM-" + TempProductType.Substring(2); } ProductType = TempProductType; FFUURL = LumiaDownloadModel.SearchFFU(ProductType, ProductCode, OperatorCode, out TempProductType); if (TempProductType != null) { ProductType = TempProductType; } if (ProductType != null) { EmergencyURLs = LumiaDownloadModel.SearchEmergencyFiles(ProductType); } } catch { } UIContext.Post(s => { if (FFUURL != null) { Download(FFUURL, ProductType, FFUDownloadedAndCheckSupported, null); } if (EmergencyURLs != null) { Download(EmergencyURLs, ProductType, EmergencyDownloaded, ProductType); } }, null); }).Start(); }