static async Task <bool> PerformCheckBitcoin(Form1 form) { ProgressReporter <ProgressStatus> progressDispa = new ProgressReporter <ProgressStatus>(); progressDispa.ProgressChanged += new EventHandler <ProgressStatus>(form.Task_ProgressChanged); //Main folder where you find the spreadsheet raw data. string localData = @"Bounties\" + form.ProjectSelected + "\\" + form.ProjectSelected + "SpreadSheet.xml"; BountyFileLoader bl = new BountyFileLoader(localData); string projectName = form.ProjectSelected; try { foreach (Campaign campaign in bl.SpreadSheetList) { campaign.Partecipants = await Task.Run(() => TextParser.GetUserCampaignBtcAddress(campaign, progressDispa)); } } catch (Exception ex) { MessageBox.Show(ex.Message); } bool result = false; File.Delete(projectName + "_results.xml"); foreach (Campaign campaign in bl.SpreadSheetList) { result = await Task.Run(() => AddressComparer.CheckAddressListBitcoin(projectName, campaign, progressDispa)); } return(result); }
public DataViewer(string xmlFileProjectResult, string outputfile, BountyFileLoader bt, Kind kind) { btcScraper = new BitcoinTalkScraper(); //fileResult = new System.IO.StreamWriter(outputfile); bountyFileLoader = bt; m_results = XDocument.Load(xmlFileProjectResult); if (kind == Kind.Eth) { muserDictionary = GetUserDictionaryEthereum(); ComputeConnectionsEthereum(); } else { muserDictionary = GetUserDictionaryBitcoin(); ComputeConnectionsBitcoin(); } }
private async void button1_Click(object sender, EventArgs e) { button1.Enabled = false; button2.Enabled = false; Etherscan.SaveKeyOnRegistry(textBox1.Text); // Start the HandleFile method. await PerformCheckEthereum(this.m_mainForm); string outputFile = @"Bounties\" + this.ProjectSelected + "\\"; string localData = @"Bounties\" + this.ProjectSelected + "\\" + this.ProjectSelected + "SpreadSheet.xml"; BountyFileLoader bl = new BountyFileLoader(localData); DataViewer view = new DataViewer(ProjectSelected + "_results.xml", outputFile, bl, DataViewer.Kind.Eth); view.CreateHtmlOutputEthereum(outputFile); //view.ShowConnectionsPerCategory(CampaignSelected); System.Diagnostics.Process.Start(outputFile + "index.html"); button1.Enabled = true; button2.Enabled = true; }