static void UpdateTreeView()
    {
        TreeViewCtrl treeView = s_root.FindControl("_MainTreeView") as TreeViewCtrl;

        if (treeView == null)
        {
            return;
        }

        treeView.Clear();

        string[] allAssetPaths = ResourceManageToolUtility.GetAllAssetPaths();

        foreach (var path in allAssetPaths)
        {
            if (ResourceManageToolUtility.PathIsFolder(path))
            {
                AddAssetToResourceTreeView(path);
            }
        }
    }
Exemplo n.º 2
0
    static void RefreshUIState()
    {
        var    clipProxy = SpecialEffectAnimClipEditorModel.GetInstance().CurrentClip;
        string dirtyMark = "";

        if (clipProxy == null)
        {
            s_openFileName = "空";
        }
        else
        {
            if (clipProxy.ClipPrefab == null)
            {
                s_openFileName = "未命名新动画片段";
            }
            else
            {
                s_openFileName = clipProxy.ClipPrefab.name;
            }

            if (clipProxy.IsDirty)
            {
                dirtyMark = "*";
            }
        }
        (s_root.FindControl(s_openFileTextBoxName) as TextBoxCtrl).Text = s_openFileName + dirtyMark;

        if (SpecialEffectAnimClipEditorModel.GetInstance().CanUndo())
        {
            GetUndoBtnCtrl().Enable = true;
        }
        else
        {
            GetUndoBtnCtrl().Enable = false;
        }

        if (SpecialEffectAnimClipEditorModel.GetInstance().CanRedo())
        {
            GetRedoBtnCtrl().Enable = true;
        }
        else
        {
            GetRedoBtnCtrl().Enable = false;
        }
    }
    /*
     * 搜索框
     */

    //Modify by lteng for 追加共通控件 At 2015/2/26
    static void OnSearchTextBoxChange(EditorControl c, object value)
    {
        TextBoxCtrl        searchBox          = s_root.FindControl("_SearchBox") as TextBoxCtrl;
        ComboBoxCtrl <int> typeFilterComboBox = s_root.FindControl("_AssetTypeCombo") as ComboBoxCtrl <int>;

        typeFilterComboBox.CurrValue = 0;
        if (searchBox.Text.Length == 0)
        {
            ResourceManageToolModel.GetInstance().SetFilter(0);
        }
        else
        {
            AssetNameFilter nameFilter = new AssetNameFilter();
            nameFilter.SearchText = searchBox.Text;
            ResourceManageToolModel.GetInstance().SetFilter(nameFilter);
        }
        RequestRepaint();
    }