void SellTouch(object sender, EventArgs args) { float userInputFloat = 0; CustomAnimations.FlipWithDuration(btnSell, 5.5, CustomAnimations.UIViewAnimationFlipDirection.Bottom, 1, false); try { userInputFloat = Convert.ToSingle(UserValue.Text); } catch (Exception ex) { } var result = userInputFloat * SellingPriceValue; ResultValue.Text = result.ToString(); CreateResultAnimation(ResultValue); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. NameValue.Text = CurrencyNameValue; SellPrice.Text = SellingPriceValue.ToString(); BuyPrice.Text = PurchasePriceValue.ToString(); ShakeIt(BuyPrice); CustomAnimations.Pop(SellPrice, 3, 2, 3); CreateLabelAnimation(NameValue); btnBuy.TouchUpInside -= BuyTouch; btnBuy.TouchUpInside += BuyTouch; btnSell.TouchUpInside -= SellTouch; btnSell.TouchUpInside += SellTouch; }
void BuyTouch(object sender, EventArgs args) { float userInputFloat = 0; //ShakeIt(btnBuy); CustomAnimations.RotateToAngle(btnBuy, 30, 3, CustomAnimations.UIViewAnimationRotationDirection.Right, 1, true); try { userInputFloat = Convert.ToSingle(UserValue.Text); } catch (Exception ex) { } var result = userInputFloat * PurchasePriceValue; ResultValue.Text = result.ToString(); CreateResultPositionAndSizeAnimation(ResultValue); }