protected override void OnAppearing() { Root dadosObtidos = BuscaValores.buscaBolsas(); txtDolar.Text = dadosObtidos.results.currencies.USD.name; txtCompra.Text = dadosObtidos.results.currencies.USD.buy.ToString("F2"); txtVenda.Text = dadosObtidos.results.currencies.USD.sell.ToString("F2"); txtVariacao.Text = dadosObtidos.results.currencies.USD.variation.ToString("F2"); //Euro txtEuro.Text = dadosObtidos.results.currencies.EUR.name; txtCompraEuro.Text = dadosObtidos.results.currencies.EUR.buy.ToString("F2"); txtVendaEuro.Text = dadosObtidos.results.currencies.EUR.sell.ToString("F2"); txtVariacaoEuro.Text = dadosObtidos.results.currencies.EUR.variation.ToString("F2"); }
protected override void OnAppearing() { Root dadosObtidos = BuscaValores.buscaBolsas(); DateTime data = DateTime.Now; var hora = data.Hour.ToString(); txtNomeBolsa.Text = dadosObtidos.results.stocks.IBOVESPA.name; txtPontosBolsa.Text = dadosObtidos.results.stocks.IBOVESPA.points.ToString(); float pontosIbovespa = (float)dadosObtidos.results.stocks.IBOVESPA.points; List <Microcharts.ChartEntry> entries = new List <Microcharts.ChartEntry> { new Microcharts.ChartEntry(pontosIbovespa) { Label = data.ToString(), ValueLabel = pontosIbovespa.ToString(), Color = SKColor.Parse("#266489") }, new Microcharts.ChartEntry(pontosIbovespa - 8000) { Label = data.ToString(), ValueLabel = pontosIbovespa.ToString(), Color = SKColor.Parse("#266489") } }; grafico1.Chart = new Microcharts.LineChart() { Entries = entries }; }