Exemplo n.º 1
0
    private void E_DaoRuFromTuResult(EDuoTuInfoType type, ushort bigIndex, ushort bottomIndex, List <ResultBean> resultBeans) // 通过 ResultBean 导入
    {
        mCurrentBigIndex    = bigIndex;
        mCurrentBottomIndex = bottomIndex;
        bool isSaveOk = Ctrl_XuLieTu.Instance.Save(bigIndex, bottomIndex, resultBeans.ToFullPaths());

        ShowThis(isSaveOk, type);
        if (isSaveOk)
        {
            MyEventCenter.SendEvent(E_GameEvent.DaoRu_FromResult, bigIndex, bottomIndex, resultBeans);
            switch (type)
            {
            case EDuoTuInfoType.DaoRu:
                MyEventCenter.SendEvent(E_GameEvent.ChangeDaoRuGreenText, resultBeans);       // 告诉改颜色
                break;

            case EDuoTuInfoType.InfoShow:
                MyEventCenter.SendEvent(E_GameEvent.DaoRuSucees2Delete, resultBeans);
                break;

            case EDuoTuInfoType.SearchShow:
                break;
            }
        }
    }
Exemplo n.º 2
0
    public void ShowThis(bool isSaveOk, EDuoTuInfoType type)       // 显示
    {
        mUIGameObject.SetActive(true);
        go_Ok.SetActive(isSaveOk);
        go_Error.SetActive(!isSaveOk);
        go_Bottom1.SetActive(false); go_Bottom2.SetActive(false); go_Bottom3.SetActive(false);

        switch (type)
        {
        case EDuoTuInfoType.SearchShow:
            go_Bottom1.SetActive(true);
            break;

        case EDuoTuInfoType.InfoShow:
            go_Bottom2.SetActive(true);
            tx_GoTo2.text = "去" + Ctrl_ContantInfo.Instance.LeftItemNames[mCurrentBigIndex] + "处";
            break;

        case EDuoTuInfoType.DaoRu:
            go_Bottom3.SetActive(true);
            tx_GoTo3.text = "去" + Ctrl_ContantInfo.Instance.LeftItemNames[mCurrentBigIndex] + "处";
            break;

        default:
            throw new Exception("未定义 —— " + type);
        }
    }
Exemplo n.º 3
0
 private void E_ShowDuoTuInfo(ResultBean[] resultBeans, EDuoTuInfoType type)
 {
     if (isShow && go_TopTip.activeSelf)
     {
         go_TopTip.SetActive(false);
     }
 }
Exemplo n.º 4
0
 private void E_DeleteOne(EDuoTuInfoType type, string[] paths)      // 多图信息中删除一个
 {
     if (type == EDuoTuInfoType.InfoShow)
     {
         DeleteOne(Path.GetFileNameWithoutExtension(paths[0]));
     }
 }
Exemplo n.º 5
0
    //————————————————————————————————————


    private void E_CloseDuoTuInfo(EDuoTuInfoType type)                  // 关闭显示多图信息
    {
        if (type == EDuoTuInfoType.InfoShow)
        {
            mUIGameObject.SetActive(true);
        }
    }
Exemplo n.º 6
0
    //—————————————————— 事件 ——————————————————



    private void E_DaoRuTuFromFile(EDuoTuInfoType type, ushort bigIndex, ushort bottomIndex, List <FileInfo> fileInfos)      // 通过 FileInfo 导入
    {
        mCurrentBigIndex    = bigIndex;
        mCurrentBottomIndex = bottomIndex;
        bool isSaveOk = Ctrl_XuLieTu.Instance.Save(bigIndex, bottomIndex, fileInfos.ToFullPaths());

        ShowThis(isSaveOk, type);
        if (isSaveOk)
        {
            MyEventCenter.SendEvent(E_GameEvent.DaoRu_FromFile, bigIndex, bottomIndex, fileInfos);
        }
    }
Exemplo n.º 7
0
    //—————————————————— 事件 ——————————————————



    private void E_Show(ResultBean[] resultBeans, EDuoTuInfoType type)      // 显示
    {
        l_CurrentBeans = new List <ResultBean>(resultBeans);
        mCurrentType   = type;
        go_UseJianBanTip.SetActive(false);
        mUIGameObject.SetActive(true);

        switch (type)
        {
        case EDuoTuInfoType.DaoRu:
            go_Delete.SetActive(false);
            go_BtnJianBan.SetActive(true);
            go_AllDaoRu.SetActive(true);
            for (int i = 0; i < l_TittleNames.Length; i++)
            {
                l_TittleNames[i].text = "导入 " + Ctrl_ContantInfo.Instance.LeftItemNames[i] + " 处";
            }
            break;

        case EDuoTuInfoType.InfoShow:
            go_Delete.SetActive(true);
            go_BtnJianBan.SetActive(false);
            go_AllDaoRu.SetActive(true);
            for (int i = 0; i < l_TittleNames.Length; i++)
            {
                l_TittleNames[i].text = "转移到 " + Ctrl_ContantInfo.Instance.LeftItemNames[i] + " 处";
            }
            break;

        case EDuoTuInfoType.SearchShow:
            go_Delete.SetActive(false);
            go_BtnJianBan.SetActive(false);
            go_AllDaoRu.SetActive(false);
            break;

        default:
            throw new Exception("未定义");
        }

        isFirstShowItem = true;
        ShowWhicContant(true);

        // 设置右边信息
        tx_Name.text = Path.GetFileNameWithoutExtension(resultBeans[0].File.FullName);
        tx_Num.text  = resultBeans.Length.ToString();
        tx_Size.text = resultBeans[0].Width + "x" + resultBeans[0].Height;


        yuanLaiWidth = resultBeans[0].Width;
        yuanLaiHidth = resultBeans[0].Height;
        anim_Tu.ChangeAnim(resultBeans.ToSprites());
        SetTuSize(yuanLaiWidth, yuanLaiHidth);


        // 是否尺寸全部相同
        bool isAllSameSize = true;

        for (int i = 0; i < resultBeans.Length; i++)
        {
            if (yuanLaiWidth != resultBeans[i].Width || yuanLaiHidth != resultBeans[i].Height)
            {
                isAllSameSize = false;
                break;
            }
        }
        go_NoEqualTip.SetActive(!isAllSameSize);
    }