private async void GetEstimate_Click(object sender, RoutedEventArgs e)
{
try
{
// gets estimate from Azure ML service and sets it to result TextBlock
var price = await CallAzureML(tbxMake.Text, tbxBodyStyle.Text, slWheelBase.Value, tbxNumberOfCylinders.Text, (int)slEngineSize.Value, (int)slHorsepowers.Value, (int)slPeakRPM.Value, (int)slHighwayMPG.Value);
tbResult.Text = String.Format("You are lucky!\nToday it is as cheap as {0:c}. Don't miss your chance!", price);
}
catch (Exception ex)
{
// Shows error in result TextBlock
tbResult.Text = String.Format("Oops! Something went wrong.\nThis can be helpful:\n{0}", ex.ToString());
}
}