private void RefreshSceneList() { for (int i = 0; i < (int)SceneType.Max; ++i) { sceneList[i].ClearRows(); string[] paths = SceneRootPaths[i].Split(new char[] { ';' }, System.StringSplitOptions.RemoveEmptyEntries); foreach (string rootPath in paths) { if (!System.IO.Directory.Exists(rootPath)) { continue; } string[] scenes = System.IO.Directory.GetFiles(rootPath, "*.unity", System.IO.SearchOption.AllDirectories); foreach (string scene in scenes) { if ((SceneType)i == SceneType.Design) { if (scene.Contains("Art_Templates")) { continue; } } if ((SceneType)i == SceneType.Art) { if (scene.Contains("_art") == false) { continue; } } if ((SceneType)i == SceneType.Design) { if (scene.Contains("_design") == false) { continue; } } if ((SceneType)i == SceneType.Sound) { if (scene.Contains("_sound") == false) { continue; } } ListCtrl.Row row = sceneList[i].AddRow(); //row.AddItem(System.IO.Path.GetDirectoryName(scene)); ListCtrl.Item item = row.AddItem(System.IO.Path.GetFileNameWithoutExtension(scene)); item.SetData(scene); } } } }
private void OnEventLog(EventLogger.EventLog eventLog) { ListCtrl.Row row = eventLogList.AddRow(); ListCtrl.Item mainItem = null; ListCtrl.Item nameItem = null; // if (EventLogger.IsCombatEvent(eventLog.eventLogType)) // { // EventLogger.CombatLogDetail detail = eventLog.detail as EventLogger.CombatLogDetail; // if (detail != null) // { // mainItem = row.AddItem(string.Format("{0:0.000}({1})", eventLog.time, detail.frame)); // nameItem = row.AddItem(detail.name); // row.AddItem(eventLog.message); // } // } // else { mainItem = row.AddItem(string.Format("{0:0.000}({1})", eventLog.time, eventLog.simulationFrame)); nameItem = row.AddItem(eventLog.eventLogType.ToString()); row.AddItem(eventLog.message); } mainItem.SetData(eventLog); Filter filter = nameFilterList.AddNameFilter(nameItem.Text); if (filter != null) { filter.count++; } ApplyFilter(row); Repaint(); }