Example #1
0
        /// <summary>
        /// Configure the console
        /// </summary>
        /// <param name="config"></param>
        public void Configure(Action <ExtendedConsoleConfiguration> config)
        {
            config.Invoke(Configuration);
            _componentRenderer = new ComponentRenderer(this, Configuration.DataContext);
            _staticRowRenderer = new StaticRowRenderer(Configuration, _componentRenderer, Options);

            foreach (var component in Configuration.CustomComponents)
            {
                _componentRenderer.RegisterComponent(component.Key, component.Value);
            }
            Console.BackgroundColor = Configuration.LogHistoryContainer.BackgroundColor ?? Configuration.ColorPalette.Get(Configuration.LogHistoryContainer.BackgroundColorPalette) ?? Style._background;
            Console.Clear();
        }
Example #2
0
 public StaticRowRenderer(ExtendedConsoleConfiguration config, ComponentRenderer componentRenderer, ConsoleOptions options)
 {
     Config            = config;
     ComponentRenderer = componentRenderer;
     ConsoleOptions    = options;
 }