cleanup & small fixes. Added some more IBinaryContainer implementations which are used by plugins which aren't rolled out yet. (but I didn't want to loose the code)

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2524 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-03-07 10:08:57 +00:00
commit b7b89ade04
7 changed files with 167 additions and 38 deletions

View file

@ -55,7 +55,32 @@ namespace Greenshot.Helpers {
private CaptureMode captureMode;
private ScreenCaptureMode screenCaptureMode = ScreenCaptureMode.Auto;
private Thread windowDetailsThread = null;
/// <summary>
/// The public accessible Dispose
/// Will call the GarbageCollector to SuppressFinalize, preventing being cleaned twice
/// </summary>
public void Dispose() {
Dispose(true);
GC.SuppressFinalize(this);
}
// The bulk of the clean-up code is implemented in Dispose(bool)
/// <summary>
/// This Dispose is called from the Dispose and the Destructor.
/// When disposing==true all non-managed resources should be freed too!
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing) {
if (disposing) {
// Cleanup
}
windows = null;
selectedCaptureWindow = null;
windowDetailsThread = null;
capture = null;
}
public static void CaptureClipboard() {
new CaptureHelper(CaptureMode.Clipboard).MakeCapture();
}