UWP + SSH.Net c#如何从shellstream输出ANSI字符串到textbox / richeditbox,并且颜色正确

时间:2017-01-30 20:41:17

标签: c# ssh uwp ansi ssh.net

我在UWP计划中使用ssh.net。我正在使用diffixulty来输出一个ANSI字符串到一个带有正确颜色的richeditbox,正如你将看到的那样使用putty。输出看起来像

[3;J[H[2J [38;5;93m───────────────────────────────────────[0m
[39;49;1mDietPi    [0m [90m|[0m [91m[33;49;1mUpdate available[0m 
[38;5;93m───────────────────────────────────────[0m
[39;49;1mV137[0m       [90m| RPi 2 Model B (armv7l)[0m
[38;5;93m───────────────────────────────────────[0m
[39;49;1mIP Address[0m [90m| [0m
[38;5;93m───────────────────────────────────────[0m

[90m Created by : Daniel Knight[0m
[90m Web        : http://DietPi.com[0m
[90m Twitter    : http://twitter.com/dietpi_[0m
[90m Donate     : http://goo   .gl/pzISt9 [0m
[90m DietPi's web hosting is powered by: MyVirtualServer.com[0m

[1m dietpi-launcher[0m  = All the DietPi programs in one place.
[1m dietpi-config[0m    = Feature rich configuration tool for your device.
[1m dietpi-software[0m  = Select optimized software for installation.
[1m dietpi-update[0m    = [91mRun now to update DietPi (from V137 to V143).[0m
[1m htop[0m             = Resource monitor.
[1m cpu[0m              = Shows CPU information and stats.

我可以选择正确显示这些内容吗?有没有办法让richeditboxes或任何其他元素接受ANSI字符串?

0 个答案:

没有答案