This project is read-only.

How to Customize Console Colors

In order to customize the color scheme used by the Console application, the application configuration file must be modified to reference the following additional configuration section:

<configSections>
  <sectionGroup 
    name="applicationSettings" 
    type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, 
          Culture=neutral, PublicKeyToken=b77a5c561934e089" >
    <section 
      name="Harvester.Properties.MessageColor" 
      type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, 
            Culture=neutral, PublicKeyToken=b77a5c561934e089" 
      requirePermission="false" />
  </sectionGroup>
</configSections>

The background and foreground colors may then be modified by manipulating the following configuration elements:

<applicationSettings>
  <Harvester.Properties.MessageColor>
    <setting name="FatalBackColor" serializeAs="String">
      <value>Red</value>
    </setting>
    <setting name="FatalForeColor" serializeAs="String">
      <value>White</value>
    </setting>
    <setting name="ErrorBackColor" serializeAs="String">
      <value>Black</value>
    </setting>
    <setting name="ErrorForeColor" serializeAs="String">
      <value>Red</value>
    </setting>
    <setting name="WarningBackColor" serializeAs="String">
      <value>Black</value>
    </setting>
    <setting name="WarningForeColor" serializeAs="String">
      <value>Yellow</value>
    </setting>
    <setting name="InformationBackColor" serializeAs="String">
      <value>Black</value>
    </setting>
    <setting name="InformationForeColor" serializeAs="String">
      <value>White</value>
    </setting>
    <setting name="DebugBackColor" serializeAs="String">
      <value>Black</value>
    </setting>
    <setting name="DebugForeColor" serializeAs="String">
      <value>DarkGray</value>
    </setting>
    <setting name="TraceBackColor" serializeAs="String">
      <value>Black</value>
    </setting>
    <setting name="TraceForeColor" serializeAs="String">
      <value>DarkCyan</value>
    </setting>
  </Harvester.Properties.MessageColor>
</applicationSettings>

Supported Colors ConsoleColor Enumeration

Last edited Aug 19, 2011 at 1:45 AM by CBaxter, version 1

Comments

No comments yet.