OnStatus Event C#

Hi there,

I'm trying to get the status messages that appear in the logfile into a textbox. I added the eventhandler for the OnStatus event method :




this.ftp.OnStatus += new IFTPConnectionEvents_OnStatusEventHandler(this.ftp_OnSourceStatus);







private void ftp_OnSourceStatus(enumStatusEventType t, string szText)



{



       this.Add_Log(szText);



}




The problem is that it appears that the events are not fired at all.

Do i miss something here ?


Regards,

Arie van Someren

Is there someone that can help me out on this one, i'm quite stumbled...

Hello ...

I haven't got the time to write a C# sample with events yet. But after the new version 1.5 is released I will take a look at your problem.

Thank you for your patience.
-Mat

Thnx for the response...

I've gotten the events to fire, no problem.
But i am trying to get the component to log to a richtextbox instead of a file....

The OnStatus event looks like the one to use, but the szText parameter is allways empty...

If i am taking on the wrong approach please tell me


best regards and keep up the good work,

Arie van Someren

Hello ..

This looks like the right approach. The szText member shouldn't be empty. Is the enumStatusEventType t set?

-Mat

Ok

I found something out :

when i do a MessageBox.Show(szText), the values appear.
When i just try to add a line to the richTextBox, the lines are not added.

could this be a threading issue since i do not thread the ftp component?

btw, i am trying to figure out if IDENT is supported.
I cant find it in the logs and it would be crucial to me if it was incorporated.



regards,

arie

Hello ...

My guess is that you aren't correctly adding the line to the Rich Edit control. It usually requires special formatting (see .rtf files).

An ident server is not implemented by the ftp library. You need to implement your own.

Regards,
-Mat