Esempio n. 1
0
        public void LogWarning(string msg)
        {
            ConsoleInfo info = new ConsoleInfo(msg, EConsoleInfoType.EConsoleInfoType_Warning);

            while (infoStack.Count >= maxcount)
            {
                Pop();
            }
            infoStack.Push(info);
        }
Esempio n. 2
0
        void Push(string msg, EConsoleInfoType type)
        {
            while (infoStack.Count >= maxcount)
            {
                Pop();
            }
            ConsoleInfo info = new ConsoleInfo(msg, type);

            infoStack.Push(info);
        }
Esempio n. 3
0
        public void LogError(string str)
        {
#if DEBUG
            StackTrace insStackTrace = new StackTrace(true);
            StackFrame insStackFrame = insStackTrace.GetFrame(1);
            string     fileName      = insStackFrame.GetFileName();
            int        fileLines     = insStackFrame.GetFileLineNumber();
            int        fileColumns   = insStackFrame.GetFileColumnNumber();
            string     msg           = string.Format("FileName::{0} LineNum::{1} :: ColumnsNum{2}   {3}", fileName, fileLines, fileColumns, str);
#else
            string msg = str;
#endif
            ConsoleInfo info = new ConsoleInfo(msg, EConsoleInfoType.EConsoleInfoType_Error);
            while (infoStack.Count >= maxcount)
            {
                Pop();
            }
            infoStack.Push(info);
        }