Beispiel #1
0
 /// <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();
     }
 }
Beispiel #2
0
 /// <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);
     }
 }
Beispiel #3
0
 /// <summary>
 /// 'Printlns' the CoolText.
 /// </summary>
 /// <param name="text"></param>
 public static void Println(this CoolText text)
 {
     Out.Println(text);
 }
Beispiel #4
0
 /// <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());
 }
Beispiel #5
0
 /// <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());
 }
Beispiel #6
0
 /// <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);
 }