public void SelectItem(string name)
        {
            PatternSelectInfo patternSelectInfo = this._lstSelectInfo.Find((Predicate <PatternSelectInfo>)(item => item.name == name));

            if (patternSelectInfo == null)
            {
                return;
            }
            patternSelectInfo.sic.tgl.set_isOn(true);
            this.ChangeItem(patternSelectInfo.sic);
            this.UpdateScrollPosition();
        }
        public string SetPatternTex(int _idx, int _key)
        {
            if (_key <= 0)
            {
                this.itemInfo.colors[_idx].pattern.key      = _key;
                this.itemInfo.colors[_idx].pattern.filePath = string.Empty;
                if (Object.op_Implicit((Object)this.itemComponent))
                {
                    this.itemComponent.SetPatternTex(_idx, (Texture2D)null);
                }
                this.ReleasePatternTex(_idx);
                return("なし");
            }
            PatternSelectInfo patternSelectInfo = Singleton <Studio.Studio> .Instance.patternSelectListCtrl.lstSelectInfo.Find((Predicate <PatternSelectInfo>)(p => p.index == _key));

            string str1 = "なし";

            if (patternSelectInfo != null)
            {
                if (patternSelectInfo.assetBundle.IsNullOrEmpty())
                {
                    string str2 = UserData.Path + "pattern/" + patternSelectInfo.assetName;
                    if (!File.Exists(str2))
                    {
                        return("なし");
                    }
                    this.texturePattern[_idx] = PngAssist.LoadTexture(str2);
                    this.itemInfo.colors[_idx].pattern.key      = -1;
                    this.itemInfo.colors[_idx].pattern.filePath = patternSelectInfo.assetName;
                    str1 = patternSelectInfo.assetName;
                }
                else
                {
                    string assetBundleName = patternSelectInfo.assetBundle.Replace("thumb/", string.Empty);
                    string assetName       = patternSelectInfo.assetName.Replace("thumb_", string.Empty);
                    this.texturePattern[_idx] = CommonLib.LoadAsset <Texture2D>(assetBundleName, assetName, false, string.Empty);
                    this.itemInfo.colors[_idx].pattern.key      = _key;
                    this.itemInfo.colors[_idx].pattern.filePath = string.Empty;
                    str1 = patternSelectInfo.name;
                }
            }
            this.itemComponent.SetPatternTex(_idx, this.texturePattern[_idx]);
            Resources.UnloadUnusedAssets();
            return(str1);
        }
        public int GetIndexFromName(string name)
        {
            PatternSelectInfo patternSelectInfo = this._lstSelectInfo.Find((Predicate <PatternSelectInfo>)(item => item.name == name));

            return(patternSelectInfo != null ? patternSelectInfo.index : -1);
        }
        public int GetSelectIndex()
        {
            PatternSelectInfo patternSelectInfo = this._lstSelectInfo.Find((Predicate <PatternSelectInfo>)(psi => psi.interactable & psi.activeSelf & psi.isOn));

            return(patternSelectInfo != null ? patternSelectInfo.index : -1);
        }
        public string GetNameFormIndex(int index)
        {
            PatternSelectInfo patternSelectInfo = this._lstSelectInfo.Find((Predicate <PatternSelectInfo>)(item => item.index == index));

            return(patternSelectInfo != null ? patternSelectInfo.name : string.Empty);
        }