Beispiel #1
0
        //...
        static bool OnLogMessageReceived(Logger.Message msg)
        {
            if (msg.tag == "Editor")
            {
                return(false);
            }
            var graph = Graph.GetElementGraph(msg.context);

            if (graph == null)
            {
                return(false);
            }

            if (!graphsMap.ContainsKey(graph))
            {
                graphsMap[graph] = new List <Logger.Message>();
            }
            graphsMap[graph].Add(msg);
            messages.Add(msg);

            if (current != null)
            {
                current.RefreshTitle();
                willRepaint = true;
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        //...
        static bool OnLogMessageReceived(Logger.Message msg)
        {
            if (msg.tag == "Editor")
            {
                return(false);
            }

            if (ParadoxNotion.Services.Threader.isMainThread)
            {
                if (!Prefs.logEventsInfo && msg.tag == LogTag.EVENT)
                {
                    return(true);
                }

                if (!Prefs.logVariablesInfo && msg.tag == LogTag.VARIABLE)
                {
                    return(true);
                }
            }

            var graph = Graph.GetElementGraph(msg.context);

            if (graph == null)
            {
                return(false);
            }

            if (!graphsMap.ContainsKey(graph))
            {
                graphsMap[graph] = new List <Logger.Message>();
            }

            graphsMap[graph].Add(msg);
            messages.Add(msg);

            if (current != null)
            {
                current.RefreshTitle();
                return(true);
            }

            return(false);
        }