Re: Determine which method called the DoneEvent (General questions)
The example was very helpful...
Thank you.
This is how I used it.
private void sftp1_ProgressEvent(object Sender, WeOnlyDo.Client.SFTP.ProgressArgs Args)
{
try
{
sftp1.Tag = test ;
progressBar1.Minimum = 0;
progressBar1.Maximum = (int)Args.Length;
progressBar1.Value = (int)Args.Position;
int uploadedBytes = (int)Args.Position / 1024;
int fileSize = (int)Args.Length / 1024;
lblUploadSize.Text = Convert.ToString(uploadedBytes) + KB/ + Convert.ToString(fileSize) + Kb ;
}
catch (Exception)
{ }
}
private void sftp1_DoneEvent(object Sender, WeOnlyDo.Client.SFTP.DoneArgs Args)
{
this.Cursor = Cursors.Arrow;
if (sftp1.Tag == test )
{
lblUpComp.Text = This worked ;
}
if (Args.Error == null)
{
lblMsg.Text = listed ok ;
AddToList(
***DONE! Awaiting next command... );
}
else
{
lblMsg.Text = Args.Error.Message;
}
}
Is this an ok way to use? Would you forsee any problems with it in the furture?
Complete thread:
- Determine which method called the DoneEvent - Chris Green, 2006-03-16, 23:19
- Re: Determine which method called the DoneEvent - wodDrazen, 2006-03-17, 01:35
- Re: Determine which method called the DoneEvent - Chris Green, 2006-03-17, 01:49
- Re: Determine which method called the DoneEvent - wodSupport, 2006-03-17, 01:52
- Re: Determine which method called the DoneEvent - Chris Green, 2006-03-17, 01:49
- Re: Determine which method called the DoneEvent - wodDrazen, 2006-03-17, 01:35