void ListResources() { mListPos = EditorGUILayout.BeginScrollView(mListPos); if (mListUpdate) { mResourceList.Clear(); int type = (int)mResourceType; if (mResourceRedundanceMgr.mTypeFileDictionary.ContainsKey(type)) { Dictionary <string, ResourceUnit> fileDic = mResourceRedundanceMgr.mTypeFileDictionary[type]; { // foreach(var fileRes in fileDic) var __enumerator1 = (fileDic).GetEnumerator(); while (__enumerator1.MoveNext()) { var fileRes = (KeyValuePair <string, ResourceUnit>)__enumerator1.Current; { ResourceUnit resUnit = fileRes.Value; string stateName; if (resUnit.IsLost()) { if (!mLostCheckbox) { continue; } stateName = "Lost"; } else if (resUnit.IsUsed()) { if (!mUsedCheckbox) { continue; } stateName = "Used"; } else { if (!mRedundantCheckbox) { continue; } stateName = "Redundant"; } Entry ent = new Entry(); ent.resUnit = resUnit; ent.stateName = stateName; mResourceList.Add(ent); } } } } mListUpdate = false; } { var __list2 = mResourceList; var __listCount2 = __list2.Count; for (int __i2 = 0; __i2 < __listCount2; ++__i2) { var ent = (Entry)__list2[__i2]; { DrawRow(ent, true); } } } EditorGUILayout.EndScrollView(); }
void ListResources( ) { mListPos = EditorGUILayout.BeginScrollView(mListPos); if (mListUpdate) { mResourceList.Clear( ); int type = ( int )mResourceType; if (mResourceRedundanceMgr.mTypeFileDictionary.ContainsKey(type)) { Dictionary <string, ResourceUnit> fileDic = mResourceRedundanceMgr.mTypeFileDictionary [type]; foreach (KeyValuePair <string, ResourceUnit> fileRes in fileDic) { ResourceUnit resUnit = fileRes.Value; string stateName; if (resUnit.IsLost( )) { if (!mLostCheckbox) { continue; } stateName = "Lost"; } else if (resUnit.IsUsed( )) { if (!mUsedCheckbox) { continue; } stateName = "Used"; } else { if (!mRedundantCheckbox) { continue; } stateName = "Redundant"; } Entry ent = new Entry( ); ent.resUnit = resUnit; ent.stateName = stateName; mResourceList.Add(ent); } } mListUpdate = false; } foreach (Entry ent in mResourceList) { DrawRow(ent, true); } EditorGUILayout.EndScrollView( ); }