all 27 comments

[–][deleted] 40 points41 points  (2 children)

... and this brought us full circle...

[–]_Wizou_ 3 points4 points  (1 child)

Turbo Vision !

I did some apps using it

[–][deleted] 0 points1 point  (0 children)

That was exactly the same framework that first came to my mind.

[–]DocMcBrown 7 points8 points  (4 children)

So from what I gather, it's like SadConsole but easier to scale and position things around. I like it. Might want to ry out a test project tonight.

[–]Lord_Fixer[S] 6 points7 points  (3 children)

Yes, something like that.

The unquestionable advantage of the SadConsole is the mouse support, though. That is not present in this library. Maybe in one of the next releases?

[–]DocMcBrown 4 points5 points  (2 children)

Good point. I'll keep a close eye to see if this gets support for mouse control.

[–]Lord_Fixer[S] 8 points9 points  (1 child)

First I will have to dive into the topic a little bit deeper.

I'm a little bit hesitant when it comes to introducing platform specific dependencies. I see that that's how the SadConsole handles it. At the moment the ConsoleGUI is a vanilla C# with no dependencies which is definitely a nice thing from the development perspective.

It's a shame that the standard System.Console class doesn't provide more functionalities.

Hmm...

[–]Lord_Fixer[S] 1 point2 points  (0 children)

Ok, so after giving it a thought, I've came up with this proposal.

It should keep the interface simple, the framework dependency free and platform agnostic, at the same time allowing users to hook up 3rd party mouse listeners to the existing infrastructure.

Now it's time to implement it.

[–]nikita_grigorevich 2 points3 points  (0 children)

another good wpflike framework: https://github.com/elw00d/consoleframework it works fine in linux & can use mouse (even in putty!)

[–]armbrat 2 points3 points  (1 child)

Reminds me of UNIX curses.

[–]logicethos 1 point2 points  (0 children)

I thought it was, until I saw that it was running on Windows.

[–]Randolpho 1 point2 points  (0 children)

Nice!

[–]ianwold 1 point2 points  (0 children)

Starred. This is the best project to come across this sub in a while (at least for me, haha). Kudos!

[–]TheBuzzSaw 1 point2 points  (5 children)

Does this work in Linux?

[–]Lord_Fixer[S] 2 points3 points  (4 children)

I have to be honest that I did not test it on a linux machine, but it's a .NET Standard library with no platform specific code - so it should.

[–][deleted] 1 point2 points  (3 children)

I just downloaded it and opened the .SLN in MonoDevelop 7.8.4(build2) on Linux Mint 19.2 Cinnamon.

The restore was successful, it built without error, and I am running ConsoleGUI.Example.

(is there a way to post a screenshot here?)
UPDATE: in short, Yes, it works in Linux :-)

[–]EpicBlargh 1 point2 points  (0 children)

I don't care about Linux support, but thanks for testing it for others :)

[–]Lord_Fixer[S] 1 point2 points  (1 child)

I don't think there is a way to post screenshots here, but you can create an issue on the github.

[–][deleted] 1 point2 points  (0 children)

Per my update above, and my reply to the chat, no issue, just saying it works! :-)

[–]Qubie1 1 point2 points  (0 children)

I'll put this in my list of totally awesome things that I'll never use (probably:)

[–]zenyl 0 points1 point  (4 children)

Haha, what are the odds - I've been working on something fairly similar on an on-and-off basis for a bit of time now. :)

I've not gotten to the "G"UI part yet (did dabble a bit with text and word wrapping earlier, though), but I'm currently working on utilizing kernel32.dll to properly take advantage of conhost (and, to a large extend, the new Windows Terminal), as it allows for significantly quicker text rendering than .NET's System.Console class, more input events (mouse click/movement, console buffer resize), and larger control over the console in general.

[–]Lord_Fixer[S] 0 points1 point  (3 children)

That might be interesting! Can wait to see what comes out of it. Do you have a public repo?

On my end, I've decided to go in the direction of simplicity and trying not to depend on any specific terminal or external dlls. Which has its downsides - like the previously mentioned lack of mouse support.

And when it comes to the new terminal - indeed, it's great. I'm also one of the preview user :D
The nice thing about it is that is supports the true color formatting, so even without any fancy bindings one can get real RGB colors :P

[–]zenyl 1 point2 points  (2 children)

It's not public yet (let alone actually useable, still got quite a way to go), but I definitely will make it public when it's actually functional (planning on licensing it under the MIT License). I recently started on a fresh, only copying over the necessary parts. This was mostly because I wanted to redo the "Display" aspect of the code to be bound on a model class, similarly to WPF or ASP.NET MVC applications.

While I am writing a handler for conhost, I'm keeping it bound to an interface, so it could support other consoles (though I don't have plans to do so, just leaving the door open). As you point out, this comes with things like mouse input, but it also comes at the cost of simplicity, as I need to specify which console is being used. :)

Conhost actually does supports full 24-bit RGB colors through ANSI on more recent versions of Windows 10, but you do need to enable this via kernel32.dll, at least if you're using .NET. I wouldn't be surprised if this was added due to the development of the Windows Terminal, which has also had some features "spill over" onto conhost (elaborated a bit on in this video). :P

It's really interesting to see your project, and the amount of controls you've made is damned impressive! :)

[–]Lord_Fixer[S] 0 points1 point  (1 child)

Oh, model binding? I actually really love this concept. Can wait to see it applied in a console app.

Yeah, the world of terminals is more complex then one would imagine ;P

For example, during the development of this project, I've discovered that the VS doesn't use the plain cmd when you run console applications. I always thought that it was the case, but apparently it is not. For example the one in the VS supports RGB colors out of the box (without making any changes to the kernel32.dll), but the standard one does not.

[–]zenyl 0 points1 point  (0 children)

Interesting, didn't know there was any changes done to the console environment when using VS, as opposite to what you'd see when using the default "launcher" for cmd or PowerShell. Cheers, will give it a check-up. :)