Ejemplo n.º 1
0
            /// <summary>
            /// Shows the debug-info in the console-window
            /// </summary>
            /// <param name="pMessage">Message-string to be shown and logged</param>
            /// <param name="pType">Messagetype</param>
            public static void ToConsole(string pMessage, LPHPMessageType pType)
            {
                // Save previous console color
                ConsoleColor foreColor = Console.ForegroundColor;
                ConsoleColor backColor = Console.BackgroundColor;

                // Custom console color style based on message-type
                switch (pType)
                {
                case LPHPMessageType.LPHPSuccess:
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.BackgroundColor = ConsoleColor.DarkGreen;
                    break;

                case LPHPMessageType.LPHPWarning:
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    break;

                case LPHPMessageType.LPHPError:
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.BackgroundColor = ConsoleColor.DarkRed;
                    break;
                }

                // Output message
                Console.WriteLine(pMessage);

                // Reset to old console colors
                Console.ForegroundColor = foreColor;
                Console.BackgroundColor = backColor;

                LogDebugData(pMessage, pType);
            }
Ejemplo n.º 2
0
        private void DebugToTxb(string pMessage, LPHPMessageType pType)
        {
            Color foreColor = Color.White;

            switch (pType)
            {
            case LPHPMessageType.LPHPSuccess:
                foreColor = Color.Lime;
                break;

            case LPHPMessageType.LPHPWarning:
                foreColor = Color.OrangeRed;
                break;

            case LPHPMessageType.LPHPError:
                foreColor = Color.Red;
                break;
            }

            bgwLPHPCompiler.ReportProgress(0, new Tuple <string, Color>(pMessage, foreColor));


            LPHPDebugger.LogDebugData(pMessage.Replace(Environment.NewLine, ""), pType);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Shows the debug-info in the debug-window
 /// </summary>
 /// <param name="pMessage">Message-string to be shown and logged</param>
 /// <param name="pType">Messagetype</param>
 public static void ToDebug(string pMessage, LPHPMessageType pType)
 {
     Debug.Print(pMessage);
     LogDebugData(pMessage, pType);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Disables all logging-systems
 /// </summary>
 /// <param name="pMessage">Message-string to be shown and logged</param>
 /// <param name="pType">Messagetype</param>
 public static void None(string pMessage, LPHPMessageType pType)
 {
 }