Changeset 1408
- Timestamp:
- 12/22/2009 6:20:10 AM (3 years ago)
- Location:
- branches/eraser6/BlackBox/Eraser
- Files:
-
- 2 edited
-
BlackBoxUploadForm.Designer.cs (modified) (3 diffs)
-
BlackBoxUploadForm.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/BlackBox/Eraser/BlackBoxUploadForm.Designer.cs
r1394 r1408 84 84 // ProgressPb 85 85 // 86 this.ProgressPb.Location = new System.Drawing.Point(13, 7 3);86 this.ProgressPb.Location = new System.Drawing.Point(13, 70); 87 87 this.ProgressPb.Name = "ProgressPb"; 88 88 this.ProgressPb.Size = new System.Drawing.Size(321, 17); … … 100 100 // 101 101 this.ProgressLbl.AutoSize = true; 102 this.ProgressLbl.Location = new System.Drawing.Point(11, 5 5);102 this.ProgressLbl.Location = new System.Drawing.Point(11, 52); 103 103 this.ProgressLbl.Name = "ProgressLbl"; 104 104 this.ProgressLbl.Size = new System.Drawing.Size(126, 15); … … 121 121 this.MinimizeBox = false; 122 122 this.Name = "BlackBoxUploadForm"; 123 this.ShowInTaskbar = false; 123 124 this.Text = "Eraser Crash Assistant"; 125 this.TopMost = true; 124 126 this.ButtonsPnl.ResumeLayout(false); 125 127 this.ResumeLayout(false); -
branches/eraser6/BlackBox/Eraser/BlackBoxUploadForm.cs
r1406 r1408 105 105 if (e.Error != null) 106 106 MessageBox.Show(e.Error.Message); 107 ProgressLbl.Text = S._("Reports submitted successfully."); 107 108 CancelBtn.Text = S._("Close"); 108 109 } … … 161 162 HttpWebResponse response = reportRequest.GetResponse() as HttpWebResponse; 162 163 if (response.StatusCode != HttpStatusCode.OK) 164 { 165 using (Stream responseStream = response.GetResponseStream()) 166 { 167 try 168 { 169 XmlReader reader = XmlReader.Create(responseStream); 170 reader.ReadToFollowing("error"); 171 throw new InvalidDataException(S._("The server encountered a problem " + 172 "while processing the request: {0}", reader.ReadString())); 173 } 174 catch (XmlException) 175 { 176 } 177 } 178 163 179 throw new InvalidDataException(response.StatusDescription); 180 } 164 181 165 182 using (Stream responseStream = response.GetResponseStream()) 166 using (StreamReader rdr = new StreamReader(responseStream)) 167 { 168 string str = rdr.ReadToEnd(); 169 XmlReader reader = XmlReader.Create(new MemoryStream(Encoding.UTF8.GetBytes(str))); 183 { 184 XmlReader reader = XmlReader.Create(responseStream); 170 185 reader.ReadToFollowing("crashReport"); 171 186 string reportStatus = reader.GetAttribute("status"); … … 252 267 HttpWebResponse response = reportRequest.GetResponse() as HttpWebResponse; 253 268 if (response.StatusCode != HttpStatusCode.OK) 269 { 270 using (Stream responseStream = response.GetResponseStream()) 271 { 272 try 273 { 274 XmlReader reader = XmlReader.Create(responseStream); 275 reader.ReadToFollowing("error"); 276 throw new InvalidDataException(S._("The server encountered a problem " + 277 "while processing the request: {0}", reader.ReadString())); 278 } 279 catch (XmlException) 280 { 281 } 282 } 283 254 284 throw new InvalidDataException(response.StatusDescription); 285 } 255 286 } 256 287 } … … 284 315 /// </summary> 285 316 private static readonly Uri BlackBoxServer = 286 new Uri("http://eraser. joelsplace.dyndns.org/BlackBox/upload.php");317 new Uri("http://eraser.heidi.ie/BlackBox/upload.php"); 287 318 288 319 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.
