开发者

.NET Console windows

Is there any class or how to draw windows in console application using pseudo symbols like in far manager or turbo pascal?

I have found some symbols using conversion from In开发者_JAVA技巧t to Char.


Start the charmap.exe applet, check the "Advanced view" option (lower left). In the "Search for:" box type "box draw" and click Search. Click on one of the characters, the status bar at the bottom give you the code you need to use. For example:

using System;

class Program {
    static void Main(string[] args) {
        for (int ix = 0; ix < Console.WindowWidth - 1; ++ix)
            Console.Write('\u2500');
        Console.WriteLine();
        Console.ReadLine();
    }
}


Curses like libraries have been used for that for a long time, here's 2 curses libraries for .NET , although I don't know how well(if at all) they work on Windows

http://www.mono-project.com/MonoCurses

http://home.nedlinux.nl/~florian/downloads/


The Console class has quite a few methods that would allow to do this, such as SetCursorPosition, but there is nothing directly in the framework to help you do this type of symbol-based windowing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜