2015-12-29 39 views
0

目前我正在寫我自己的「控制檯來處理我的程序的不同服務的特定部分。 我用一個RichTextBox爲在-and輸出,我想我的程序看起來像一個Linux終端或Windows控制檯。 的問題是,有沒有默認的方式從寫作禁用特定線路。 有沒有更好的方式來建立這樣一個控制檯?(C#)禁用一個RichTextBox

At the end it should look like this (e.g of using my console): 
everything in() is just for information 

(user starting prog) 
(green_color)system >> checking current configuration... 
(blue_color)system >> configuration loaded! 
(now its time for the user) 
(waiting for user input, color white)ServerManager >> 
(user entered text, color white)ServerManager >> run mysql-service 
(green_color) system >> staring mysql-service... 
(blue color) system >> mysql-service started! 
(white color, waiting for user input)mysql >> ... 

回答

0

不幸的是,你想要做的是超出了Rich Text Control的範圍。

粗略谷歌搜索發現一堆終端仿真項目和控制的不同量的功能 - 但是,這些也實施了各種協議,如SSH,而不是僅僅給你一個「控制檯」。

滾動你自己是不平凡的,但完全有可能。根據這個SO question & answer,使用WPF更容易。