private void InitDialog() { if (m_bagData == null) { return; } ConfProp confProp = m_bagData.prop.prop; m_propName_lab.Text = LocalizeModule.Instance.GetString(confProp.name); m_icon_img.Sprite = confProp.icon; m_propNum_lab.Text = string.Format("x{0}", m_bagData.prop.num); m_currentNumLab.Text = LocalizeModule.Instance.GetString("user_have_icon", m_bagData.prop.num); m_useNum_lab.Text = m_curNum.ToString();//string.Format("{0}/{1}",m_curNum, m_bagData.prop.num); if (m_bagData.infoType == PropInfoTypeEnum.Use) { m_title_lab.Text = "Use Prop"; m_priceNode_lab.SetActive(false); m_getNumNode_lab.SetActive(false); m_getNum_lab.Visible = false; m_yesLab.Visible = true; } else if (m_bagData.infoType == PropInfoTypeEnum.Sale) { m_title_lab.Text = "Sale Prop"; m_priceNode_lab.SetActive(true); m_getNumNode_lab.SetActive(true); m_getNum_lab.Visible = true; m_yesLab.Visible = false; m_propPrice_lab.Text = confProp.price.ToString(); m_getNum_lab.Text = (confProp.price * m_curNum).ToString(); } }
public void setInfoData(PropData propData) { m_curPropData = propData; if (propData != null) { m_Icon_img.Sprite = propData.prop.icon; m_Title_lab.Text = LocalizeModule.Instance.GetString(propData.prop.name); m_Sum_lab.Text = string.Format("x{0}", propData.num); m_Content_lab.Text = LocalizeModule.Instance.GetString(propData.prop.description); m_Money_lab.Text = propData.prop.price.ToString(); long skillId = propData.prop.skillId; int tradeLimit = propData.prop.tradeLimit; if (skillId > 0) { ConfSkill skill = ConfSkill.Get(skillId); if (skill != null && skill.phase <= 3) { if (tradeLimit == 0) { tradeLimit = 1; } else if (tradeLimit == 2) { tradeLimit = 3; } } } SetPropInfoVisible(true); if (tradeLimit == 0) { m_MsgNode_obj.SetActive(true); m_SaleUseNode_obj.SetActive(true); m_Sale_btn.SetActive(true); m_Use_btn.SetActive(true); m_NoSaleTip_lab.SetActive(false); m_MultiFunc_btn.SetActive(false); m_ShopTips_lab.SetActive(false); m_currentInfo_enum = PropInfoTypeEnum.None; } else if (tradeLimit == 1) { m_MsgNode_obj.SetActive(true); m_MultiFunc_btn.SetActive(true); m_SaleUseNode_obj.SetActive(true); m_Sale_btn.SetActive(false); m_Use_btn.SetActive(false); m_NoSaleTip_lab.SetActive(false); m_ShopTips_lab.SetActive(false); m_MultiFunc_lab.Text = "Sale"; m_currentInfo_enum = PropInfoTypeEnum.Sale; } else if (tradeLimit == 2) { m_MultiFunc_btn.SetActive(true); m_MsgNode_obj.SetActive(true); m_SaleUseNode_obj.SetActive(false); m_Sale_btn.SetActive(false); m_Use_btn.SetActive(false); m_NoSaleTip_lab.SetActive(true); m_ShopTips_lab.SetActive(false); m_MultiFunc_lab.Text = "Use"; m_currentInfo_enum = PropInfoTypeEnum.Use; } else if (tradeLimit == 3) { m_MsgNode_obj.SetActive(true); m_SaleUseNode_obj.SetActive(false); m_Sale_btn.SetActive(false); m_Use_btn.SetActive(false); m_NoSaleTip_lab.SetActive(false); m_MultiFunc_btn.SetActive(false); m_ShopTips_lab.SetActive(false); m_currentInfo_enum = PropInfoTypeEnum.None; } } }