0

currently I am trying to write my 'own' console to handle different services of my program. I use a RichTextBox for the in -and output and I want my program to look like a linux terminal or windows console. The problem is that there is no default way to disable specific lines from writing. Is there a better way to build such an console?

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 >> ...
spyce
  • 11
  • 2

1 Answers1

0

Unfortunately what you want to do is beyond the scope of the Rich Text Control.

A cursory Google search revealed a bunch of terminal emulation projects and controls with varying amounts of features - however these also implemented various protocols such as SSH, rather than just give you a "console".

Rolling your own isn't trivial, but is entirely possible. Even easier if you're working with WPF as per this SO question & answer.

Community
  • 1
  • 1
Moo-Juice
  • 38,257
  • 10
  • 78
  • 128