/// <summary> /// Handle syncCheckout /// </summary> private void HandleDownloadFilesCompleted(object sender, DownloadFilesCompletedEventArgs e) { // Toggle button state cancelBtn.Enabled = false; asyncCheckoutBtn.Text = "Async Download"; this.m_status = CheckoutManagerState.idle; // If download was cancelled then e->Cancelled is true if (e.Cancelled) { progressBar.Value = 0; MessageBox.Show("Cancelled.", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } // If general Exception(which is not related to File) happenned during download if (e.Error != null) { string error = "DownloadFilesProgressChanged: " + e.Error.ToString(); MessageBox.Show(error, "Result", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// Handle syncCheckout /// </summary> private void HandleDownloadFilesCompleted(object sender, DownloadFilesCompletedEventArgs e) { // Toggle button state cancelBtn.Enabled = false; asyncCheckoutBtn.Text = "Async Download"; this.m_status = CheckoutManagerState.idle; // If download was cancelled then e->Cancelled is true if (e.Cancelled) { progressBar.Value = 0; MessageBox.Show("Cancelled.", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } // If general Exception(which is not related to File) happenned during download if (e.Error != null) { string error = "DownloadFilesProgressChanged: " + e.Error.ToString(); MessageBox.Show(error, "Result", MessageBoxButtons.OK, MessageBoxIcon.Error); } }