 |
|
 |
Did you ever get a response to this via PM? Or did you ever figure it out.
|
|
|
|
 |
|
 |
I figured it out, but not reading into a file (there have been some other requests for reading data in general). You need to read the lines of the ConnectionTag Document. The number of lines on the screen is static and depends on the size of your control. Going overboard (I.E. reading 500 lines on a 50 line control) doesn't have any ill effect, it just returns a bunch of empty lines. Anyway, for reading the lines from a terminalcontrol that is 30 lines long (tall), I use this function:
private List<string> getScreenContents()
{
List<string> returnList = new List<string>();
{
try
{
int linecount = 30;
for (int x = 0; x < linecount; x++)
{
string outputLine = new string(terminalControl1.TerminalPane.ConnectionTag.Document.FindLine(x).Text);
returnList.Add(outputLine);
}
}
catch
{
}
}
return returnList;
}
So for example, if I need to find out of a certain phrase is on the screen right now, I do this:
foreach (string line in getScreenContents())
{
if (line.Contains("the phrase I am looking for"))
{
}
}
This isn't necessarily the most efficient method, but I love lists and they are really helpful in my specific application. This is the only way I've been able to find to read the data from the terminal into a usable format.
|
|
|
|
 |
|
 |
When trying to attempt a vi edit session I will get the following error message that appears to be generated from vi : "screen too large for internal buffer". What seems strange is that this error will occur when the terminal control's screen is made larger or smaller prior to a vi edit.
Any thoughts?
I have tried changing the TERM environment variable as per one suggestion, that had no effect.
Thanks,
WMB
|
|
|
|
 |
|
 |
Has anyone used the unix vi editor within this terminal control? I am getting mixed results. When the terminal window is resized sometimes the screen will just go blank when entering the vi editor. Other times I will get a buffer error. Also when returning from a vi edit the cursor will be completely off the screen (beyond where you can scroll to), so I have to type "clear" to regain the cursor within the control window.
Are there some terminal commands that have to be run prior to entering vi? Are there some preferences that have to be set within vi?
Thanks,
WMB
|
|
|
|
 |
|
 |
Hi, I am getting the following expeption when I try run the C# sample in the new archive: System.NullReferenceException: Object reference not set to an instance of an object. at WalburySoftware.TerminalControl.SetPaneColors(Color TextColor, Color BackColor) in c:\Terminal_Control\Terminal Control\TerminalControl.cs:line 209 at C_Sharp_Usage_Eample.Form1.button1_Click(Object sender, EventArgs e) in c:\Terminal_Control\C-Sharp Usage Eample\Form1.cs:line 29 I think the ConnectionTag is not properly initialized. I am not sure why. Anyone having the same problem? Thanks
|
|
|
|
 |
|
 |
Same problen connectionTag = null
|
|
|
|
 |
|
 |
The reason , in my case, was that the connection failed, because the server required keyboard-interactive authentication (there is no message indicating connection timeout).
It works fine now.
|
|
|
|
 |
|
 |
You say "It works fine now". I am having the same issue when trying to connect to an old Alpha server. What did you do to get it to work?
|
|
|
|
 |
|
 |
This is great! How would I scale the font?
|
|
|
|
 |
|
 |
I ran into the same question, implemented it... and completely forgot I left it out of the public TerminalControl....... sorry
anyway, if you get to it before I update the control, there's a dialog box in the Poderosa library that has options for changing font size, color, background color... hell they even LET YOU PUT A PICTURE IN THE BACKGROUND....... it's way cool and it's something else i need to update my library with
|
|
|
|
 |
|
 |
k, check the updates, I put in an example of how to modify the display (font, colors, etc). Refer to the "C# Usage Example" project
|
|
|
|
 |
|
 |
Hi, I've been working on similar (but closed) project some years ago I have some questions:
- Are there any example or test applications (running on emulators or unix) to do some regression tests? how are you testing the library itself?
- Would it be possible to port this project (or the core at least) in java?
Thanx
|
|
|
|
 |
|
 |
To answer your questions
1a.) no
1b.) I tested it on Sun Solaris servers
2.) knock yourself out
|
|
|
|
 |
|
 |
How did you ever get any of it to work. It looks like the open source sight has had little activity since 2006. I downloaded the latest version found, which was apparently built for VisualStudio 2005. There are two solutions at the top directory. Both do not build with different issues. The Ponderosa_monolithic.sln appears to have several files missing, including an entire sub project (which I am not sure is needed). The other solution Ponderosa.sln has several build errors with obvious errors that would have made it impossible to build. For example, one object is trying to call private methods of another object. Even after fixing the basic errors all I got was exceptions being thrown. I could not find any help or manual to explain the startup commands for the "Executable" (which seems to be the only project in the solution that has an EXE). It seems to need parameters passed in, but what?
Sorry, I am completely lost with this version. Any help out there?
WMB
|
|
|
|
 |
|
 |
If I understand what you're asking... it's that you can't compile the Poderosa source you downloaded?
and how I did it?
i don't remember exactly but it wasn't a simple download->compile
the Poderosa people are awesome for putting their project out there for the public. Regardless of how much trouble we have getting it up and running, I can allmost guarantee it's a hell of a lot cleaner than some of the "professional" clients. Hell, go download Putty and let me know how that works out
anyway i'm deviating from your question... the answer is... i had to modify a lot of stuff. Poderosa doesn't lend itself well to integration (or i'm just not seeing the hooks)
but it is very hackable..... so easy to chop and dice and make it act anyway you want to. the trick is getting a starting point
3 common things i've heard about............
-- make sure you have ALL the associated projects and that they're referenced correctly (through the namespaces, using statements, etc)
-- get the culture locales straightened out (this won't stop it from compiling but you will get some runtime errors)
-- i forgot the last one.....
|
|
|
|
 |
|
 |
Is there a better way to wait for a reply from the server? Thread.Sleep is not the most efficient as the server does not always reply in the same time. Is there something like WaitForText or something similar?
|
|
|
|
 |
|
 |
maybe rewrite the code to use asynchronous I/O
|
|
|
|
 |
|
 |
no, Thread.Sleep sucks horribly
I'll dig around and post an update that has that extention. It seems to be the most glaring oversight on my part, because anyone wanting a TeminalControl damn sure wants a scripted dialog like the Expect language does.
but to summarize
1.) yes there's a better way
2.) no it isn't easy
3.) i'll hook ya up, but don't wait up, it might be a few weeks
|
|
|
|
 |
|
 |
You could try placing your sequential command within a timer loop where in the timer adds its own delay.
Cheers.
|
|
|
|
 |
|
 |
Hey just wanted to say thanks for posting this library, you just saved me weeks of work (yes I'm a n00b)!
|
|
|
|
 |
|
 |
I'm glad you find it useful, let us know if you've found any suggestions (like things i need to expose in the class) or corrections
I finally got my MCAD certification, but my primary job is a network engineer so unfortunatly my development chops take a backseat most of the time.
i need a new job i guess heh
|
|
|
|
 |
|
 |
I was able to compile with Visual Studio 2008 after running the upgrade tool.
I could not get the demo app to run
Thanks,
|
|
|
|
 |
|
 |
I need to know what specific error you're running into. "I could not get the demo app to run" makes it impossible for me to respond with anything remotely useful
but.................... just a guess, but are you running into any Strings resource problems at runtime? The Poderosa project I use as a base model is quite thoughtfully designed with localization in mind, so you'll want your default culture to find the strings resources (they also have the Japanese culture UI in there somewhere, but I kinda skipped over that bit when I made my project....)
i definitly have some cleanup to do
|
|
|
|
 |
|
 |
The Granados and Poderosa code depends heavily on the use of string resources. The reason for this is so Menu text, error messages, etc will display correctly depending on the culture of the users machine. Currently Japanese and English is supported in Granados/Poderosa code.
If you get resource errors while directly implementing, the most likely problem will be the strings resources.
For example: if you directly implement the code to make your own Terminal Library (The TerminalPane class is a good example)...
the first thing you'll want to do is ensure all string resource references are mapped correctly.
There are two ways of doing this.
1.) Change your "Default namespace:" option in your Project Properties to "Poderosa".
2.) search through ALL the code and change any string resource references to fit your project.
Once you have the reference maps corrected, the second thing is to actually add those references to your project.
If you look at my Terminal Control project, you'll see there are 2 strings resources in the root of the project.
"strings.resx"
"strings_ja.resx"
Also you will see several subdirectories "Grandos" and "Terminal". You'll want to recreate the subdirectories in your project.
In the original Poderosa code, there will be 3 seperate "strings.resx" and "strings_ja.resx"
Copy these resources into your project (maintain directory structure) and the resources will be there when referenced
Good luck
|
|
|
|
 |
|
 |
Dear ,
I have tried this libray and i used both Terminal Control component and Terminal Pane component and it is not working in the Terminal Control Component I had added a new Windows Form project to the Terminal Control Project and Drag 'n Drop the Terminal Control Component on the Form , check the below code and nothing happens
private void Form1_Load(object sender, EventArgs e)
{
terminalControl1 = new WalburySoftware.TerminalControl();
terminalControl1.Host = "XXXXX";
terminalControl1.UserName = "XXXXXX";
terminalControl1.Password = "XXXXXX";
terminalControl1.Connect();
}
I am waiting for your reply
Mohamed
|
|
|
|
 |