我嘗試構建應用程序商店,但我的下載程序出現問題我嘗試創建文件下載程序,但它根本不工作! 而我的視覺仍然告訴我,我的應用在代碼上沒有任何錯誤! O認爲與OneDrive的直接鏈接的問題! plz幫助我的代碼是:如何在c#中創建onedrive文件下載程序#
[C#]
private void btnDownload_Click(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
webClient.DownloadFileAsync(new Uri(url.Text), path.Text ;)
private void ProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
progressBar.Value = e.ProgressPercentage;
}
private void Completed(object sender, AsyncCompletedEventArgs e)
{
MessageBox.Show("Download completed!");
}
你是否得到'NotWorkingAtAllException'或其他東西?看:[問]並請[參觀] – Plutonix
我什麼也沒有得到,只是不工作! – louay
@ louaysleman可能出現的問題示例:*「當我單擊按鈕時,什麼也沒有發生,並且沒有斷點。」 「到達這條線時,會拋出X類型的異常。」 「我的回調函數永遠不會被調用。」*只是說「它不工作」不能幫助我們或你。 – Katana314