Beispiel #1
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(FirstCurrency) || String.IsNullOrEmpty(SecondCurrency))
     {
         DisplayAlert("Ошибка", "Выберите валюты", "OK");
     }
     else
     {
         CurrencyCalculator calculator = CurrencyCalculator.getInstance();
         calculator.FirstCurrency  = FirstCurrency;
         calculator.SecondCurrency = SecondCurrency;
         Navigation.PushModalAsync(new Page1(FirstCurrency, SecondCurrency));
     }
 }
Beispiel #2
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(entry.Text))
     {
         DisplayAlert("Ошибка", "Введите номинал", "OK");
     }
     if (Convert.ToInt32(entry.Text) < 0)
     {
         DisplayAlert("Ошибка", "Ddtlbnt положительное число", "OK");
     }
     else
     {
         CurrencyCalculator calculator = CurrencyCalculator.getInstance();
         calculator.Value = Value;
         float reponse = calculator.Calculate();
         result.Text = Convert.ToString(reponse);
     }
 }
Beispiel #3
0
 private async void Connect()
 {
     CurrencyCalculator calculator = CurrencyCalculator.getInstance();
     await calculator.ConnectToServerAsync();
 }