/// <summary> /// Send a message using a specified color. /// </summary> /// <param name="message">The message you are sending.</param> /// <param name="messageColor">Color.Colors the message will be in.</param> public static void Message(string message, Color.Colors messageColor) { Color.Colors oldFore = Color.CurrentForeground; Color.Foreground(messageColor); System.Console.WriteLine(message); Color.Foreground(oldFore); }
/// <summary> /// Sends multiple messages all using a specified color. /// </summary> /// <param name="message">The messages you are sending.</param> /// <param name="messageColor">Color.Colors the messages will be in.</param> public static void MultiMessage(string[] message, Color.Colors messageColor) { foreach (string input in message) { Message(input, messageColor); } }
/// <summary> /// Sends a Error message to the console application. /// </summary> /// <param name="message">The message you want to appear.</param> public static void LogError(string message) { oldCol = Color.CurrentForeground; Color.Foreground(Color.Colors.Red); System.Console.WriteLine(" Error" + " - " + message); Color.Foreground(oldCol); }
/// <summary> /// Sends a Warning message to the console application. /// </summary> /// <param name="message">The message you want to appear.</param> public static void LogWarning(string message) { oldCol = Color.CurrentForeground; Color.Foreground(Color.Colors.Yellow); System.Console.WriteLine(" Warning" + " - " + message); Color.Foreground(oldCol); }
/// <summary> /// Sends a Debug message to the console application. /// </summary> /// <param name="message">The message you want to appear.</param> public static void LogDebug(string message) { oldCol = Color.CurrentForeground; Color.Foreground(Color.Colors.Cyan); System.Console.WriteLine(" Debug" + " - " + message); Color.Foreground(oldCol); }
public Car(int year, string make, string model, Color.Colors color) : base() { this.year = year; this.make = make; this.model = model; this.color = color; }
/// <summary> /// Sends multiple messages using a specified color and optionally display them as soon as they are sent. /// </summary> /// <param name="message">The messages you are sending.</param> /// <param name="messageColor">Color.Colors the messages will be in.</param> /// <param name="displayNow">True: Calls Display(); - False: Does not call function.</param> public static void MultiMessage(string[] message, Color.Colors messageColor, bool displayNow) { foreach (string input in message) { Message(input, messageColor); } if (displayNow) { Display(); } }
/// <summary> /// Send a message using a specified color and optionally displaying as soon as it's sent. /// </summary> /// <param name="message">The message you are sending.</param> /// <param name="messageColor">Color.Colors the message will be in.</param> /// <param name="displayNow">True: Calls Display(); - False: Does not call function.</param> public static void Message(string message, Color.Colors messageColor, bool displayNow) { Color.Colors oldFore = Color.CurrentForeground; Color.Foreground(messageColor); System.Console.WriteLine(message); Color.Foreground(oldFore); if (displayNow) { Display(); } }