示例#1
0
        public static void WriteLine(string line, bool Time)
        {
            //(newLine == true ? "\n" : "")
            data.ConsoleLog.text += "\n " + (Time == true ?
                                             RitchTextHelper.Combine(
                                                 "|" + DateTime.Now.ToString("HH:mm:ss") + "| ", RitchTextHelper.ColorToHex(data.TimeTextColor), false, true)
                                             : "")

                                    + RitchTextHelper.DoColor(data.LineChar + line, RitchTextHelper.ColorToHex(data.DefaultTextColor));
        }
示例#2
0
 static void SearchCommand(string rawCommand)
 {
     WriteLine(" " + RitchTextHelper.Combine(rawCommand, RitchTextHelper.ColorToHex(data.TypedCommandColor), false, true));
     rawCommand = rawCommand.Substring(1, data.ConsoleInputField.text.Length - 1);
     if (string.IsNullOrEmpty(rawCommand.Substring(1, rawCommand.Length - 1)))
     {
         WriteLine(RitchTextHelper.Combine("Unreco cmd", RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false));
     }
     else
     {
         try
         {
             consoleBase.Invoke(rawCommand);
         }
         catch (Exception e)
         {
             var be = e.GetBaseException();
             WriteLine(RitchTextHelper.Combine("Unreco cmd", RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false) + "(Details): " + be.Message);
         }
     }
 }
示例#3
0
 public static void PrintErrorMessage(string errorMsg, bool newline)
 {
     WriteLine(RitchTextHelper.Combine(errorMsg, RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false), newline);
 }
示例#4
0
 public static void PrintErrorMessage(string errorMsg, string pasted)
 {
     WriteLine(RitchTextHelper.Combine(errorMsg, RitchTextHelper.ColorToHex(data.ErrorCommandColor), true, false) + ": " + pasted);
 }