Пример #1
0
    //------------------------------------------------------------------------------------------------------------------
    //
    // 打包升级用资源
    //
    //--------------------------------------------------------------------------------------------
    // 打包升级用资源
    void OnLyrPackUpdate(BuildPackWindow src, float fx, float fy)
    {
        string verPth = "PackVers/";

        if (GUI.Button(new Rect(fx + 355, fy, 40, 20), @"比较"))
        {
            NtfCompare(src);
        }

        float fw = 335;

        GUI.Label(new Rect(fx, fy + 25, fw, 20), @"基础版本: " + mfCsv0);
        if (GUI.Button(new Rect(fx + fw + 20, fy + 25, 40, 20), @"查找"))
        {
            string fl = EditorUtility.OpenFilePanel(@"源版本文件", verPth, "csv");
            if (fl.Length > 0)
            {
                mfCsv0 = ArchiveUtil.NtfPathBeginPackVers(fl);
                NtfCompare(src);
            }
        }

        GUI.Label(new Rect(fx, fy + 50, fw, 20), @"比对版本: " + mfCsv1);
        if (GUI.Button(new Rect(fx + fw + 20, fy + 50, 40, 20), @"查找"))
        {
            string fl = EditorUtility.OpenFilePanel(@"目标版本文件", verPth, "csv");
            if (fl.Length > 0)
            {
                mfCsv1 = ArchiveUtil.NtfPathBeginPackVers(fl);
                NtfCompare(src);
            }
        }

        mCmpView.OnDrawView(fx, fy + 75, mCmpFile.ToArray());
    }
Пример #2
0
    //------------------------------------------------------------------------------------------------------------------
    //
    // 将全部资源进行打包
    //
    //--------------------------------------------------------------------------------------------
    // 将全部资源进行打包
    void OnLyrPackClient(BuildPackWindow src, float fx, float fy)
    {
        if (GUI.Button(new Rect(fx, fy - 2, 40, 20), @"查找"))
        {
            string verPth = "PackVers/";
            string szf    = EditorUtility.OpenFilePanel(@"版本文件", verPth, "csv");
            if (szf.Length > 0)
            {
                mCsvFile.loadCsvFile(szf, true);
                src.GenViewData(mCsvFile, szf);
                GenFromCsv();
            }
        }

        mFixView.OnDrawView(fx, fy + 25, mFixFile.ToArray());
    }
Пример #3
0
    //--------------------------------------------------------------------------------------------
    Vector2 OnLyrVerInfor(BuildPackWindow src, float fx, float fy)
    {
        GUI.Label(new Rect(fx, fy + 2, 150, 20), @"当前版本:" + PackVerCfg.GetCurVer());

        if (GUI.Button(new Rect(fx + 150, fy - 2, 50, 20), @"刷 新"))
        {
            src.mVerMng.NtfSearchPackVers();
        }

        GUI.Label(new Rect(fx + 210, fy + 2, 80, 20), @"版本文件列表:");
        List <string> sList = src.mVerMng.GetVerList();

        if (mViewList.OnDrawView(fx, fy + 20, sList.ToArray()))
        {
            string szf = src.GetVerFile(mViewList.mHitRow);
            mCsvFile.loadCsvFile(szf, true);
            src.GenViewData(mCsvFile, szf);
        }

        return(new Vector2(340, 280));
    }
Пример #4
0
    //------------------------------------------------------------------------------
    // 版本制作
    Vector2 OnLyrMakeVerInfor(BuildPackWindow src, float fx, float fy)
    {
        if (GUI.Button(new Rect(fx, fy - 2, 70, 20), @"设置目录"))
        {
            string sel = EditorUtility.OpenFolderPanel("Search Files", Application.dataPath, "");
            if (sel.Length > 0)
            {
                mMD5List.Clear();
                mMD5List = null;
                mMD5List = ArchiveUtil.NtfGetFiles(sel, true, ArchiveUtil.mSkips);
            }
        }
        if (GUI.Button(new Rect(fx + 75, fy - 2, 40, 20), @"生成"))
        {
            OnClickBtnGenMD5(src);
        }
        if (GUI.Button(new Rect(fx + 115, fy - 2, 40, 20), @"比对"))
        {
            OnClickBtnCompare(src);
        }

        string szTxt = "";

        if (ArchiveUtil.mArMsg.Length > 0)
        {
            szTxt = ArchiveUtil.mArMsg;
        }
        else if (mMD5List != null)
        {
            szTxt = @"选中文件: " + mMD5List.Count;
        }
        GUI.Label(new Rect(fx + 220, fy + 2, 150, 20), szTxt);

        if (mMD5List != null)
        {
            mMD5View.OnDrawView(fx, fy + 20, mMD5List.ToArray());
        }
        return(new Vector2(340, 280));
    }