public void RenderReport(BaseReportView baseViewModel)
        {
            CrashReportView viewModel = (CrashReportView)baseViewModel;
            var             region    = new Region(0,
                                                   0,
                                                   1080,
                                                   10800,
                                                   true);



            var console = _invocationContext;

            if (console is ITerminal terminal)
            {
                terminal.Clear();
            }

            console.Append(new ContentView("Dump details"));
            console.Append(new SplitterView());
            console.Append(new DumpDetailsView(viewModel));
            StackLayoutView stackLayoutView2 = new StackLayoutView
            {
                new TemplateStackView("Thread details", new ThreadsDetailView(viewModel)),
                new TemplateStackView("Threads with exceptions", new StackFramesStackView(viewModel)),
                new SplitterView()
            };
            var screen = new ScreenView(_consoleRenderer, _invocationContext)
            {
                Child = stackLayoutView2
            };

            screen.Render(region);
        }
        public void Vertical_stack_wraps_content_when_region_is_not_wide_enough()
        {
            var stackLayout = new StackLayoutView();
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            stackLayout.Render(renderer, new Region(0, 0, 5, 4));

            terminal.Events
            .Should()
            .BeEquivalentSequenceTo(
                new TestTerminal.CursorPositionChanged(new Point(0, 0)),
                new TestTerminal.ContentWritten("The  "),
                new TestTerminal.CursorPositionChanged(new Point(0, 1)),
                new TestTerminal.ContentWritten("quick"),
                new TestTerminal.CursorPositionChanged(new Point(0, 2)),
                new TestTerminal.ContentWritten("brown"),
                new TestTerminal.CursorPositionChanged(new Point(0, 3)),
                new TestTerminal.ContentWritten("fox  ")
                );
        }
예제 #3
0
        private static void Execute(
            IEnumerable <Bundle> bundles,
            IEnumerable <BundleTypePrintInfo> supportedBundleTypes)
        {
            Console.WriteLine(RuntimeInfo.RunningOnWindows ? LocalizableStrings.WindowsListCommandOutput : LocalizableStrings.MacListCommandOutput);

            var listCommandParseResult = CommandLineConfigs.ListCommand.Parse(Environment.GetCommandLineArgs());

            var verbose = listCommandParseResult.CommandResult.GetVerbosityLevel().Equals(VerbosityLevel.Detailed) ||
                          listCommandParseResult.CommandResult.GetVerbosityLevel().Equals(VerbosityLevel.Diagnostic);
            var typeSelection = listCommandParseResult.CommandResult.GetTypeSelection();
            var archSelection = listCommandParseResult.CommandResult.GetArchSelection();

            var stackView = new StackLayoutView();

            var filteredBundlesByArch = bundles.Where(bundle => archSelection.HasFlag(bundle.Arch));


            var footnotes = new List <string>();

            foreach (var bundleType in supportedBundleTypes)
            {
                if (typeSelection.HasFlag(bundleType.Type))
                {
                    var filteredBundlesByType = bundleType
                                                .Filter(filteredBundlesByArch);

                    var uninstallMap = VisualStudioSafeVersionsExtractor.GetReasonRequiredStrings(filteredBundlesByType);

                    stackView.Add(new ContentView(bundleType.Header));
                    stackView.Add(bundleType.GridViewGenerator.Invoke(uninstallMap, verbose));
                    stackView.Add(new ContentView(string.Empty));

                    footnotes.AddRange(filteredBundlesByType
                                       .Where(bundle => bundle.Version.HasFootnote)
                                       .Select(bundle => bundle.Version.Footnote));
                }
            }

            foreach (var footnote in footnotes)
            {
                stackView.Add(new ContentView($"* {footnote}"));
            }

            if (footnotes.Count > 0)
            {
                stackView.Add(new ContentView(string.Empty));
            }

            stackView.Render(
                new ConsoleRenderer(new SystemConsole()),
                new Region(0, 0, Console.WindowWidth, int.MaxValue));
        }
        public void Measuring_a_vertical_stack_with_tall_children_trims_last_child()
        {
            var stackLayout = new StackLayoutView(Orientation.Vertical);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(5, 3));

            size.Should().BeEquivalentTo(new Size(5, 3));
        }
        public void Measuring_a_horizontal_stack_with_wide_children_wraps_last_child()
        {
            var stackLayout = new StackLayoutView(Orientation.Horizontal);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(12, 5));

            size.Should().BeEquivalentTo(new Size(12, 2));
        }
        public void Measuring_a_horizontal_stack_with_truncated_height_measures_max_for_each_child()
        {
            var stackLayout = new StackLayoutView(Orientation.Horizontal);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(7, 1));

            size.Should().BeEquivalentTo(new Size(7, 1));
        }
        public void Measuring_a_horizontal_stack_sums_content_width()
        {
            var stackLayout = new StackLayoutView(Orientation.Horizontal);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(20, 20));

            size.Should().BeEquivalentTo(new Size("The quickbrown fox".Length, 1));
        }
        public void Measuring_a_vertical_stack_with_word_wrap_it_sums_max_height_for_each_row()
        {
            var stackLayout = new StackLayoutView(Orientation.Vertical);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(7, 10));

            size.Should().BeEquivalentTo(new Size("brown ".Length, 4));
        }
        public void Measuring_a_vertical_stack_sums_content_height()
        {
            var stackLayout = new StackLayoutView(Orientation.Vertical);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(10, 10));

            size.Should().BeEquivalentTo(new Size(9, 2));
        }
예제 #10
0
        public void Measuring_a_horizontal_stack_with_word_wrap_it_sums_max_width_for_each_child()
        {
            var stackLayout = new StackLayoutView(Orientation.Horizontal);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(10, 10));

            size.Should().BeEquivalentTo(new Size(10, 2));
        }
예제 #11
0
        private static void Execute(
            IEnumerable <Bundle> bundles,
            IEnumerable <BundleTypePrintInfo> supportedBundleTypes)
        {
            var listCommandParseResult = CommandLineConfigs.ListCommand.Parse(Environment.GetCommandLineArgs());

            var typeSelection = listCommandParseResult.CommandResult.GetTypeSelection();
            var archSelection = listCommandParseResult.CommandResult.GetArchSelection();

            var stackView = new StackLayoutView();

            var filteredBundlesByArch = bundles.Where(bundle => archSelection.HasFlag(bundle.Arch));

            var footnotes = new List <string>();

            foreach (var bundleType in supportedBundleTypes)
            {
                if (typeSelection.HasFlag(bundleType.Type))
                {
                    var filteredBundlesByType = bundleType
                                                .Filter(filteredBundlesByArch)
                                                .OrderByDescending(bundle => bundle);

                    stackView.Add(new ContentView(bundleType.Header));
                    stackView.Add(bundleType.GridViewGenerator.Invoke(filteredBundlesByType.ToArray()));
                    stackView.Add(new ContentView(string.Empty));

                    footnotes.AddRange(filteredBundlesByType
                                       .Where(bundle => bundle.Version.HasFootnote)
                                       .Select(bundle => bundle.Version.Footnote));
                }
            }

            foreach (var footnote in footnotes)
            {
                stackView.Add(new ContentView($"* {footnote}"));
            }

            if (footnotes.Count > 0)
            {
                stackView.Add(new ContentView(string.Empty));
            }

            stackView.Render(
                new ConsoleRenderer(new SystemConsole()),
                new Region(0, 0, Console.WindowWidth, int.MaxValue));
        }
예제 #12
0
        public void Measuring_a_vertical_stack_with_row_truncation_the_top_row_is_measured_first()
        {
            var stackLayout = new StackLayoutView(Orientation.Vertical);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            var size = stackLayout.Measure(renderer, new Size(7, 1));

            var firstViewTopRow = "The ".Length;

            size.Should().BeEquivalentTo(new Size(firstViewTopRow, 1));
        }
예제 #13
0
        public void Vertical_stack_clips_content_when_region_is_not_tall_enough()
        {
            var stackLayout = new StackLayoutView();
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var console  = new TestConsole();
            var renderer = new ConsoleRenderer(console);

            stackLayout.Render(renderer, new Region(0, 0, 10, 1));

            console.Events.Should().BeEquivalentSequenceTo(
                new TestConsole.CursorPositionChanged(new Point(0, 0)),
                new TestConsole.ContentWritten("The quick"));
        }
예제 #14
0
        /// <summary>Prints directory statistics.</summary>
        /// <param name="text">Comma-separated list of text file extensions (files to count lines for) -- e.g. "js,py,cs".</param>
        /// <param name="only">Comma-separated list of file extensions to include.</param>
        /// <param name="args">Directories to print statistics for.</param>
        static async Task Main(InvocationContext ctx, string?text, string?only, string[] args)
        {
            var dirs = args ?? new[] { "." };
            var includeExtensions = (only ?? "")
                                    .Split(",")
                                    .Where(e => !string.IsNullOrEmpty(e))
                                    .Select(e => "." + e.Trim())
                                    .ToArray();
            var textExtensions = (text ?? DefaultExtensions)
                                 .Split(",")
                                 .Where(e => !string.IsNullOrEmpty(e))
                                 .Select(e => "." + e.Trim())
                                 .ToArray();

            var cancelCts = new CancellationTokenSource();

            Console.CancelKeyPress += (_, eventArgs) => cancelCts.Cancel();
            var cancellationToken = cancelCts.Token;

            var s     = new Statistics(includeExtensions, textExtensions);
            var tasks = dirs.Select(p => Task.Run(
                                        () => s.ProcessDir(p, cancellationToken),
                                        cancellationToken));
            await Task.WhenAll(tasks);

            var output = new StackLayoutView()
            {
                new StackLayoutView()
                {
                    new ContentView($"Directories: {string.Join(", ", dirs)}"),
                    new ContentView($"Extensions:  {string.Join(" ", textExtensions)}"),
                },
                new StatisticsView("Statistics by directory:", "Directory", s.ByDirectory),
                new StatisticsView("Statistics by extension:", "Extension", s.ByExtension),
            };

            var terminal = ctx.Console as TerminalBase;
            var renderer = new ConsoleRenderer(ctx.Console, OutputMode.PlainText, true);
            var region   = new Region(0, 0, int.MaxValue, int.MaxValue);

            terminal?.HideCursor();
            output.Render(renderer, region);
            terminal?.ShowCursor();
        }
예제 #15
0
        public void RenderReport(BaseReportView baseViewModel)
        {
            MemoryReportView viewModel = (MemoryReportView)baseViewModel;
            var region = new Region(0,
                                    0,
                                    1080,
                                    10800,
                                    true);



            var console = _invocationContext;

            if (console is ITerminal terminal)
            {
                terminal.Clear();
            }

            console.Append(new ContentView("Dump details"));
            console.Append(new SplitterView());
            console.Append(new DumpDetailsView(viewModel));
            console.Append(new ContentView("\n\n"));
            StackLayoutView stackLayoutView2 = new StackLayoutView
            {
                new SplitterView(),
                new ContentView($"Total GC Heap Size: {viewModel.TotalGCMemory}"),
                new SplitterView(),
                new ContentView("\n\n"),
                new TemplateStackView("GC split per logical heap", new HeapBalanceView(viewModel)),
                new TemplateStackView("Memory stats per GC type", new GCHeapBreakupView(viewModel)),
                new TemplateStackView("LOH stats", new LOHView(viewModel)),
                new TemplateStackView("Finalizer Object Stats", new FinalizerView(viewModel)),
                new TemplateStackView("Top 50 Types consumig memory", new HeapStatsView(viewModel)),
                new SplitterView()
            };
            var screen = new ScreenView(_consoleRenderer, _invocationContext)
            {
                Child = stackLayoutView2
            };

            screen.Render(region);
        }
예제 #16
0
        public void Horizontal_stack_displays_content_stacked_on_next_to_each_other()
        {
            var stackLayout = new StackLayoutView(Orientation.Horizontal);
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var console  = new TestConsole();
            var renderer = new ConsoleRenderer(console);

            stackLayout.Render(renderer, new Region(0, 0, 18, 1));

            console.Events.Should().BeEquivalentSequenceTo(
                new TestConsole.CursorPositionChanged(new Point(0, 0)),
                new TestConsole.ContentWritten("The quick         "),
                new TestConsole.CursorPositionChanged(new Point(9, 0)),
                new TestConsole.ContentWritten("brown fox"));
        }
예제 #17
0
        public void Vertical_stack_displays_content_stacked_on_top_of_each_other()
        {
            var stackLayout = new StackLayoutView();
            var child1      = new ContentView("The quick");
            var child2      = new ContentView("brown fox");

            stackLayout.Add(child1);
            stackLayout.Add(child2);

            var terminal = new TestTerminal();
            var renderer = new ConsoleRenderer(terminal);

            stackLayout.Render(renderer, new Region(0, 0, 10, 2));

            terminal.Events.Should().BeEquivalentSequenceTo(
                new TestTerminal.CursorPositionChanged(new Point(0, 0)),
                new TestTerminal.ContentWritten("The quick"),
                new TestTerminal.CursorPositionChanged(new Point(0, 1)),
                new TestTerminal.ContentWritten("brown fox"));
        }
예제 #18
0
        private static void Execute(
            IEnumerable <Bundle> bundles,
            IEnumerable <BundleTypePrintInfo> supportedBundleTypes)
        {
            Console.WriteLine(RuntimeInfo.RunningOnWindows ? LocalizableStrings.WindowsListCommandOutput : LocalizableStrings.MacListCommandOutput);

            var listCommandParseResult = CommandLineConfigs.ListCommand.Parse(Environment.GetCommandLineArgs());
            var verbose = listCommandParseResult.CommandResult.GetVerbosityLevel().Equals(VerbosityLevel.Detailed) ||
                          listCommandParseResult.CommandResult.GetVerbosityLevel().Equals(VerbosityLevel.Diagnostic);

            var sortedBundles = GetFilteredBundlesWithRequirements(bundles, supportedBundleTypes, listCommandParseResult);

            var stackView = new StackLayoutView();
            var footnotes = new List <string>();

            foreach ((var bundleType, var filteredBundles) in sortedBundles)
            {
                stackView.Add(new ContentView(bundleType.Header));
                stackView.Add(bundleType.GridViewGenerator.Invoke(filteredBundles, verbose));
                stackView.Add(new ContentView(string.Empty));

                footnotes.AddRange(filteredBundles
                                   .Where(bundle => bundle.Key.Version.HasFootnote)
                                   .Select(bundle => bundle.Key.Version.Footnote));
            }

            foreach (var footnote in footnotes)
            {
                stackView.Add(new ContentView($"* {footnote}"));
            }

            if (footnotes.Count > 0)
            {
                stackView.Add(new ContentView(string.Empty));
            }

            stackView.Render(
                new ConsoleRenderer(new SystemConsole()),
                new Region(0, 0, int.MaxValue, int.MaxValue));
        }
예제 #19
0
        /// <summary>
        /// Demonstrates various rendering capabilities.
        /// </summary>
        /// <param name="invocationContext"></param>
        /// <param name="sample">Renders a specified sample</param>
        /// <param name="height">The height of the rendering area</param>
        /// <param name="width">The width of the rendering area</param>
        /// <param name="top">The top position of the render area</param>
        /// <param name="left">The left position of the render area</param>
        /// <param name="text">The text to render</param>
        /// <param name="overwrite">Overwrite the specified region. (If not, scroll.)</param>
        public static void Main(
#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do)
            InvocationContext invocationContext,
            SampleName sample = SampleName.Dir,
            int?height        = null,
            int?width         = null,
            int top           = 0,
            int left          = 0,
            string text       = null,
            bool overwrite    = true)
#pragma warning restore CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do)
        {
            var region = new Region(left,
                                    top,
                                    width ?? Console.WindowWidth,
                                    height ?? Console.WindowHeight,
                                    overwrite);

            if (overwrite &&
                invocationContext.Console is ITerminal terminal)
            {
                terminal.Clear();
            }

            var consoleRenderer = new ConsoleRenderer(
                invocationContext.Console,
                mode: invocationContext.BindingContext.OutputMode(),
                resetAfterRender: true);

            switch (sample)
            {
            case SampleName.Colors:
            {
                var screen = new ScreenView(renderer: consoleRenderer, invocationContext.Console);
                screen.Child = new ColorsView(text ?? "*");

                screen.Render(region);
            }
            break;

            case SampleName.Dir:
                var directoryTableView = new DirectoryTableView(new DirectoryInfo(Directory.GetCurrentDirectory()));
                directoryTableView.Render(consoleRenderer, region);

                break;

            case SampleName.Moby:
                consoleRenderer.RenderToRegion(
                    $"Call me {StyleSpan.BoldOn()}{StyleSpan.UnderlinedOn()}Ishmael{StyleSpan.UnderlinedOff()}{StyleSpan.BoldOff()}. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and {ForegroundColorSpan.Rgb(60, 0, 0)}methodically{ForegroundColorSpan.Reset()} {ForegroundColorSpan.Rgb(90, 0, 0)}knocking{ForegroundColorSpan.Reset()} {ForegroundColorSpan.Rgb(120, 0, 0)}people's{ForegroundColorSpan.Reset()} {ForegroundColorSpan.Rgb(160, 0, 0)}hats{ForegroundColorSpan.Reset()} {ForegroundColorSpan.Rgb(220, 0, 0)}off{ForegroundColorSpan.Reset()} then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me.",
                    region);
                break;

            case SampleName.Processes:
            {
                var view = new ProcessesView(Process.GetProcesses());
                view.Render(consoleRenderer, region);
            }

            break;

            case SampleName.TableView:
            {
                var table = new TableView <Process>
                {
                    Items = Process.GetProcesses().Where(x => !string.IsNullOrEmpty(x.MainWindowTitle)).OrderBy(p => p.ProcessName).ToList()
                };
                table.AddColumn(process => $"{process.ProcessName} ", "Name");
                table.AddColumn(process => ContentView.FromObservable(process.TrackCpuUsage(), x => $"{x.UsageTotal:P}"), "CPU", ColumnDefinition.Star(1));

                var screen = new ScreenView(renderer: consoleRenderer, invocationContext.Console)
                {
                    Child = table
                };
                screen.Render();
            }
            break;

            case SampleName.Clock:
            {
                var screen          = new ScreenView(renderer: consoleRenderer, invocationContext.Console);
                var lastTime        = DateTime.Now;
                var clockObservable = new BehaviorSubject <DateTime>(lastTime);
                var clockView       = ContentView.FromObservable(clockObservable, x => $"{x:T}");
                screen.Child = clockView;
                screen.Render();

                while (!Console.KeyAvailable)
                {
                    if (DateTime.Now - lastTime > TimeSpan.FromSeconds(1))
                    {
                        lastTime = DateTime.Now;
                        clockObservable.OnNext(lastTime);
                    }
                }
            }
            break;

            case SampleName.GridLayout:
            {
                var screen  = new ScreenView(renderer: consoleRenderer, invocationContext.Console);
                var content = new ContentView(
                    "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum for Kevin.");
                var smallContent = new ContentView("Kevin Bost");
                var longContent  = new ContentView("Hacking on System.CommandLine");

                var gridView = new GridView();
                gridView.SetColumns(
                    ColumnDefinition.SizeToContent(),
                    ColumnDefinition.Star(1),
                    ColumnDefinition.Star(0.5)
                    );
                gridView.SetRows(
                    RowDefinition.Star(0.5),
                    RowDefinition.Star(0.5)
                    );

                gridView.SetChild(smallContent, 0, 0);
                gridView.SetChild(longContent, 0, 1);
                //gridView.SetChild(content, 0, 0);
                gridView.SetChild(content, 1, 1);
                gridView.SetChild(content, 2, 0);

                screen.Child = gridView;

                screen.Render();
            }
            break;

            default:
                if (!string.IsNullOrWhiteSpace(text))
                {
                    consoleRenderer.RenderToRegion(
                        text,
                        region);
                }
                else
                {
                    var screen      = new ScreenView(renderer: consoleRenderer, invocationContext.Console);
                    var stackLayout = new StackLayoutView();
                    var content1    = new ContentView("Hello World!");
                    var content2    = new ContentView(
                        "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum for Kevin.");
                    stackLayout.Add(content2);
                    stackLayout.Add(content1);
                    stackLayout.Add(content2);
                    screen.Child = stackLayout;
                    screen.Render(new Region(0, 0, 50, Size.MaxValue));
                    //screen.Render(writer);
                }

                break;
            }

            if (!Console.IsOutputRedirected)
            {
                Console.ReadKey();
            }
        }