/// <summary> /// 'Printlns' the CoolText with all specified snippets and colors! /// </summary> /// <param name="coolText"></param> public static void Println(CoolText coolText) { lock (lockP) { Print(coolText); Println(); } }
/// <summary> /// Prints the CoolText with all specified snippets and colors! /// </summary> /// <param name="coolText"></param> public static void Print(CoolText coolText) { lock (lockP) { if (coolText == null) { return; } Print(coolText.CoolSnippets); } }
/// <summary> /// 'Printlns' the CoolText. /// </summary> /// <param name="text"></param> public static void Println(this CoolText text) { Out.Println(text); }
/// <summary> /// Returns a CoolText with the specified default back color. /// * The colors inside have preference. /// </summary> /// <param name="coolText"></param> /// <param name="backColor"></param> /// <returns></returns> public static CoolText On(this CoolText coolText, FColor backColor) { return((CoolText)coolText.CoolSnippets.Select(x => x.WithDefaultColors(FColor.Default, backColor)).ToArray()); }
/// <summary> /// Returns a CoolText with the specified default text color. /// * The colors inside have preference. /// </summary> /// <param name="coolText"></param> /// <param name="textColor"></param> /// <returns></returns> public static CoolText I(this CoolText coolText, FColor textColor) { return((CoolText)coolText.CoolSnippets.Select(x => x.WithDefaultColors(textColor, FColor.Default)).ToArray()); }
/// <summary> /// Encapsulates the CoolText value with the specified colors in this instance of IPrinter then Prints it. /// </summary> /// <param name="value"></param> public void Print(CoolText value) { Out.Print(value.I(TextColor, BackColor)); }
/// <summary> /// Creates a CoolInputOpt with the specified parameters. /// </summary> /// <param name="requestMessage">The message to be printed when 'InvalidInputMessage()' is called.</param> /// <param name="invalidInputMessage">The message to be printed when 'InvalidInputMessage()' is called.</param> /// <returns></returns> public CoolInputOpt(CoolText requestMessage, CoolText invalidInputMessage) { RequestMsg = requestMessage; InvalidInputMsg = invalidInputMessage; }
/// <summary> /// Creates a CoolInputOpt with the specified parameters. /// </summary> /// <param name="requestMessage">The message to be printed when 'InvalidInputMessage()' is called.</param> /// <returns></returns> public CoolInputOpt(CoolText requestMessage) { RequestMsg = requestMessage; InvalidInputMsg = Default_InvalidInputMsg; }
/// <summary> /// Changes the RequestMsg and the InvalidInputMsg and returns this CoolInputOpt. /// </summary> /// <param name="requestMsg"></param> /// <param name="invalidInputMsg"></param> /// <returns></returns> public CoolInputOpt SetMsg(CoolText requestMsg, CoolText invalidInputMsg) { this.RequestMsg = requestMsg; this.InvalidInputMsg = invalidInputMsg; return(this); }
/// <summary> /// Changes the RequestMsg and returns this CoolInputOpt. /// </summary> /// <param name="requestMsg"></param> /// <returns></returns> public CoolInputOpt SetMsg(CoolText requestMsg) { this.RequestMsg = requestMsg; return(this); }