Exemplo n.º 1
0
    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();
    }