Code Monkey home page Code Monkey logo

Comments (4)

goblinfactory avatar goblinfactory commented on May 23, 2024

busy with this now, so far tests are looking good.

from konsole.

goblinfactory avatar goblinfactory commented on May 23, 2024

pushed draft "partial implementation to branch" https://github.com/goblinfactory/konsole/tree/%2332-speed

from konsole.

goblinfactory avatar goblinfactory commented on May 23, 2024

the following code

         using (var writer = new HighSpeedWriter())
            {
                var window = new Window(writer);
                //var window = new Window();

                var consoles = window.SplitRows(
                        new Split(4, "heading", LineThickNess.Single),
                        new Split(10),
                        new Split(0),
                        new Split(4, "status", LineThickNess.Single)
                ); ; ;

                var headline = consoles[0];
                var contentTop = consoles[1];
                var contentBottom = consoles[2];
                var status = consoles[3];

                var longText = "Let's see if these do? heres more text to see if this eventually wraps? text to see if this eventually wraps?text to see if this eventually wraps?";

                var menu = contentTop.SplitLeft("menu");
                var content = contentTop.SplitRight("content");

                var splits = contentBottom.SplitColumns(
                        new Split(20, "menu2"),
                        new Split(0, "content2"),
                        new Split(20, "content3")
                    );
                var menu2 = splits[0];
                menu2.WriteLine(longText);
                var content2 = splits[1];
                var content3 = splits[2];

                content2.WriteLine(longText);
                content3.WriteLine(longText);

                headline.Write("my headline");
                content.WriteLine("content goes here");

                // ascii characters dont print when printed as unicode....mmm, so close? 

                content.WriteLine("these lines ╢╖╣║╗╟  don't print!");
                
                // content doesnt wrap??
                content.WriteLine("Let's see if these do? heres more text to see if this eventually wraps? text to see if this eventually wraps?text to see if this eventually wraps?");

                menu.WriteLine("Options A");
                menu.WriteLine("Options B");
                menu.WriteLine("Vvery very long option C that should wrap quite a bit! Vvery very long option C that should wrap quite a bit! Vvery very long option C that should wrap quite a bit!");
                menu.WriteLine("Options D");

               // sidebar.WriteLine("20% off all items between 11am and midnight tomorrow!");

                status.Write("System offline!");
                writer.Flush();
                menu2.WriteLine(ConsoleColor.Red, "press any key to print a bunch of text into content2, press 'q' to quit");

                char key = 'x';
                int color = 0;
                while(key != 'q')
                {
                    content2.WriteLine((ConsoleColor)(color++ % 15), longText);
                    writer.Flush();
                    key = Console.ReadKey().KeyChar;

                }
                
            }

creates this ... (and does it it really really quickly ) will publish speed increases shortly.

HighSpeedWriter

from konsole.

goblinfactory avatar goblinfactory commented on May 23, 2024

closing this issue. Speed update is available in version 5.0 >

from konsole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.