示例#1
0
        public void OnNotify_LOG_ARRIVED()
        {
            Utils.Assert_UIThread();
            Debug.Assert(_logs.Count != 0);

            SciterValue data = new SciterValue();

            foreach (var item in _logs)
            {
                SciterValue logval = new SciterValue();
                logval.SetItem(0, new SciterValue((int)item.subsystem));
                logval.SetItem(1, new SciterValue((int)item.severity));
                logval.SetItem(2, new SciterValue(item.text));
                data.Append(logval);

                Console.WriteLine(item.text);
            }

            _in_output = true;
            App.AppHost.CallFunction("Extern_ConsoleAppendLines", data);
            _in_output = false;

            _logs.Clear();
            _pending_output = false;
        }