Exemplo n.º 1
0
 private void getResultButton_Click(object sender, EventArgs e)
 {
     using (var client = new ParrotToPythonConverterClient())
     {
         if (parrotsUpDown.Value == 0)
         {
             // convert pyhtons to parrots
             parrotsUpDown.Value = (decimal)client.ConvertPythonsToParrots((double)pythonsUpDown.Value);
         }
         if (pythonsUpDown.Value == 0)
         {
             // convert parrots to pythons
             pythonsUpDown.Value = (decimal)client.ConvertParrotsToPythons((double)parrotsUpDown.Value);
         }
     }
 }
Exemplo n.º 2
0
 private void getResultButton_Click(object sender, EventArgs e)
 {
     using (var client = new ParrotToPythonConverterClient())
     {
         if (parrotsUpDown.Value == 0)
         {
             // convert pyhtons to parrots
             parrotsUpDown.Value = (decimal)client.ConvertPythonsToParrots((double)pythonsUpDown.Value);
         }
         if (pythonsUpDown.Value == 0)
         {
             // convert parrots to pythons
             pythonsUpDown.Value = (decimal)client.ConvertParrotsToPythons((double)parrotsUpDown.Value);
         }
     }
 }