Ignore:
Timestamp:
12/23/09 06:15:52 (5 years ago)
Author:
lowjoel
Message:

Allow users to cancel the submission of the report.

Location:
branches/eraser6/BlackBox/Eraser
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/BlackBox/Eraser/BlackBoxUploadForm.cs

    r1417 r1418  
    6767                if (!uploader.ReportIsNew()) 
    6868                    continue; 
    69                  
     69 
     70                if (UploadWorker.CancellationPending) 
     71                    throw new OperationCanceledException(); 
     72 
    7073                //No similar reports have been uploaded. Compress the report. 
    7174                UploadWorker.ReportProgress(baseProgress, 
     
    7780                            S._("Compressing Report {0}: {1}%", 
    7881                                reports[i].Name, progress.ProgressPercentage)); 
     82 
     83                        if (UploadWorker.CancellationPending) 
     84                            throw new OperationCanceledException(); 
    7985                    }); 
    8086 
     
    8894                            S._("Uploading Report {0}: {1}%", 
    8995                                reports[i].Name, progress.ProgressPercentage)); 
     96 
     97                        if (UploadWorker.CancellationPending) 
     98                            throw new OperationCanceledException(); 
    9099                    }); 
    91100            } 
     
    104113            { 
    105114                ProgressLbl.Text = S._("Reports submitted successfully."); 
     115                ProgressPb.Value = ProgressPb.Maximum; 
     116                CancelBtn.Text = S._("Close"); 
     117            } 
     118            else if (e.Error is OperationCanceledException) 
     119            { 
     120                ProgressLbl.Text = S._("Submission was cancelled."); 
    106121                ProgressPb.Value = ProgressPb.Maximum; 
    107122                CancelBtn.Text = S._("Close"); 
     
    258273                reportRequest.ContentType = "multipart/form-data; boundary=" + builder.Boundary; 
    259274                reportRequest.Method = "POST"; 
     275                reportRequest.Timeout = int.MaxValue; 
    260276                using (Stream formStream = builder.Stream) 
    261277                { 
  • branches/eraser6/BlackBox/Eraser/Strings.NL.resx

    r1412 r1418  
    154154    <value>Sluiten</value> 
    155155  </data> 
     156  <data name="Submission was cancelled." xml:space="preserve"> 
     157    <value>(Untranslated)</value> 
     158  </data> 
    156159  <data name="Unknown crash report server response." xml:space="preserve"> 
    157160    <value>(Untranslated)</value> 
  • branches/eraser6/BlackBox/Eraser/Strings.en.resx

    r1412 r1418  
    154154    <value>Close</value> 
    155155  </data> 
     156  <data name="Submission was cancelled." xml:space="preserve"> 
     157    <value>Submission was cancelled.</value> 
     158  </data> 
    156159  <data name="Unknown crash report server response." xml:space="preserve"> 
    157160    <value>Unknown crash report server response.</value> 
  • branches/eraser6/BlackBox/Eraser/Strings.it.resx

    r1412 r1418  
    154154    <value>Chiudi</value> 
    155155  </data> 
     156  <data name="Submission was cancelled." xml:space="preserve"> 
     157    <value>(Untranslated)</value> 
     158  </data> 
    156159  <data name="Unknown crash report server response." xml:space="preserve"> 
    157160    <value>(Untranslated)</value> 
  • branches/eraser6/BlackBox/Eraser/Strings.resx

    r1412 r1418  
    154154    <value>Close</value> 
    155155  </data> 
     156  <data name="Submission was cancelled." xml:space="preserve"> 
     157    <value>Submission was cancelled.</value> 
     158  </data> 
    156159  <data name="Unknown crash report server response." xml:space="preserve"> 
    157160    <value>Unknown crash report server response.</value> 
Note: See TracChangeset for help on using the changeset viewer.