Quantcast
Channel: Scott Hanselman's Blog
Viewing all articles
Browse latest Browse all 1148

It's 2020 and it is time for text mode with Gui.cs

$
0
0

Nearly 16 years ago I complained that Windows is completely missing the TextMode boat. It's 2020 and it's TIME FOR TEXT MODE BABY.

I keep bumping into cool utilities made with Gui.cs. Miguel de Icaza made Midnight Commander (not Norton Commander, but evocative of it) and it's a joy.

Head out to an admin command prompt on your Windows 10 machine now and install it (assuming a recent Windows 10 build, you'll have winget):

winget install GNU.MidnightCommander

You run it with "mc" and even better if you've got Windows Terminal blinged out you'll be able bask in the ASCII COATED GLORY:

Midnight Commander is lovely

It works in WSL as well, since there's a Linux version with "apt install mc" so check that out, too!

Do YOU want to make apps like this? While Midnight Commander wasn't made with Gui.cs, it could have been. I spent YEARS making awesome text mode apps with TurboVision. Now we can make text mode apps with C#! There is even a complete Xterm/Vt100 emulator as well in the form of TerminalView.cs.

Is it hard? Nah! Go "dotnet new console" then "dotnet add package Terminal.Gui" and then copy these lines over the ones that are given you in Program.cs, then "dotnet run". Boom.

using Terminal.Gui;


class Demo {
static int Main ()
{
Application.Init ();

var n = MessageBox.Query (50, 7,
"Question", "Do you like console apps?", "Yes", "No");

return n;
}
}

There you go! You should go read about it now!

Do you like Console Apps?

If you want to see all the cool text controls you can use, check out the Terminal.Gui UI Catalog app and its source code.

Sure, it's not that new-fangled HTML, but let me tell you, you see these apps every day. The airport, the DMV, the mechanic, the doctor's office. Apps like these are FAST. It's useful to know that these kinds of apps exist...you'll never know when you might need to get back in to TEXT MODE!


Sponsor: Suffering from a lack of clarity around software bugs? Give your customers the experience they deserve and expect with error monitoring from Raygun.com. Installs in minutes, try it today!



© 2020 Scott Hanselman. All rights reserved.
     

Viewing all articles
Browse latest Browse all 1148

Trending Articles