Jump to content


Photo

OnStatus Event C#


  • Please log in to reply
6 replies to this topic

#1 avsomeren

avsomeren
  • Members
  • 5 posts

Posted 29 June 2005 - 12:44 PM

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

#2 avsomeren

avsomeren
  • Members
  • 5 posts

Posted 05 July 2005 - 04:52 PM

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

#3 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 07 July 2005 - 02:12 AM

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

#4 avsomeren

avsomeren
  • Members
  • 5 posts

Posted 09 July 2005 - 08:31 PM

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 :lol:


best regards and keep up the good work,

Arie van Someren

#5 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 09 July 2005 - 08:38 PM

Hello ..

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

-Mat

#6 avsomeren

avsomeren
  • Members
  • 5 posts

Posted 09 July 2005 - 10:42 PM

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

#7 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 10 July 2005 - 01:21 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users