First code analysis changes, this "should" make Greenshot more stable and implement things as is supposed.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2481 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-12 18:43:56 +00:00
parent 3f4d93f2b6
commit a394904aa3
64 changed files with 514 additions and 343 deletions

View file

@ -31,7 +31,7 @@ namespace GreenshotPlugin.Controls {
/// Custom dialog for saving images, wraps SaveFileDialog.
/// For some reason SFD is sealed :(
/// </summary>
public class SaveImageFileDialog {
public class SaveImageFileDialog : IDisposable {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SaveImageFileDialog));
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
protected SaveFileDialog saveFileDialog;
@ -39,6 +39,20 @@ namespace GreenshotPlugin.Controls {
private DirectoryInfo eagerlyCreatedDirectory;
private ICaptureDetails captureDetails = null;
public void Dispose() {
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
if (disposing) {
if (saveFileDialog != null) {
saveFileDialog.Dispose();
saveFileDialog = null;
}
}
}
public SaveImageFileDialog() {
init();
}