コード例 #1
0
ファイル: Tools.cs プロジェクト: x747510/MakerSearch
        public static bool UpdateUI(SearchCategory category)
        {
            switch (category)
            {
            case SearchCategory.FaceEyeIris:
                var listFIris = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyeblack);
                Traverse.Create(AI_MakerSearch.cvsEye).Field("sscBlackType").Method("CreateList", listFIris).GetValue();

                AI_MakerSearch.cvsEye.UpdateCustomUI();
                break;

            case SearchCategory.FaceEyePupil:
                var listFPupil = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eye);
                Traverse.Create(AI_MakerSearch.cvsEye).Field("sscPupilType").Method("CreateList", listFPupil).GetValue();

                AI_MakerSearch.cvsEye.UpdateCustomUI();
                break;

            case SearchCategory.FaceMole:
                var listFMole = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_mole);
                Traverse.Create(AI_MakerSearch.cvsMole).Field("sscMole").Method("CreateList", listFMole).GetValue();

                AI_MakerSearch.cvsMole.UpdateCustomUI();
                break;

            case SearchCategory.FaceHighlight:
                var listFHighlight = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eye_hl);
                Traverse.Create(AI_MakerSearch.cvsHighlight).Field("sscEyeHLType").Method("CreateList", listFHighlight).GetValue();

                AI_MakerSearch.cvsHighlight.UpdateCustomUI();
                break;

            case SearchCategory.FaceEyebrow:
                var listFEyebrow = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyebrow);
                Traverse.Create(AI_MakerSearch.cvsEyebrow).Field("sscEyebrowType").Method("CreateList", listFEyebrow).GetValue();

                AI_MakerSearch.cvsEyebrow.UpdateCustomUI();
                break;

            case SearchCategory.FaceEyelash:
                var listFEyelash = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyelash);
                Traverse.Create(AI_MakerSearch.cvsEyelash).Field("sscEyelashesType").Method("CreateList", listFEyelash).GetValue();

                AI_MakerSearch.cvsEyelash.UpdateCustomUI();
                break;

            case SearchCategory.FaceEyeshadow:
                var listFEyeshadow = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyeshadow);
                Traverse.Create(AI_MakerSearch.cvsEyeshadow).Field("sscEyeshadowType").Method("CreateList", listFEyeshadow).GetValue();

                AI_MakerSearch.cvsEyelash.UpdateCustomUI();
                break;

            case SearchCategory.FaceCheek:
                var listFCheek = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_cheek);
                Traverse.Create(AI_MakerSearch.cvsCheek).Field("sscCheekType").Method("CreateList", listFCheek).GetValue();

                AI_MakerSearch.cvsEyelash.UpdateCustomUI();
                break;

            case SearchCategory.FaceLip:
                var listFLip = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_lip);
                Traverse.Create(AI_MakerSearch.cvsLip).Field("sscLipType").Method("CreateList", listFLip).GetValue();

                AI_MakerSearch.cvsEyelash.UpdateCustomUI();
                break;

            case SearchCategory.FacePaint:
                var listFPaint = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_paint);
                Traverse.Create(AI_MakerSearch.cvsFacePaint).Field("sscPaintType").Method("CreateList", listFPaint).GetValue();

                AI_MakerSearch.cvsEyelash.UpdateCustomUI();
                break;

            case SearchCategory.BodySkin:
                var listBSkin = CvsBase.CreateSelectList(AI_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_skin_b : ChaListDefine.CategoryNo.ft_skin_b);
                Traverse.Create(AI_MakerSearch.cvsSkin).Field("sscSkinType").Method("CreateList", listBSkin).GetValue();

                AI_MakerSearch.cvsSkin.UpdateCustomUI();
                break;

            case SearchCategory.BodyDetail:
                var listBDetail = CvsBase.CreateSelectList(AI_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_detail_b : ChaListDefine.CategoryNo.ft_detail_b);
                Traverse.Create(AI_MakerSearch.cvsSkin).Field("sscDetailType").Method("CreateList", listBDetail).GetValue();

                AI_MakerSearch.cvsSkin.UpdateCustomUI();
                break;

            case SearchCategory.BodySunburn:
                var listBSunburn = CvsBase.CreateSelectList(AI_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_sunburn : ChaListDefine.CategoryNo.ft_sunburn);
                Traverse.Create(AI_MakerSearch.cvsSunburn).Field("sscSunburnType").Method("CreateList", listBSunburn).GetValue();

                AI_MakerSearch.cvsSunburn.UpdateCustomUI();
                break;

            case SearchCategory.BodyNip:
                var listBNip = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_nip);
                Traverse.Create(AI_MakerSearch.cvsNip).Field("sscNipType").Method("CreateList", listBNip).GetValue();

                AI_MakerSearch.cvsNip.UpdateCustomUI();
                break;

            case SearchCategory.BodyUnderhair:
                var listBUnderhair = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_underhair);
                Traverse.Create(AI_MakerSearch.cvsUnderhair).Field("sscUnderhairType").Method("CreateList", listBUnderhair).GetValue();

                AI_MakerSearch.cvsUnderhair.UpdateCustomUI();
                break;

            case SearchCategory.BodyPaint:
                var listBPaint = CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_paint);
                Traverse.Create(AI_MakerSearch.cvsPaint).Field("sscPaintType").Method("CreateList", listBPaint).GetValue();

                AI_MakerSearch.cvsPaint.UpdateCustomUI();
                break;

            case SearchCategory.Hair:
                AI_MakerSearch.cvsHair.UpdateHairList();
                AI_MakerSearch.cvsHair.UpdateCustomUI();
                break;

            case SearchCategory.Clothes:
                AI_MakerSearch.cvsClothes.UpdateClothesList();
                AI_MakerSearch.cvsClothes.UpdateCustomUI();
                break;

            case SearchCategory.Accessories:
                AI_MakerSearch.cvsAccessories.UpdateAcsList();
                AI_MakerSearch.cvsAccessories.UpdateCustomUI();
                break;

            case SearchCategory.Extra:
                return(false);

            case SearchCategory.None:
                return(false);

            default:
                return(false);
            }

            return(true);
        }
コード例 #2
0
        public static bool UpdateUI(int controllerIdx)
        {
            if (controllerIdx == -1)
            {
                return(false);
            }

            if (controllerIdx == 0)
            {
                var cvs = (CvsH_Hair)cvss[controllerIdx];
                cvs.UpdateHairList();
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 1)
            {
                var cvs = (CvsC_Clothes)cvss[controllerIdx];
                cvs.UpdateClothesList();
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 2)
            {
                var cvs = (CvsA_Slot)cvss[controllerIdx];
                cvs.UpdateAcsList();
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 3)
            {
                var cvs        = (CvsB_Skin)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(HS2_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_skin_b: ChaListDefine.CategoryNo.ft_skin_b));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 4)
            {
                var cvs        = (CvsB_Skin)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(HS2_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_detail_b: ChaListDefine.CategoryNo.ft_detail_b));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 5)
            {
                var cvs        = (CvsB_Sunburn)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(HS2_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_sunburn : ChaListDefine.CategoryNo.ft_sunburn));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 6)
            {
                var cvs        = (CvsB_Nip)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_nip));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 7)
            {
                var cvs        = (CvsB_Underhair)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_underhair));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 8)
            {
                var cvs        = (CvsF_Mole)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_mole));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 9)
            {
                var cvs        = (CvsF_Mole)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_mole));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 10)
            {
                var cvs        = (CvsF_EyeLR)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eye));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 11)
            {
                var cvs        = (CvsF_EyeLR)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyeblack));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 12)
            {
                var cvs        = (CvsF_EyeHL)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eye_hl));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 13)
            {
                var cvs        = (CvsF_Eyebrow)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyebrow));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 14)
            {
                var cvs        = (CvsF_Eyelashes)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyelash));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 15)
            {
                var cvs        = (CvsF_MakeupEyeshadow)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_eyeshadow));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 16)
            {
                var cvs        = (CvsF_MakeupEyeshadow)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_cheek));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 17)
            {
                var cvs        = (CvsF_MakeupLip)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_lip));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 18)
            {
                var cvs        = (CvsF_MakeupPaint)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(ChaListDefine.CategoryNo.st_paint));
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 19)
            {
                var cvs = (CvsF_FaceType)cvss[controllerIdx];
                cvs.UpdateSkinList();
                cvs.UpdateCustomUI();
            }
            else if (controllerIdx == 20)
            {
                var cvs        = (CvsF_FaceType)cvss[controllerIdx];
                var controller = controllers[controllerIdx];

                controller.CreateList(CvsBase.CreateSelectList(HS2_MakerSearch.sex == 0 ? ChaListDefine.CategoryNo.mt_detail_f : ChaListDefine.CategoryNo.ft_detail_f));
                cvs.UpdateCustomUI();
            }

            return(true);
        }