Пример #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();
     }
 }
Пример #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);
     }
 }
Пример #3
0
 /// <summary>
 /// 'Printlns' the CoolText.
 /// </summary>
 /// <param name="text"></param>
 public static void Println(this CoolText text)
 {
     Out.Println(text);
 }
Пример #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());
 }
Пример #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());
 }
Пример #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));
 }
Пример #7
0
 /// <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;
 }
Пример #8
0
 /// <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;
 }
Пример #9
0
 /// <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);
 }
Пример #10
0
 /// <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);
 }