private ConsoleColor GetConsoleColor(ConsoleColor current, ConsoleThemeColor color)
 {
     ConsoleColorExt ext = this.GetColor(color);
     if (ext != ConsoleColorExt.Inhreit)
     {
         return (ConsoleColor) ext;
     }
     return current;
 }
        private ConsoleColor GetConsoleColor(ConsoleColor current, ConsoleThemeColor color)
        {
            ConsoleColorExt ext = this.GetColor(color);

            if (ext != ConsoleColorExt.Inhreit)
            {
                return((ConsoleColor)ext);
            }
            return(current);
        }
 public ConsoleColorExt this[ConsoleThemeColor color]
 {
     get
     {
         return(this.Mappings[(int)color]);
     }
     set
     {
         this.Mappings[(int)color] = value;
     }
 }
Exemple #4
0
        static GuiTerminal()
        {
            ShowFullErrors = false;
            RC.Verbosity   = ConsoleVerbosity.Normal;

            InfoColor       = ConsoleThemeColor.SubTextGood;
            InfoDetailColor = ConsoleThemeColor.SubText;

            ErrorColor       = ConsoleThemeColor.TextBad;
            ErrorDetailColor = ConsoleThemeColor.SubTextBad;

            TransmitColor = ConsoleThemeColor.SubTextGood;
            ReceiveColor  = ConsoleThemeColor.SubTextBad;
            TimeTagColor  = ConsoleThemeColor.SubText;
            MessageColor  = ConsoleThemeColor.Text;
        }
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string CreatePackage()
        {
            if (Helper.IsNullOrEmpty(SaltValue))
            {
                SaltValue = Guid.NewGuid().ToString();
            }

            string archivePath = CreateTempPackage();

            long packageSize = new FileInfo(archivePath).Length;

            if (Recompress)
            {
                archivePath = RecompressPackage(archivePath);
            }

            m_CompressedSize = new FileInfo(archivePath).Length;

            ConsoleThemeColor resultColour = ConsoleThemeColor.Text;

            if (m_CompressedSize <= (m_TotalInitialSize / 4) * 3)
            {
                resultColour = ConsoleThemeColor.TextGood;
            }
            else if (m_CompressedSize < m_TotalInitialSize)
            {
                resultColour = ConsoleThemeColor.SubTextNutral;
            }
            else
            {
                resultColour = ConsoleThemeColor.TextBad;
            }

            RC.WriteLine(ConsoleVerbosity.Verbose, ConsoleThemeColor.TitleText, "\n" + Rpx.Strings.Package_SummaryTitle);
            CmdHelper.WriteInfoToConsole(ConsoleVerbosity.Normal, Rpx.Strings.Package_FilesTotalSize, CmdHelper.GetMemStringFromBytes(m_TotalInitialSize, true), RC.Theme[ConsoleThemeColor.Text]);
            CmdHelper.WriteInfoToConsole(ConsoleVerbosity.Normal, Rpx.Strings.Package_CompressedSize, CmdHelper.GetMemStringFromBytes(m_CompressedSize, true), RC.Theme[resultColour]);
            CmdHelper.WriteInfoToConsole(ConsoleVerbosity.Normal, Rpx.Strings.Package_Compression, (100 - (((double)m_CompressedSize / (double)m_TotalInitialSize) * 100.0)).ToString("N2") + "%  ", RC.Theme[resultColour]);

            OutputFile = archivePath;

            return(archivePath);
        }
Exemple #6
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string str)
 {
     App.WriteWarning(colour, id, str);
 }
Exemple #7
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, int errorId, string str)
 {
     App.WriteMessage(type, colour, errorId, str);
 }
 public void Write(ConsoleThemeColor color, string format, params object[] args)
 {
     this.m_Result.AppendFormat("<t:{0}>{1}</t>{2}", (int) color, EscapeString(string.Format(format, args)), Environment.NewLine);
 }
Exemple #9
0
 public void Write(ConsoleThemeColor colour, string str)
 {
     ConsoleExt.Write(colour, str);
 }
Exemple #10
0
 public static void WritePrompt(ConsoleThemeColor colour, string str)
 {
     WriteMessage(ConsoleMessage.Prompt, Theme[colour], str);
 }
 public ConsoleColorExt this[ConsoleThemeColor color]
 {
     get
     {
         return this.Mappings[(int) color];
     }
     set
     {
         this.Mappings[(int) color] = value;
     }
 }
Exemple #12
0
 public static void WriteLine(ConsoleVerbosity level, ConsoleThemeColor colour, string str)
 {
     WriteLine(level, Theme[colour], str);
 }
Exemple #13
0
 public static void WriteInterpreted(ConsoleThemeColor colour, string buffer, int paddingLeft, int paddingRight)
 {
     ConsoleFormatter.WriteInterpreted(m_SystemConsole, Theme[colour], buffer, paddingLeft, paddingRight);
 }
Exemple #14
0
 public static void WriteLine(ConsoleThemeColor colour, string str)
 {
     WriteLine(Theme[colour], str);
 }
Exemple #15
0
 public static void WriteError(ConsoleThemeColor colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Error, Theme[colour], id, str);
 }
Exemple #16
0
 public void WriteWarning(ConsoleThemeColor colour, int id, string str)
 {
     ConsoleExt.WriteWarning(colour, id, str);
 }
Exemple #17
0
 public void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, string str)
 {
     ConsoleExt.WriteMessage(type, colour, str);
 }
Exemple #18
0
 public static void WriteWrapped(ConsoleThemeColor colour, string message, int paddingLeft, int paddingRight)
 {
     App.WriteWrapped(colour, message, paddingLeft, paddingRight);
 }
Exemple #19
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, string str)
 {
     WriteMessage(type, Theme[colour], 0, str);
 }
Exemple #20
0
 public static void Write(ConsoleVerbosity level, ConsoleThemeColor colour, string str)
 {
     App.Write(level, colour, str);
 }
Exemple #21
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, int errorId, string str)
 {
     WriteMessage(type, Theme[colour], errorId, null, 0, 0, str);
 }
Exemple #22
0
 public void WriteWarning(ConsoleThemeColor colour, int id, string str)
 {
     ConsoleExt.WriteWarning(colour, id, str);
 }
Exemple #23
0
 public static void WritePrompt(ConsoleThemeColor colour, string str)
 {
     WriteMessage(ConsoleMessage.Prompt, Theme[colour], str);
 }
Exemple #24
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, int errorId, string str)
 {
     WriteMessage(type, Theme[colour], errorId, null, 0, 0, str);
 }
Exemple #25
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Warning, Theme[colour], id, str);
 }
Exemple #26
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string sourceFile, int line, int character, string str)
 {
     WriteMessage(ConsoleMessage.Warning, Theme[colour], id, sourceFile, line, character, str);
 }
Exemple #27
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string sourceFile, int line, int character, string str)
 {
     WriteMessage(ConsoleMessage.Warning, Theme[colour], id, sourceFile, line, character, str);
 }
Exemple #28
0
 public void WriteError(ConsoleThemeColor colour, int id, string str)
 {
     ConsoleExt.WriteError(colour, id, str);
 }
Exemple #29
0
 public void Write(ConsoleThemeColor colour, string str)
 {
     ConsoleExt.Write(colour, str);
 }
Exemple #30
0
 public static void WriteInterpreted(ConsoleThemeColor colour, string buffer, int paddingLeft, int paddingRight)
 {
     App.WriteInterpreted(colour, buffer, paddingLeft, paddingRight);
 }
Exemple #31
0
 public void Write(ConsoleVerbosity level, ConsoleThemeColor colour, string str)
 {
     ConsoleExt.Write(level, colour, str);
 }
Exemple #32
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, int errorId, string sourceFile, int line, int character, string str)
 {
     App.WriteMessage(type, colour, errorId, sourceFile, line, character, str);
 }
Exemple #33
0
 public void WriteError(ConsoleThemeColor colour, int id, string str)
 {
     ConsoleExt.WriteError(colour, id, str);
 }
Exemple #34
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string sourceFile, int line, int character, string str)
 {
     App.WriteWarning(colour, id, sourceFile, line, character, str);
 }
 public void WriteLine(ConsoleThemeColor color, string message)
 {
     this.m_Result.AppendFormat("<t:{0}>{1}</t>{2}", (int) color, EscapeString(message), Environment.NewLine);
 }
Exemple #36
0
 public static void Write(ConsoleThemeColor colour, string str)
 {
     App.Write(colour, str);
 }
Exemple #37
0
 public void WriteWrapped(ConsoleThemeColor colour, string message, int paddingLeft, int paddingRight)
 {
     ConsoleExt.WriteWrapped(colour, message, paddingLeft, paddingRight);
 }
Exemple #38
0
 public static void WriteError(ConsoleThemeColor colour, int id, string str)
 {
     App.WriteError(colour, id, str);
 }
Exemple #39
0
 public static void WriteInterpreted(ConsoleThemeColor colour, string buffer, int paddingLeft, int paddingRight)
 {
     ConsoleFormatter.WriteInterpreted(m_SystemConsole, Theme[colour], buffer, paddingLeft, paddingRight);
 }
Exemple #40
0
 public void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, int errorId, string str)
 {
     ConsoleExt.WriteMessage(type, colour, errorId, str);
 }
Exemple #41
0
 public static void WriteLine(ConsoleVerbosity level, ConsoleThemeColor colour, string str)
 {
     WriteLine(level, Theme[colour], str);
 }
Exemple #42
0
 public void WriteWarning(ConsoleThemeColor colour, int id, string sourceFile, int line, int character, string str)
 {
     ConsoleExt.WriteWarning(colour, id, sourceFile, line, character, str);
 }
 private ConsoleColorExt GetColor(ConsoleThemeColor color)
 {
     return this.Mappings[(int) color];
 }
Exemple #44
0
 public static void WriteError(ConsoleThemeColor colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Error, Theme[colour], id, str);
 }
Exemple #45
0
 public static void WriteMessage(MessageDirection dir, OscTimeTag?timeTag, ConsoleThemeColor messageColor, string message)
 {
     WriteMessage(RC.App, dir, timeTag, messageColor, message);
 }
Exemple #46
0
 public static void WriteLine(ConsoleThemeColor colour, string str)
 {
     WriteLine(Theme[colour], str);
 }
Exemple #47
0
        public static void WriteMessage(IConsole console, MessageDirection dir, OscTimeTag?timeTag, ConsoleThemeColor messageColor, string message)
        {
            lock (m_Lock)
            {
                switch (dir)
                {
                case MessageDirection.Transmit:
                    console.Write(ConsoleVerbosity.Normal, TransmitColor, "TX ");
                    break;

                case MessageDirection.Receive:
                    console.Write(ConsoleVerbosity.Normal, ReceiveColor, "RX ");
                    break;

                default:
                    break;
                }

                if (timeTag != null && timeTag.Value.Value > 0)
                {
                    console.Write(ConsoleVerbosity.Normal, TimeTagColor, timeTag.ToString() + " ");
                }

                console.WriteLine(ConsoleVerbosity.Normal, messageColor, message);
            }
        }
Exemple #48
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, string str)
 {
     WriteMessage(type, Theme[colour], 0, str);
 }
Exemple #49
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, string str)
 {
     App.WriteMessage(type, colour, str);
 }
Exemple #50
0
 public static void WriteMessage(ConsoleMessage type, ConsoleThemeColor colour, int errorId, string sourceFile, int line, int character, string str)
 {
     WriteMessage(type, Theme[colour], errorId, sourceFile, line, character, str);
 }
Exemple #51
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string str)
 {
     App.WriteWarning(colour, id, str);
 }
Exemple #52
0
 public static void WriteWarning(ConsoleThemeColor colour, int id, string str)
 {
     WriteMessage(ConsoleMessage.Warning, Theme[colour], id, str);
 }
Exemple #53
0
 public static void Write(ConsoleThemeColor colour, string str)
 {
     App.Write(colour, str);
 }
Exemple #54
0
 public static void WriteWrapped(ConsoleThemeColor colour, string message, int paddingLeft, int paddingRight)
 {
     WriteWrapped(Theme[colour], message, paddingLeft, paddingRight);
 }
Exemple #55
0
 public static void Write(ConsoleVerbosity level, ConsoleThemeColor colour, string str)
 {
     App.Write(level, colour, str);
 }
Exemple #56
0
 public void Write(ConsoleVerbosity level, ConsoleThemeColor colour, string str)
 {
     ConsoleExt.Write(level, colour, str);
 }
Exemple #57
0
 public static void WriteError(ConsoleThemeColor colour, int id, string str)
 {
     App.WriteError(colour, id, str);
 }
Exemple #58
0
 public void WriteInterpreted(ConsoleThemeColor colour, string buffer, int paddingLeft, int paddingRight)
 {
     ConsoleExt.WriteInterpreted(colour, buffer, paddingLeft, paddingRight);
 }
 public void Write(ConsoleThemeColor color, string message)
 {
     this.m_Result.AppendFormat("<t:{0}>{1}</t>", (int) color, EscapeString(message));
 }