unable to get .net eventhandler

Discussion about the open-source Phalanger [?] project.

unable to get .net eventhandler

Postby phalanger@codeplex » October 16th, 2006, 1:27 pm

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...
phalanger@codeplex
 
Posts: 8
Joined: January 7th, 2012, 8:57 pm

RE: unable to get .net eventhandler

Postby tomasp » October 22nd, 2006, 1:54 am

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
tomasp
 
Posts: 46
Joined: January 7th, 2012, 8:37 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 25 guests

cron

User Control Panel

Login

Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 5 minutes)
Most users ever online was 511 on April 27th, 2024, 10:11 pm

Users browsing this forum: No registered users and 25 guests