private void initDeleteMethodPanel(SavedMethodBtnController pMethodObj)
{
// show edit panel
mContainer.SetActive(false);
mReplacePanelMethod.SetActive(false);
mDelPanelMethod.SetActive(true);
// clone object to panel edit
SavedMethodBtnController controller = Instantiate(pMethodObj);
controller.setMethod(pMethodObj.getMethod());
controller.setDeleteBtn(false);
controller.setMethodBtn(false);
RectTransform methodPanelrecttransform = controller.GetComponent <RectTransform>();
// clear currency state
for (int i = 0; i < mPanelForDelMethod.transform.childCount; i++)
{
Logger.Log("Destroy child on panel for edit saved payment method with ind - " + i);
Destroy(mPanelForDelMethod.transform.GetChild(i).gameObject);
}
controller.transform.SetParent(mPanelForDelMethod.transform);
methodPanelrecttransform.anchorMin = new Vector2(0, 0);
methodPanelrecttransform.anchorMax = new Vector2(1, 1);
methodPanelrecttransform.pivot = new Vector2(0.5f, 0.5f);
methodPanelrecttransform.offsetMin = new Vector2(0, 0);
methodPanelrecttransform.offsetMax = new Vector2(0, 0);
// set text
mTitle.text = mUtilsLink.GetTranslations().Get("delete_payment_account_page_title");
mQuestionLabel.text = mUtilsLink.GetTranslations().Get("payment_account_delete_confirmation_question");
mLinkCancel.GetComponent <Text>().text = mUtilsLink.GetTranslations().Get("cancel");
mLinkCancel.GetComponent <Button>().onClick.RemoveAllListeners();
mLinkCancel.GetComponent <Button>().onClick.AddListener(() => onClickCancelEditMethod());
mLinkDelete.GetComponent <Text>().text = mUtilsLink.GetTranslations().Get("delete_payment_account_button");
mLinkDelete.GetComponent <Button>().onClick.RemoveAllListeners();
mLinkDelete.GetComponent <Button>().onClick.AddListener(() => onClickConfirmDeletePaymentMethod(controller.getMethod()));
mBtnReplace.GetComponentInChildren <Text>().text = mUtilsLink.GetTranslations().Get("replace_payment_account_button");
mBtnReplace.GetComponent <Button>().onClick.RemoveAllListeners();
mBtnReplace.GetComponent <Button>().onClick.AddListener(() => onClickReplacePeymentMethod(controller.getMethod()));
}