protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
public static void Save() { JsonSerializer.ToJsonFile(DocumentPath, ToolContext.DocumentContainer); JsonSerializer.ToJsonFile(EditorPath, ToolContext); JsonSerializer.ToJsonFile(WindowPath, WindowSettings); WindowSettings = null; ToolContext.Dispose(); ToolContext = null; StyleLibrary = null; GroupLibrary = null; ContainerFactory = null; }
protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { _toolContext.Dispose(); } _disposed = true; }
public static void Save() { #if USE_SAVE_STYLES JsonSerializer.ToJsonFile(StylesPath, ToolContext.StyleLibrary); #endif #if USE_SAVE_GROUPS JsonSerializer.ToJsonFile(GroupsPath, ToolContext.GroupLibrary); #endif #if USE_SAVE_EDITOR JsonSerializer.ToJsonFile(EditorPath, ToolContext); #endif #if USE_SAVE_WINDOW JsonSerializer.ToJsonFile(WindowPath, WindowSettings); #endif WindowSettings = null; ToolContext.Dispose(); ToolContext = null; StyleLibrary = null; GroupLibrary = null; ContainerFactory = null; }