public void setValues(CustomAmountCalcRes pValue) { mSetValues = true; if (pValue.amount != 0) totalAmountTitle.text = mTotalTitle + " " + CurrencyFormatter.FormatPrice(pValue.currency, pValue.amount.ToString("N2")); else totalAmountTitle.text = ""; if (pValue.vcAmount != 0) virtCurrAmount.text = pValue.vcAmount.ToString(); else virtCurrAmount.text = ""; if (pValue.amount != 0) realCurrAmount.text = pValue.amount.ToString("0.00"); else realCurrAmount.text = ""; if (pValue.currency == "USD") iconRealCurr.text = "$"; else if (pValue.currency == "EUR") iconRealCurr.text = "€"; else if (pValue.currency == "RUB") iconRealCurr.text = ""; if (pValue.vcAmount > 0) btnPay.interactable = true; else btnPay.interactable = false; mSetValues = false; }
private void CalculateRecived(JSONNode pNode) { mHasError = false; btnPay.interactable = true; CustomAmountCalcRes calcRes = new CustomAmountCalcRes().Parse(pNode["calculation"]) as CustomAmountCalcRes; setValues(calcRes); }
public void setValues(CustomAmountCalcRes pValue) { mSetValues = true; if (pValue.amount != 0) { totalAmountTitle.text = mTotalTitle + " " + CurrencyFormatter.FormatPrice(pValue.currency, pValue.amount.ToString("N2")); } else { totalAmountTitle.text = ""; } if (pValue.vcAmount != 0) { virtCurrAmount.text = pValue.vcAmount.ToString(); } else { virtCurrAmount.text = ""; } if (pValue.amount != 0) { realCurrAmount.text = pValue.amount.ToString("0.00"); } else { realCurrAmount.text = ""; } if (pValue.currency == "USD") { iconRealCurr.text = "$"; } else if (pValue.currency == "EUR") { iconRealCurr.text = "€"; } else if (pValue.currency == "RUB") { iconRealCurr.text = ""; } if (pValue.vcAmount > 0) { btnPay.interactable = true; } else { btnPay.interactable = false; } mSetValues = false; }
private void setValues(CustomAmountCalcRes pValue) { mSetValues = true; if (pValue.amount != 0) { mTotalAmount.text = CurrencyFormatter.Instance.FormatPrice(pValue.currency, pValue.amount); } else { totalAmountTitle.text = ""; mTotalAmount.text = ""; } if (pValue.vcAmount != 0) { virtCurrAmount.text = mUtils.GetProject().isDiscrete ? pValue.vcAmount.ToString("N0") : pValue.vcAmount.ToString("N2"); } else { virtCurrAmount.text = ""; } if (pValue.amount != 0) { realCurrAmount.text = pValue.amount.ToString("N2"); } else { realCurrAmount.text = ""; } iconRealCurr.text = CurrencyFormatter.Instance.GetCurrencyGraphem(pValue.currency); // iconRealCurr.text = ""; if (pValue.vcAmount > 0) { btnPay.interactable = true; } else { btnPay.interactable = false; } mSetValues = false; }