Exemplo n.º 1
0
        private async void Button_OnClicked(object sender, EventArgs e)
        {
            string currency      = null;
            var    selectedIndex = CurrencyPicker.SelectedIndex;

            if (selectedIndex != -1)
            {
                currency = CurrencyPicker.Items[selectedIndex];
            }
            var amountInput = AmountEntry.Text;
            var amount      = decimal.Parse(amountInput);
            var result      = await ConvertManager.ConvertCurrency(currency, amount);

            await DisplayAlert("Success!", amount + " Bitcoins is: " + result.ToString(CultureInfo.InvariantCulture) + currency, "Close");
        }