Ejemplo n.º 1
0
 public void RadioButtonSelected(RadioGroupView rgView, int position, RadioButtonView rbview)
 {
     AudioHandler.Instance.PlaySound(AudioSoundEnum.ButtonForNormal);
     if (rgView == rgStyleType)
     {
         mStyleType = EnumUtil.GetEnum <StoreForDressTypeEnum>(rbview.name);
     }
     else if (rgView == rgPartType)
     {
         mPartType = EnumUtil.GetEnum <GeneralEnum>(rbview.name);
     }
     InitDataByType(mStyleType, mPartType);
 }
Ejemplo n.º 2
0
    /// <summary>
    /// 根据类型和部位初始化数据
    /// </summary>
    /// <param name="styleType"></param>
    /// <param name="partType"></param>
    public void InitDataByType(StoreForDressTypeEnum styleType, GeneralEnum partType)
    {
        List <StoreInfoBean> createListData = new List <StoreInfoBean>();

        switch (partType)
        {
        case GeneralEnum.Null:
            createListData = mClothesListData;
            break;

        case GeneralEnum.Mask:
        case GeneralEnum.Hat:
        case GeneralEnum.Clothes:
        case GeneralEnum.Shoes:
            createListData = GetClothesListDataByPart(partType);
            break;
        }
        List <StoreInfoBean> listData = GetClothesListDataByType(styleType, createListData);

        CreateClothesData(listData);
    }
Ejemplo n.º 3
0
    /// <summary>
    ///  根据类型获取数据
    /// </summary>
    /// <param name="mark"></param>
    /// <returns></returns>
    public List <StoreInfoBean> GetClothesListDataByType(StoreForDressTypeEnum styleType, List <StoreInfoBean> listStoreData)
    {
        if (styleType == 0)
        {
            return(listStoreData);
        }
        List <StoreInfoBean> listData = new List <StoreInfoBean>();

        if (listStoreData == null)
        {
            return(listData);
        }

        for (int i = 0; i < listStoreData.Count; i++)
        {
            StoreInfoBean itemData = listStoreData[i];
            if (itemData.store_goods_type == (int)styleType)
            {
                listData.Add(itemData);
            }
        }
        return(listData);
    }