|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionMy original project: http://www.codeproject.com/cs/internet/terminalcontrol.asp I've been trying for a while to come up with a .Net control that would handle VT100/ANSI formatting and connect to SSH2 servers. I've been through the commercial ones and still haven't found one that suited me. My last project was based on Granados SSH library (open source SSH .Net implementation) and AckTerm (open source partially completed VT100 control) BackgroundThis Library is an attempt at creating a library based on the "Poderosa" project http://sourceforge.net/projects/poderosa/ Poderosa imo is the best terminal emulator. It's open source, and is better than the commercial clients. Go check it out for yourself, it's worth it. You can find the original Poderosa CSV source there. I tried for a couple of weeks to encapsulate components of Poderosa, but the code comments are all in Japanese and I couldn't find any good docs that descibed the source code. The developer community for Poderosa also appears to be all Japanese so I felt pretty much on my own. Using the codeWhat I pretty much did here, was encapsulate the entire Poderosa application into a Library. Then I expose certain elements so an application develop can simply drop the "Terminal Control.dll" into their app and have a control that acts like you would expect any .Net control to act. This code was written using Visual Studio .Net 2005 Professional and requires .Net Framework 2.0 Points of InterestThe Poderosa solution is made up of 4 projects: 1.) Container - This is the actual Poderosa Application First Step: What I've done with my library, was to change "Container" into a Library output, and implement a public class based on System.Windows.Forms.Control. Second Step The first time my class ("WalburySoftware.TerminalControl") is instanced, it runs Poderosa code
Poderosa has lots and lots and lots of static variables. Until I can get the time and motivation to go through there and make the appropriate changes, these variables will need to be initialized before you can use any of Poderosa's classes. Third Step - If you look at the method Poderosa.ConnectionCommandTarget.Resize, you'll see the line:
This throws an exception. I took it out because it doesn't do anything for my Library. I'm not sure what the ModalTerminalTask variable is used for. If you include that line, the terminal will not resize properly. Final Step - Now we are free to create and use TerminalPane's as we need. You'll see the steps in WalburySoftware.TerminalControl.Connect() that connect the TerminalPane to an SSH2 connection. History
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||