unable to get .net eventhandler
2 posts
• Page 1 of 1
unable to get .net eventhandler
Hai.
Is that possbile to use .net event handler in phalanger.? I'm unable to get this in phalanger.
Here is my sample code..
private void download_File(Uri path , String name )
{
WebClient client = new WebClient();
client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
client.DownloadFileAsync(path,name );
}
private void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
toolStripStatusLabel1.Text = "Download Complete";
}
private void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
//update status
progressBar1.Value = e.ProgressPercentage;
}
How can I use "e.ProgressPercentage" in phalanger? Is there any other way...?
Thank you...
Is that possbile to use .net event handler in phalanger.? I'm unable to get this in phalanger.
Here is my sample code..
private void download_File(Uri path , String name )
{
WebClient client = new WebClient();
client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
client.DownloadFileAsync(path,name );
}
private void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
toolStripStatusLabel1.Text = "Download Complete";
}
private void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
//update status
progressBar1.Value = e.ProgressPercentage;
}
How can I use "e.ProgressPercentage" in phalanger? Is there any other way...?
Thank you...
- phalanger@codeplex
- Posts: 8
- Joined: January 7th, 2012, 8:57 pm
RE: unable to get .net eventhandler
Hi, I think that this might be interesting for other users too, so I put the answer to our "Code snippets" section in the wiki:Download file from Web asynchronously (I also posted simple version of the demo:Download file from Web).
Thanks for the interesting question :-),
Tomas
Thanks for the interesting question :-),
Tomas
- tomasp
- Posts: 46
- Joined: January 7th, 2012, 8:37 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests