public async Task AnalyseChain(string pathToChain, string jsonSavePath, int maxOutputs, ChainAnalysisWindow chainAnalysisWindowObject)
        {
            this.chainAnalysisWindowObject = chainAnalysisWindowObject;
            BitcoinBlockchain.Parser.IBlockchainParser blockchainParser;
            this.maxOutputs   = maxOutputs;
            this.jsonSavePath = jsonSavePath;

            try
            {
                blockchainParser = new BitcoinBlockchain.Parser.BlockchainParser(pathToChain, "blk00000.dat");

                // Starting analysis
                try
                {
                    chainAnalysisWindowObject.StartAnalysisButton.Content   = "Analysing Please Wait...";
                    chainAnalysisWindowObject.StartAnalysisButton.IsEnabled = false;
                    jsonBlockchainData = new JObject();
                    await ExtractBlockchainAsync(blockchainParser, jsonBlockchainData);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Exeption information:\n\n\n" + ex.ToString(), "Error");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Could not analyse this path, wrong path?\n\nExeption information:\n\n\n" + ex.ToString(), "Error");
            }
        }
Ejemplo n.º 2
0
        private void BlockchainAnalysis_Click(object sender, RoutedEventArgs e)
        {
            ChainAnalysisWindow chainAnalysisWindow = new ChainAnalysisWindow(this);

            chainAnalysisWindow.ShowDialog();
        }