Ejemplo n.º 1
0
        public async void GetBlock_Clicked(System.Object sender, System.EventArgs e)
        {
            var status = await algodApiInstance.GetStatusAsync();

            long          lastround = (long)status.LastRound;
            BlockResponse block;

            try
            {
                block = await algodApiInstance.GetBlockAsync(lastround);

                var htmlSource = new HtmlWebViewSource();
                htmlSource.Html = @"<html><body><h3>" + "Last Round = " + lastround.ToString() + "</h3>" +
                                  "<h3>" + "Block Info = " + JsonPrettify(block.ToJson()) + "</h3>" +
                                  "</body></html>";
                myWebView.Source  = htmlSource;
                myWebViewp.Source = htmlSource;
            }
            catch (Exception err)
            {
                var htmlSource = new HtmlWebViewSource();
                htmlSource.Html = @"<html><body><h3>" + "Error = " + err.Message.ToString() + "</h3>" +
                                  "</body></html>";

                myWebView.Source  = htmlSource;
                myWebViewp.Source = htmlSource;
            }
        }