Changeset 2536


Ignore:
Timestamp:
3/17/2012 2:12:31 AM (3 years ago)
Author:
lowjoel
Message:
  • Recursively delete a directory if report creation failed so we don't raise another exception while handling one
  • Handle InvalidOperationExceptions? when churning out the report: some processes may have exited since we enumerated it
  • Fixed grabbing screenshots of screens where the primary desktop is not at (0,0)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.BlackBox/BlackBox.cs

    r2516 r2536  
    113113                //report folder if the crash report is empty. 
    114114                if (currentStep == 0) 
    115                     Directory.Delete(currentCrashReport); 
     115                    Directory.Delete(currentCrashReport, true); 
    116116            } 
    117117        } 
     
    258258                        { 
    259259                        } 
     260                        catch (InvalidOperationException) 
     261                        { 
     262                        } 
    260263                    } 
    261264                } 
     
    324327            Bitmap screenShot = new Bitmap(rect.Width, rect.Height); 
    325328            Graphics bitmap = Graphics.FromImage(screenShot); 
    326             bitmap.CopyFromScreen(0, 0, 0, 0, rect.Size, CopyPixelOperation.SourceCopy); 
     329            bitmap.CopyFromScreen(rect.Location, Point.Empty, rect.Size, CopyPixelOperation.SourceCopy); 
    327330 
    328331            //Place the mouse pointer 
Note: See TracChangeset for help on using the changeset viewer.