Example #1
0
    private void E_OnBottomValueChange(string changeName)          // 底下的切换
    {
        switch (changeName)
        {
        case ITEM_STR1:
            mCurrentIndex = EXuLieTu222.XLT222_1;
            dt5_Contrl.Change2One();
            break;

        case ITEM_STR2:
            mCurrentIndex = EXuLieTu222.XLT222_2;
            dt5_Contrl.Change2Two();
            break;

        case ITEM_STR3:
            mCurrentIndex = EXuLieTu222.XLT222_3;
            dt5_Contrl.Change2Three();
            break;

        case ITEM_STR4:
            mCurrentIndex = EXuLieTu222.XLT222_4;
            dt5_Contrl.Change2Four();
            break;

        case ITEM_STR5:
            mCurrentIndex = EXuLieTu222.XLT222_5;
            dt5_Contrl.Change2Five();
            break;
        }
        slider_ChangeSize.value = Ctrl_UserInfo.Instance.L_XuLieTu222Size[(int)mCurrentIndex].ChangeValue;
        tx_Size.text            = Ctrl_UserInfo.Instance.L_XuLieTu222Size[(int)mCurrentIndex].CurrentSize.x.ToString();
        m_SrollView.content     = GetParent(mCurrentIndex);
    }
Example #2
0
    private RectTransform GetParent(EXuLieTu222 type)
    {
        RectTransform rt = null; // 放在那里

        switch (type)
        {
        case EXuLieTu222.XLT222_1:
            rt = dt5_Contrl.GO_One.transform as RectTransform;
            break;

        case EXuLieTu222.XLT222_2:
            rt = dt5_Contrl.GO_Two.transform as RectTransform;
            break;

        case EXuLieTu222.XLT222_3:
            rt = dt5_Contrl.GO_Three.transform as RectTransform;
            break;

        case EXuLieTu222.XLT222_4:
            rt = dt5_Contrl.GO_Four.transform as RectTransform;
            break;

        case EXuLieTu222.XLT222_5:
            rt = dt5_Contrl.GO_Five.transform as RectTransform;
            break;

        default:
            throw new Exception("还有其他?");
        }
        return(rt);
    }
Example #3
0
    private void DeleteOneLine(EXuLieTu222 type)           // 删除整行
    {
        Ctrl_TextureInfo.Instance.DeleteXuLieTu222OneLine(type);
        RectTransform rt = GetParent(type);

        for (int i = 0; i < rt.childCount; i++)
        {
            UnityEngine.Object.Destroy(rt.GetChild(i).gameObject);
        }
    }
Example #4
0
 public void DeleteXuLieTu222OneLine(EXuLieTu222 index)                      // 删除一行
 {
     for (int i = 0; i < l_XunLieTu222Bean.Count; i++)
     {
         if (l_XunLieTu222Bean[i].TuType == (ushort)index)
         {
             XuLieTuPathV_BeanV.Remove(l_XunLieTuBean[i].KName);
             l_XunLieTu222Bean.RemoveAt(i);
         }
     }
 }
Example #5
0
    //—————————————————— 事件 ——————————————————


    private void E_OnDaoRu(EXuLieTu222 tuType, List <FileInfo> fileInfos) // 接收导入事件 ,创建一个序列图
    {
        // 1. 创建一个实例
        Transform t = InstantiateMoBan(go_MoBan, GetParent(tuType), CREATE_FILE_NAME);

        // 2. 加载图片
        MyLoadTu.LoadMultipleTu(fileInfos, (resBean) =>
        {
            // 3. 完成后把图集加上去
            InitMoBan(t, resBean);
        });
    }
Example #6
0
    public List <string[]> GetXunLieTu222Paths(EXuLieTu222 index)                // 获取
    {
        List <string[]> paths = new List <string[]>();

        foreach (XuLieSaveBean bean in l_XunLieTu222Bean)
        {
            if (bean.TuType == (ushort)index)
            {
                paths.Add(bean.Paths);
            }
        }
        return(paths);
    }
Example #7
0
    public void DeleteXuLieTu222Save(EXuLieTu222 index, string[] paths)         // 删除
    {
        string kName = Path.GetFileNameWithoutExtension(paths[0]);

        if (string.IsNullOrEmpty(kName))
        {
            return;
        }
        kName = kName.Trim();
        XuLieTuPathV_BeanV.Remove(kName);
        for (int i = 0; i < l_XunLieTu222Bean.Count; i++)
        {
            XuLieSaveBean bean = l_XunLieTu222Bean[i];
            if (bean.KName == kName && bean.TuType == (ushort)index)
            {
                l_XunLieTu222Bean.RemoveAt(i);
                return;
            }
        }
    }
Example #8
0
    private void E_ResultDaoRu(EXuLieTu222 tuType, List <ResultBean> resultBeans)
    {
        Transform t = InstantiateMoBan(go_MoBan, GetParent(tuType), CREATE_FILE_NAME);

        InitMoBan(t, resultBeans.ToArray());
    }